Ayaz Salikhov
f5646183cd
Move comment to the right place
2017-06-02 17:15:24 +03:00
Alexander Mai
b4a58be113
#define HIDE_WRONG_DATA to get release mode build (hiding crashes on invalid AST/symboldatabase). Fix doxygen syntax.
2017-06-01 23:38:02 +02:00
Daniel Marjamäki
b68c8d91ab
Fixed #8039 (Tokenizer: wrong simplification of string)
2017-06-01 22:21:02 +02:00
Daniel Marjamäki
bce0776417
Fixed #7795 (ValueFlow: Value is not known after conditional increment )
2017-06-01 15:16:07 +02:00
Daniel Marjamäki
5efb2e3be0
Visual Studio: Skip unknown platforms (ARM, ARM64)
2017-06-01 13:13:23 +02:00
Ayaz Salikhov
132c0af22a
Simplify some statements
2017-06-01 02:02:12 +03:00
Ayaz Salikhov
3cd2f2d092
Don't cast bool to bool
2017-06-01 01:49:40 +03:00
Ayaz Salikhov
cb58cf8163
.length() > 0 == !.emepty()
2017-06-01 01:42:29 +03:00
Daniel Marjamäki
1f48b082d1
CLI: Add --output-file flag so results can be written to file directly.
2017-05-30 15:04:28 +02:00
Ville Skyttä
5ab158fec2
Spelling fixes
2017-05-30 08:03:15 +03:00
Daniel Marjamäki
1961d6d0f7
CppCheck: make sure preprocessor syntax errors are reported
2017-05-28 20:34:58 +02:00
Sam Truscott
956b5812e7
Fixed #7866 (Crash while scanning QML files)
2017-05-28 16:39:18 +02:00
Steve Browne
b58562fc7d
Added test cases for catching when assignment comes after an operator, compound assignment, or comparison for ticket #7429 and fixed the tests.
2017-05-28 16:00:06 +02:00
Daniel Marjamäki
18adb97873
astyle formatting
...
[ci skip]
2017-05-28 15:56:26 +02:00
Frank Zingsheim
aa937e426d
Fixed #7849 (Tokenizer: Wrong simplification of floating point equality comparison)
2017-05-28 10:53:50 +02:00
amai
624ceb5027
Fix includes for cygwin
2017-05-27 10:23:06 +02:00
Ayaz Salikhov
28aa939d69
iwyu - include what you use
2017-05-27 04:33:47 +02:00
uburuntu
d41d091c07
ENH: perfomance: seeking of one char is more efficiently
2017-05-27 04:15:54 +02:00
amai
45ba1ff1e3
#8079 SymbolDatabase::createSymbolDatabaseEnums() crashes on invalid enum declaration
2017-05-25 09:50:14 +02:00
Daniel Marjamäki
1dd42d9a9e
arrayIndexOutOfBounds: Make sure error message is clarified for daca2 --template format
2017-05-25 08:18:37 +02:00
Daniel Marjamäki
0262020707
--template: Removed 'clang' and renamed 'cppcheck2' to 'daca2'
2017-05-25 05:24:42 +02:00
Daniel Marjamäki
dda5556ded
Fixed #8034 (AST: better handling for c++ type initialization)
2017-05-24 20:24:56 +02:00
Daniel Marjamäki
5444875f89
Fixed #8034 (AST: better handling for c++ type initialization)
2017-05-24 20:18:31 +02:00
Daniel Marjamäki
099b4435c3
Fixed #8074 (Preprocessor::getConfigs: wrong configuration extracted 'A;B;;')
2017-05-24 11:16:41 +02:00
Daniel Marjamäki
93e0516291
Fixed #8009 (Tokenizer: fix handling of template rvalue references)
2017-05-23 18:55:17 +02:00
Daniel Marjamäki
70c2de62b7
arrayIndexOutOfBounds: better note
2017-05-23 16:06:32 +02:00
Daniel Marjamäki
6e1544bd49
ValueFlow: Use getOrdinalText()
2017-05-23 15:01:56 +02:00
Daniel Marjamäki
e73657b198
Clarify arrayIndexOutOfBounds
2017-05-23 14:58:43 +02:00
Daniel Marjamäki
a3c0eecccf
Added --template=cppcheck2 output format
2017-05-23 12:19:11 +02:00
Daniel Marjamäki
6cb563b3fe
ErrorLogger: Adjust the severity in the 'clang' output format. as far as I know, clang severities are 'fatal error', 'error' and 'warning'.
2017-05-23 12:02:57 +02:00
Daniel Marjamäki
d3d3d31613
Clarify 'invalidFunctionArg' messages
2017-05-23 11:57:25 +02:00
Daniel Marjamäki
f7cda81c0c
Refactoring: ValueFlow::Value::errorSeverity() will have the logic if value is 'error' or 'warning'
2017-05-23 11:43:56 +02:00
orbitcowboy
ba2b235e24
Fixed: warning: ‘tokvalue’ may be used uninitialized in this function [-Wuninitialized].
2017-05-22 15:22:38 +02:00
orbitcowboy
ffe6582e6b
Added platform support for Atmel AVR 8 bit microcontrollers.
2017-05-22 14:46:19 +02:00
Daniel Marjamäki
b59bd96c6d
ErrorLogger: Fix crash when error message does not have a FileLocation
2017-05-22 11:25:58 +02:00
Daniel Marjamäki
8ef9ab26b1
Clarify floatConversionOverflow
2017-05-22 11:04:24 +02:00
Daniel Marjamäki
0cb1c4f221
Clarify integerOverflow messages
2017-05-22 10:10:56 +02:00
Daniel Marjamäki
9374055238
ErrorPath: clarify the 'shiftTooManyBits' error message
2017-05-22 07:58:56 +02:00
Daniel Marjamäki
7af58cf31a
show full error path in xml files
2017-05-22 07:42:54 +02:00
Daniel Marjamäki
58da0df2f6
astyle formatting
...
[ci skip]
2017-05-20 18:52:48 +02:00
Daniel Marjamäki
82a372a380
Try to clarify ErrorPath texts
2017-05-20 08:47:35 +02:00
Daniel Marjamäki
55ae206ecc
ErrorPath: better output
2017-05-19 17:29:16 +02:00
Daniel Marjamäki
b53a2ff9eb
Command line: Added --template=clang formatting
2017-05-19 17:09:49 +02:00
Daniel Marjamäki
f92b16706c
ValueFlow: Add ErrorPath info after for loop
2017-05-19 16:32:58 +02:00
Daniel Marjamäki
2bb54fef69
ValueFlow: Test ErrorPath handling
2017-05-19 14:34:59 +02:00
Matthias Krüger
a2c716fa3b
CheckOther::checkDuplicateExpression(): be lazier if style-reports are not enabled. NFCI.
2017-05-19 00:54:55 +02:00
Daniel Marjamäki
899615c1e4
update simplecpp includes
...
[ci skip]
2017-05-18 22:26:07 +02:00
Matthias Krüger
aa3f1db33c
Add internal check that checks for redundant non-nullness checks in Token::(simple)Match checks.
...
In code like
if (tok && Token::simpleMatch(tok, "bla")) {}
or
if (tok->previous() && Token::Match(tok->previous(), "foo")) {},
the first check is redundant because Token::(simple)Match already checks if the argument token is null.
2017-05-18 22:12:33 +02:00
Daniel Marjamäki
9d08cbf4d2
Fix 'make checkcfg'
2017-05-18 22:10:08 +02:00
Daniel Marjamäki
340c687cbf
Revert "Use 'Stringification => Tokenizer' until some issues have been fixed"
...
This reverts commit c2727691a4
.
2017-05-18 21:53:25 +02:00
Daniel Marjamäki
040d2f0012
Use simplecpp lexer in test cases
2017-05-18 21:52:31 +02:00
Daniel Marjamäki
c2727691a4
Use 'Stringification => Tokenizer' until some issues have been fixed
2017-05-18 09:33:41 +02:00
Daniel Marjamäki
7bd0bc7534
Tokenizer: Simplify '->' to '.'
2017-05-17 22:50:54 +02:00
Daniel Marjamäki
bc12a0b21f
Handle empty token list better (for instance when Preprocessor::validateCfg() see problem)
2017-05-17 22:30:20 +02:00
Daniel Marjamäki
1f4b84379d
Fix for #pragma asm
2017-05-17 21:58:46 +02:00
Daniel Marjamäki
59335f80d2
Try to fix windows build. Reduce header dependencies
2017-05-17 15:38:31 +02:00
Daniel Marjamäki
90a952d8c2
Add col and info in plist
2017-05-17 15:22:51 +02:00
Daniel Marjamäki
6230919976
Skip 'Stringification => Tokenize' step
2017-05-17 14:57:54 +02:00
Daniel Marjamäki
67e3187653
Preprocessor: Refactor handling of #pragma asm
2017-05-17 10:25:37 +02:00
Daniel Marjamäki
cd53d10970
ErrorPath: More information about assignments
2017-05-16 23:12:35 +02:00
Daniel Marjamäki
ecb3f0a934
ErrorLogger: Write ErrorPath info in the xml report
2017-05-16 22:58:02 +02:00
Daniel Marjamäki
c617851567
ErrorLogger: Added ErrorPath where each item has token and info
2017-05-16 22:38:13 +02:00
Daniel Marjamäki
e65d6d3c67
ValueFlow: inherit Value::callstack in calculations
2017-05-16 19:43:55 +02:00
Daniel Marjamäki
f92e7b3bfc
Emit better errorpath in CheckBufferOverrun::negativeIndexError
2017-05-16 19:08:47 +02:00
Daniel Marjamäki
970ff181de
Show 'Possible' errors without --enable=warning
2017-05-16 17:51:45 +02:00
Daniel Marjamäki
6967d68137
Add --plist-output argument
2017-05-16 14:07:23 +02:00
Daniel Marjamäki
3ef2f825c7
Fixed Cppcheck warnings about null pointer dereference
2017-05-15 20:36:28 +02:00
Daniel Marjamäki
8d75d1b920
Partial fix for #8028 (ValueFlow: Origin/callstack of value)
2017-05-15 20:05:11 +02:00
PKEuS
3432257390
Removed deprecated command --append
2017-05-14 11:57:04 +02:00
PKEuS
fda1f67da6
Set version to 1.79.99/1.80 dev
2017-05-14 10:07:38 +02:00
PKEuS
fb94ad21fa
Updated Visual Studio solution to VS2017.
2017-05-14 10:04:25 +02:00
Daniel Marjamäki
45d998979c
CHECK_WRONG_DATA: switch to debug macro
2017-05-13 19:10:05 +02:00
Daniel Marjamäki
55cd69e290
alwaysTrueFalse: Dont warn when checking sizeof for some type. such condition might be platform dependent.
2017-05-13 19:07:24 +02:00
Daniel Marjamäki
e5e5a5e4b8
1.79: Set version
2017-05-13 11:25:16 +02:00
Daniel Marjamäki
95db173e77
Fixed Cppcheck warning
2017-05-13 11:06:33 +02:00
orbitcowboy
b9bac79a8c
Improved const correctness, there are no functional changes.
2017-05-12 16:20:47 +02:00
PKEuS
68d77b73da
SymbolDatabase: Fixed parsing of unnamed arguments, properly detect pointers ( #8052 )
2017-05-07 09:03:58 +02:00
PKEuS
28b8bc57a8
CheckVaarg::va_list_usage(): Bailout on "goto" ( #8043 )
2017-05-07 08:32:48 +02:00
PKEuS
b345c430fe
CheckStl::readingEmptyStlContainer(): Skip over lambdas ( #8055 )
2017-05-07 08:15:58 +02:00
Alexander Mai
c1cdcc158f
Run astyle. Fix some Doxygen issues
2017-05-06 11:57:02 +02:00
amai2012
3e11eb9dca
#8050 cppcheckError: 0xFFFFFFul -> 16777215ULU. Don't add a suffix 'U' if there is already a suffix present.
2017-05-05 14:47:58 +02:00
Daniel Marjamäki
a8a54bbfa8
Fixed #6028 (Improvement: False positive caused by C keywords in assembly comments)
2017-05-05 08:57:24 +02:00
Daniel Marjamäki
65297ce285
Fixed #7191 (false positive memleak on in-place new)
2017-05-04 19:39:57 +02:00
Alexander Mai
f54a6f085b
#7883 hang: CheckOther::checkFuncArgNamesDifferent() template code in .h. Activate language check for header files + Small refactoring
2017-05-03 20:36:26 +02:00
Daniel Marjamäki
1ec9b8c5b4
Fixed #8047 (false positive uninitialized variable - sizeof **A)
2017-05-03 19:27:55 +02:00
Alexander Mai
e88b4dcf06
Add another check to Tokenizer::validateC(): C++ casts
2017-05-03 16:57:42 +02:00
Matthias Krüger
a28f57344c
templatesimplifier: mark getTemplateNamePositionTemplateMember() static.
...
Fixes gcc 7-dev warning:
lib/templatesimplifier.cpp: In function ‘bool getTemplateNamePositionTemplateMember(const Token*, int&)’:
lib/templatesimplifier.cpp:715:6: warning: no previous declaration for ‘bool getTemplateNamePositionTemplateMember(const Token*, int&)’ [-Wmissing-declarations]
bool getTemplateNamePositionTemplateMember(const Token *tok, int &namepos)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2017-05-03 08:45:48 +02:00
Daniel Marjamäki
295e4fdfc2
Fixed #8049 (Preprocessor: Comment in system include not removed properly)
2017-05-02 22:18:24 +02:00
Alexander Mai
1bc7a89b3c
Improve search patterns within Tokenizer::validateC()
2017-05-02 17:57:06 +02:00
Robert Reif
e2bfe1c0ec
Fixed #8044 : Crash below SymbolDatabase::setValueType
2017-05-01 14:12:50 -04:00
Matthias Krüger
cee0f724ff
Fixed #8018 : Tokenize::findGarbageCode: detect heads of for-loops with 1 or more than 2 semicolons as garbage code.
2017-05-01 18:28:26 +02:00
Daniel Marjamäki
bc7799dccd
Fixed #7888 (false positive from knownConditionTrueFalse with sizeof(int) == sizeof(long))
2017-05-01 12:23:28 +02:00
Daniel Marjamäki
f51a709f80
add fixme comment
2017-05-01 11:25:58 +02:00
Daniel Marjamäki
ce6cc5416a
uninitvar: made ValueFlow check experimental
2017-05-01 11:13:30 +02:00
Daniel Marjamäki
9cdda53fb9
CheckFunctions::memsetZeroBytes: Add CHECK_WRONG_DATA to avoid crashes
2017-04-30 18:58:51 +02:00
Daniel Marjamäki
8a08cc0796
Fixed #8029 (Tokenizer::simplifyCAlternativeTokens: dont simplify 'eb.and + 1')
2017-04-30 14:40:41 +02:00
Daniel Marjamäki
7fd04cd8d0
Updated Token::expressionString(), write '->' instead of '.'
2017-04-30 14:22:18 +02:00
Simon Martin
28960a8bba
Remove bailout and fix varid for template class member initialized in out-of-line constructor ( #8031 )
2017-04-30 08:59:47 +02:00
IOBYTE
8a668aa860
Add missing else that could cause an extra try scope to be added to the scope list ( #8025 )
...
Add an optional extended description…
2017-04-30 08:58:41 +02:00
Daniel Marjamäki
980ca39fe2
valueFlowForward: better handling of sizeof() in rhs in assignments
2017-04-29 08:25:55 +02:00