Daniel Marjamäki
ddd21a260f
Fixed #6978 (False positive: unusedLabel shown for labels that are used in some preprocessor configurations)
2020-06-30 18:26:24 +02:00
Daniel Marjamäki
0583763cc6
Fixed #3088 (False positive: Dont report "struct or union member is never used" for structs with __attribute__((packed)) or #pragma pack(push))
2020-06-30 11:00:40 +02:00
Daniel Marjamäki
af6e76d623
Fixed #9787 (Better handling of user defined literals)
2020-06-25 22:06:34 +02:00
Simon Martin
1705d096f7
Simplify empty anonymous namespaces. ( #2673 )
2020-06-07 13:49:04 +02:00
Ken-Patrick Lehrmann
a45c7752a5
9185: Don't syntax error on nested lambdas ( #2672 )
2020-06-07 08:58:12 +02:00
Ken-Patrick Lehrmann
99ff04f617
9757: skip template parameters when computing scope ( #2670 )
...
The template parameter is confusing simplifyUsing: it does not compute
properly the scope, and we end up replace "type" in "to_string" with
"void", then later "void" is removed and we have an internal error.
2020-06-06 17:51:15 +02:00
Paul Fultz II
eed2e829a7
Revert "Cleanup: Removed Tokenizer::simplifyTokenList2. As a side-effect, rules for "simple" token list are now executed on normal token list." ( #2666 )
...
This reverts commit 187cde183d
.
2020-05-30 11:23:22 +02:00
PKEuS
187cde183d
Cleanup: Removed Tokenizer::simplifyTokenList2. As a side-effect, rules for "simple" token list are now executed on normal token list.
2020-05-29 21:21:07 +02:00
Daniel Marjamäki
67115491ea
Fixed #9739 (Tokenizer: simplifyTypedef: wrong simplification in using)
2020-05-29 11:16:49 +02:00
Daniel Marjamäki
7ff692341e
Fixed #9730 (Regression: TEXT macro not handled in windows code)
2020-05-28 22:03:16 +02:00
Daniel Marjamäki
4d5fe6ec5e
astyle formatting
...
[ci skip]
2020-05-26 23:28:19 +02:00
Oliver Stöneberg
4f68d85633
optimized non-matchcompiled Token::simpleMatch() a bit ( #2640 )
2020-05-26 20:13:56 +02:00
Daniel Marjamäki
f7f26ffe90
Tokenizer: Better handling of c alternative tokens in const method
2020-05-25 15:07:23 +02:00
Oliver Stöneberg
37bc0483a4
made check.h less heavy ( #2633 )
2020-05-23 07:16:49 +02:00
Paul Fultz II
8301fa8244
Fix issue 8144: valueFlowBeforeCondition: struct ( #2645 )
2020-05-21 08:47:48 +02:00
PKEuS
662745b504
Fixed several coverity messages
2020-05-20 18:54:16 +02:00
PKEuS
c155062cf2
Optimization: Speed up SymbolDatabase creation and Tokenizer::findGarbageCode() by using Token::isKeyword() for pre-checks
2020-05-19 13:48:15 +02:00
PKEuS
f6788c0472
Fixed Token::isKeyword: Actually set this flag to a reasonable value in all code paths
2020-05-19 13:47:25 +02:00
PKEuS
c9d8f607df
Optimization: Reduced peak memory usage (30% in my test case) by immediately deleting simplecpp::TokenList while creating the cppcheck TokenList.
2020-05-19 12:08:17 +02:00
PKEuS
09a30bd6b5
Optimization: Speed up Tokenizer::findGarbageCode() (by 15% in my test case) by avoiding iterating through token list multiple times
2020-05-19 08:54:47 +02:00
PKEuS
d6390dbd14
Optimization: Improved performance of simplifyTypedef for code with lots of typedefs
...
20% performance gain when checking ExtremeTuxRacer sourcecode (with glext.h available)
2020-05-19 08:35:13 +02:00
Daniel Marjamäki
9eda399323
Less strict unknownMacro
2020-05-17 19:12:16 +02:00
Daniel Marjamäki
08ddd84780
Update copyright year
2020-05-10 11:16:32 +02:00
Daniel Marjamäki
3e0218299b
Revert "Update copyright year"
...
This reverts commit 6eec6c4bd5
.
2020-05-10 11:13:05 +02:00
Daniel Marjamäki
6eec6c4bd5
Update copyright year
2020-05-10 11:11:34 +02:00
Daniel Marjamäki
00d1091506
Tokenizer: operator handling, fix tests
2020-05-04 23:00:51 +02:00
Daniel Marjamäki
06cb0e99d1
Tokenizer: Fix syntax error when operator* is called
2020-05-04 21:33:30 +02:00
Daniel Marjamäki
47c998e52d
Fixed #9689 (setVarId: wrong varid when 'not' is used)
2020-04-25 14:42:45 +02:00
Oliver Stöneberg
1af959af2c
fixed -Wextra-semi-stmt Clang warnings ( #2553 )
...
* fixed -Wextra-semi-stmt Clang warnings
* adjusted REDIRECT macro to require a semicolon
* testmathlib.cpp: rolled back accidental change
2020-04-21 17:27:51 +02:00
Daniel Marjamäki
bda73600e0
Tokenizer: Improved removal of unused template ( #9588 )
2020-04-20 20:48:22 +02:00
Zorgovskiy
08fc956990
Fixes issue #9664 ( #2614 )
2020-04-20 08:59:35 +02:00
Daniel Marjamäki
de53f63f76
Fixed #9665 (Tokenizer::setVarId: for loop variables)
2020-04-18 12:08:53 +02:00
Daniel Marjamäki
e4bea02cad
Fixed #7578 (varid not set for 'pointer to array' member variable in method)
2020-04-15 20:56:21 +02:00
Daniel Marjamäki
266c8d2c09
Remove temporary daca bailouts
2020-04-15 19:54:56 +02:00
Daniel Marjamäki
98be091d80
Fixed typedef simplification for array of function pointers
2020-04-13 16:28:01 +02:00
Oliver Stöneberg
2c1e36e63e
cleaned up includes based on include-what-you-use ( #2600 )
...
* cleaned up includes based on include-what-you-use
* check.h: trying to work around Visual Studio 2012 bug
* fixed Visual Studio compilation
2020-04-13 13:44:48 +02:00
shaneasd
82c09f243b
Maybeunusedsupport ( #2570 )
...
* Add rudimentary support for [[maybe_unused]]
* Add more test cases. use the symboldatabase rather than reparsing. Fix travis error.
* test review actions
* change var to usage._var
2020-04-12 20:35:54 +02:00
Daniel Marjamäki
97b04ba9a7
Syntax check: Using keyword in global scope
2020-04-11 17:36:22 +02:00
Daniel Marjamäki
e8e3c2660d
Detect syntax error 'x ==> y'
2020-04-11 11:05:27 +02:00
Daniel Marjamäki
05769e8dcc
Code cleanup
2020-04-10 13:14:38 +02:00
Daniel Marjamäki
0725c2290c
Tokenizer: Do not simplify function pointers to normal pointers as we loose important information
2020-04-10 11:53:32 +02:00
Daniel Marjamäki
8e9d7290b2
Tokenizer::simplifyTypedef: Better handling of r-value references
2020-04-08 22:40:45 +02:00
Oliver Stöneberg
1dd8d4afaf
fixes for Clang and clang-tidy 10 ( #2588 )
...
* clang_tidy.cmake: added clang-tidy-10 to program list
* fixed -Wrange-loop-construct Clang warnings
* fixed readability-qualified-auto clang-tidy warnings
* .clang-tidy: actually disable clang-analyzer-* warnings
* .clang-tidy: disabled some new warnings introduced with clang-tidy-10
2020-04-04 11:44:59 +02:00
Daniel Marjamäki
ac45bf7af2
Small refactoring
2020-04-04 11:19:39 +02:00
Daniel Marjamäki
e0acd1abf8
Tokenizer: Report unknown macro that contains '.x=..' argument
2020-04-04 10:32:56 +02:00
Daniel Marjamäki
7577bdb1df
DACA: Try to avoid some crashes/hangs for the most crazy code so we can focus on most serious bugs first
2020-03-31 11:33:38 +02:00
Daniel Marjamäki
1173186876
Fixed daca@home crash by stopping for unknown macro 'MACRO(a();b();)'
2020-03-12 13:28:09 +01:00
Daniel Marjamäki
900b99fbd8
Tokenizer; Report unknown macro used in function declaration
2020-03-10 20:22:46 +01:00
Daniel Marjamäki
5df6d5bc7c
Tokenizer; Warn about unknown macro used in string concatenation
2020-02-28 21:52:01 +01:00
Daniel Marjamäki
84995485ea
VarId: fixed varids for 'for (auto [x,y]: xy)'
2020-02-27 07:18:07 +01:00