Daniel Marjamäki
57c6628732
Revert 'Cleaning up unsimplified templates'. This fix caused problems.
2019-05-16 21:11:04 +02:00
Daniel Marjamäki
34cf62452e
Change approach for Tokenizer::createLinks2: assume that <> should be linked
2019-05-16 20:50:56 +02:00
Daniel Marjamäki
0144db2490
Fixed 'Syntax Error' when < link is not set properly
2019-05-15 21:34:56 +02:00
Daniel Marjamäki
21ec78d8a1
Fix typo: %stype% => %type%
2019-05-15 09:06:27 +02:00
Daniel Marjamäki
79bb22f038
Fixed #9131 (Tokenizer::createLinks2; using std::list; list<config_option*> stack;)
2019-05-14 20:30:02 +02:00
Daniel Marjamäki
27fad38e00
Fixed #9084 (Tokenizer::setVarId: Same varid for member variable and argument, unknown template type)
2019-05-12 09:10:37 +02:00
Daniel Marjamäki
4d9b1e6c3d
Fixed #9094 (Tokenizer::createLinks2 problem with 'x%x<--a==x>x')
2019-05-11 19:11:40 +02:00
Daniel Marjamäki
d58d4273f9
Cleaning up unsimplified templates
2019-05-11 13:00:03 +02:00
IOBYTE
eade2bb2c2
Add support for simplifying user defined literal operator. ( #1827 )
2019-05-09 09:52:18 +02:00
Daniel Marjamäki
f6527fcd9b
fixed tests, unused templates are removed by default
2019-05-05 19:40:58 +02:00
IOBYTE
505b7f7ebd
Fixed #9110 (Syntax error on valid C++ code) ( #1813 )
2019-04-29 15:17:37 +02:00
Daniel Marjamäki
aaf1af6736
Fix Cppcheck passedByValue warning
2019-04-28 07:58:47 +02:00
IOBYTE
e786c6b7d4
partial fix for #8663 (Stack overflow with template disambiguator) ( #1801 )
...
This fixes simplifyUsing to remove 'typename' and 'template' from type
aliases of the form: using T3 = typename T1::template T3<T2>;
This lets the template simplifier instantiate the type alias which will
then remove the using type alias.
The crash will still happen if there is no instantiation because the
type alias will not be removed. The type alias is what cppcheck is
crashing on after the template simplifier and that still needs fixing.
2019-04-21 06:46:16 +02:00
amai2012
28bc3cad92
#8913 SIGSEGV in CheckUnusedVar::checkFunctionVariableUsage - C++/CLI code
2019-04-19 13:55:25 +02:00
IOBYTE
7799ed4243
Fixed #8889 (varid on function when using trailing return type.) ( #1800 )
...
* Fixed #8889 (varid on function when using trailing return type.)
Don't set varid for trailing return type.
* Add a test for #9066 (Tokenizer::setVarId: varid set for trailing return type)
2019-04-18 20:22:39 +02:00
Daniel Marjamäki
b1b5b27b4e
addons: write column in error message(s)
2019-04-13 10:22:13 +02:00
Daniel Marjamäki
b04d1815ed
Add -std=c++17 and allow semicolon in 'if ()'
2019-04-12 09:10:25 +02:00
Daniel Marjamäki
f6b410b469
GUI: add setting for 'checkHeaders', 'checkUnusedTemplates' and 'maxCtuDepth' to project
2019-04-10 16:49:24 +02:00
Daniel Marjamäki
7610513c49
Fixed #9090 (Do not simplify standard functions)
2019-04-08 19:00:46 +02:00
Daniel Marjamäki
83106d5827
Unused templates: Remove unused template function with variadic arguments
2019-04-07 08:37:04 +02:00
Rikard Falkeborn
d23e987941
Fix CheckInternal warnings ( #1790 )
2019-04-06 06:55:46 +02:00
Daniel Marjamäki
73433c2961
Syntax error: Clarify a syntax error in audacity
2019-03-31 10:46:59 +02:00
Daniel Marjamäki
b30d463baf
Fix wrong syntax error
2019-03-31 09:34:19 +02:00
IOBYTE
22f01f035c
Fixed #9042 (Another `using BOOL` type breach) ( #1765 )
2019-03-27 21:42:50 +01:00
Daniel Marjamäki
0f6a90c595
Fixed #9069 (crash on invalid code: ' x= y{ } name5 ')
...
Credit to OSS-Fuzz for reporting this!
2019-03-27 18:17:11 +01:00
Frank Zingsheim
574b77cf1f
Fixed: FP return reference to thread_local variable ( #1758 )
2019-03-27 12:22:53 +01:00
Daniel Marjamäki
c77f31319d
Fix crash when checking re2c textfile
2019-03-26 20:51:41 +01:00
Daniel Marjamäki
c262aeffdd
Fixed #9068 (crash on invalid code)
2019-03-26 19:57:32 +01:00
Daniel Marjamäki
15676612c0
Fixed #9034 (crash on reading invalid code: '> typedef')
2019-03-26 16:14:24 +01:00
IOBYTE
5b72e1f568
Fixed #9040 (Type alias 'BOOL' declared with 'using' keyword breaks type detection) ( #1759 )
...
Moved simplifyUsing from TemplateSimplifier to Tokenizer.
2019-03-26 07:09:56 +01:00
Daniel Marjamäki
49e2f9d551
Fixed #9063 (Crash on invalid code: x='0' ++ '0' ( return)[ ];)
2019-03-25 15:29:23 +01:00
IOBYTE
b6faa11fbf
Fixed #9056 ("using namespace" inside namespace causes "SymbolDatabase bailout;) ( #1753 )
...
Fixed the bailout warning and one of the varid bugs.
The trailing return type still has a varid.
2019-03-24 17:31:34 +01:00
Daniel Marjamäki
e0f1418228
Fixed #9034 (Tokenizer::setVarId: function call parameter is not variable declaration)
2019-03-24 07:06:21 +01:00
Daniel Marjamäki
d82c792c1b
astyle formatting
2019-03-23 19:00:03 +01:00
Daniel Marjamäki
a9082c902a
Fixed #9058 (crash on invalid code in FwdAnalysis::checkRecursive)
2019-03-23 18:27:41 +01:00
IOBYTE
40af889df0
Fixed #9053 (simplifyTypedef: wrong simplification of '(const d)' when 'd' is a array) ( #1751 )
...
* Fixed #9053 (simplifyTypedef: wrong simplification of '(const d)' when 'd' is a array)
* fix whitespace
2019-03-23 10:45:38 +01:00
Rikard Falkeborn
794f65bac1
Handle prefixed strings and characters in Token ( #1742 )
...
This makes it possible to call getStrLength() and similar functions
before the tokenizer is called.
2019-03-18 06:18:25 +01:00
Daniel Marjamäki
a2a216bbe3
SymbolDatabase: Improved handling of 'normal' non simplified token list
2019-03-15 19:00:42 +01:00
Rikard Falkeborn
6a3dd9a185
Handle concatenated string and char literals
...
This handles concatenated strings and characters from simplecpp.
Previously, L'c' would be preprocessed to the tokens "L" and "'c'".
cppcheck would then remove the "L" token and set "'c'" to be a wide
character literal. Now, it needs to remove the prefix instead.
When doing this, add handling of utf32 encoded literals (U) and UTF-8
encoded literals (u8).
2019-03-10 10:38:50 +01:00
Daniel Marjamäki
75ce67f4b8
Fixed #9027 (cppcheck on Centos 7 - segmentation fault below CheckCondition::multiCondition2)
2019-03-08 19:27:20 +01:00
Daniel Marjamäki
fda0f52424
Add --remove-unused-templates flag to remove all unused templates
2019-03-05 14:58:02 +01:00
IOBYTE
5ee6c2138c
Fixed #9016 (tokenizer: wrong simplification for operator ^ (){}) ( #1724 )
2019-03-05 11:35:45 +01:00
Daniel Marjamäki
3675318208
Added --remove-unused-included-templates option
2019-03-04 19:10:49 +01:00
Daniel Marjamäki
c5a512338e
--check-headers=no: remove more templates in headers that are not used in the source file
2019-03-03 20:18:54 +01:00
Daniel Marjamäki
41db8afe87
--check-headers=no: remove templates in headers that are not used in the source file
2019-03-03 12:56:37 +01:00
Daniel Marjamäki
eb109af00f
Replace Token::simpleMatch with Token::Match for complex pattern
2019-03-03 12:40:55 +01:00
Daniel Marjamäki
59ec5f961f
--check-headers=no: remove types in headers that are not used in the source file
2019-03-03 12:36:33 +01:00
Daniel Marjamäki
411a3f09f7
--check-headers=no: Remove unused function declarations
2019-03-03 09:18:12 +01:00
IOBYTE
b222953bae
template simplifier: only constant fold template instantiation arguments ( #1721 )
...
* template simplifier: only constant fold template instantiation arguments
* Fix travis build.
2019-03-03 07:40:55 +01:00
Daniel Marjamäki
f5c274b3b1
Added '--check-headers=no' option.
2019-03-02 19:52:15 +01:00