7620 Commits

Author SHA1 Message Date
Aleksandr Pikalev
2d0ecc08c1 Check pointers for NULL before utilizing and do not check it later 2015-11-06 20:24:09 +01:00
PKEuS
7a90b763f6 Tokenizer::simplifyLabelsCaseDefault(): Do not insert ; between two cases. 2015-11-06 19:59:23 +01:00
PKEuS
95a0c0f14c Limit the number of cases created by Tokenizer::simplifyCaseRange(). 2015-11-06 19:21:56 +01:00
PKEuS
1fe1d7ea4a Extended Tokenizer::simplifyCaseRange() to support also ranges of chars. 2015-11-06 18:46:43 +01:00
PKEuS
41b1b9d850 Support case ranges (gcc extension, #6490) 2015-11-06 18:39:03 +01:00
PKEuS
2ac8da0497 Fixed #6548 also for noexcept 2015-11-06 18:00:59 +01:00
PKEuS
72bc6d1f33 Refactorization: Fixed VS warning about variable shadowing. 2015-11-06 17:35:08 +01:00
PKEuS
be36539ad7 Fixed AST generation for C++11-style initialization (#6528) 2015-11-06 17:34:26 +01:00
PKEuS
62bc827eb0 Fixed createLinks2() when inheriting from a template (#6601) 2015-11-06 10:44:37 +01:00
PKEuS
eb2b0fa0d0 Fixed wrongly detected unconditional scope with C++11-style initialization in SymbolDatabase (#6581) 2015-11-06 10:16:44 +01:00
PKEuS
eefea507b9 Use ValueFlow in CheckIO::checkWrongPrintfScanfArguments() (#6563) 2015-11-06 09:52:22 +01:00
Alexander Mai
3177d73fb0 #7089 segmentation fault (invalid code) in Tokenizer::simplifyTokenList1. Refactor some functions to accept argument as refernce instead of pointer 2015-11-05 19:00:08 +01:00
PKEuS
83a816b109 Fixed crash on garbage code (#7085) 2015-11-04 10:26:55 +01:00
PKEuS
6c20f4b2a2 Fixed crash on garbage code (#7090) 2015-11-04 10:10:20 +01:00
PKEuS
8374e8414b Fixed use-after-free in clang test suite introduced recently (#7087) 2015-11-03 19:24:19 +01:00
PKEuS
b97f9e576d Fixed crash in clang test suite introduced by previous commit. 2015-11-02 22:53:05 +01:00
PKEuS
b049050792 Fixed wrong parsing of ^{} 2015-11-02 22:14:41 +01:00
PKEuS
4f565ba90f Fixed crashs on garbage code (#7082) 2015-11-02 21:30:28 +01:00
PKEuS
23e6e5a568 Fixed crash on garbage code (#7081) 2015-10-31 18:11:56 +01:00
Miika-Petteri Matikainen
acd8a092f8 Make syntaxError suppressable (fixes #5917 and #7076)
syntaxErrors were not suppressable, because they were treated as
InternalErrors which were thrown and catched during the checking,
and normal suppression rules were not applied for those.

We fix this by calling the normal reportErr() function that does
suppression matching.
2015-10-28 20:53:35 +02:00
PKEuS
963008089d Fixed false positive with range-based for-loop (#7078) 2015-10-28 16:37:46 +01:00
PKEuS
a0ff992c4a Refactorization: Simplified Tokenizer::simplifyAddBracesToCommand() and Tokenizer::simplifyAddBracesPair() 2015-10-27 20:04:34 +01:00
PKEuS
4ee56d2306 Fixed simplifyAssignmentInFunctionCall for complex expressions (#6927) 2015-10-27 20:01:40 +01:00
PKEuS
7866990d04 Fixed false positive with range-based for-loop (#7075) 2015-10-27 14:47:18 +01:00
Daniel Marjamäki
bfd8a69e74 Fixed #6243 (False positive: uninitialized variable, looping with goto) 2015-10-27 12:40:52 +01:00
Daniel Marjamäki
4b0625c570 Fixed #6239 (Possible null pointer dereference after pointer is modified by a function template) 2015-10-27 12:33:46 +01:00
PKEuS
b775603e93 Revert "Removed bailout in case a file (without include guards) is included twice. (#5455)"
This reverts commit 34ec1112a921e1b147a56149dd4e5fb1ece68c26.
2015-10-26 21:37:08 +01:00
PKEuS
24882fb53a Fixed VarId accidentially assigned to case labels. 2015-10-26 21:24:53 +01:00
PKEuS
dfdc0f6b99 Support range-based for-loop in SymbolDatabase 2015-10-26 19:20:42 +01:00
PKEuS
5add1d8901 Set VarId in range-based for-loops 2015-10-26 19:03:23 +01:00
PKEuS
a5f577d179 Support range-based for-loop in CheckClass::checkConst() (#5514) 2015-10-26 18:48:01 +01:00
PKEuS
636bf75799 Fixed crash on garbage code (#7074) 2015-10-26 13:29:47 +01:00
PKEuS
34ec1112a9 Removed bailout in case a file (without include guards) is included twice. (#5455) 2015-10-26 12:17:29 +01:00
PKEuS
0370c66e41 Fixed broken function Token::getCharAt() (#7073) 2015-10-26 11:51:05 +01:00
PKEuS
297f2c78bd Fixed false positives variableHidingTypedef (#5624, #6507) 2015-10-26 10:06:52 +01:00
PKEuS
ee58587706 Fixed false positive unreachableCode when ternary operator is used (#6664) 2015-10-26 08:29:43 +01:00
PKEuS
f637b84192 Fixed various false positives with --check-library (#6545, #6630) 2015-10-26 08:16:50 +01:00
amai2012
116c10c7d6 Merge pull request #700 from simartin/ticket_6998
Ticket #6998: Properly handle "typedef unsigned T;" constructs.
2015-10-24 15:24:27 +02:00
Simon Martin
5d40a3ab66 Ticket #6998: Properly handle "typedef unsigned T;" constructs. 2015-10-24 12:27:26 +02:00
PKEuS
e989d4b11b Support C++11 array initialization in CheckUninitVar (#7010) 2015-10-24 12:06:40 +02:00
Daniel Marjamäki
fc2bf2ef08 Fixed #7065 (AST: More explicit handling of lambda functions, generate ast for ';new Fred;') 2015-10-20 23:55:29 +02:00
Alexander Mai
3b1d849476 Correct template syntax check which got introduced by an attempt fix #6865. Disable test for #6865, adjust some modified tests and add new regression tests 2015-10-19 20:03:33 +02:00
Daniel Marjamäki
6b9088de3f Fixed #7057 (valueFlowAfterAssign doesn't terminate) 2015-10-19 19:36:46 +02:00
Daniel Marjamäki
b856ac51dd Fixed #7064 (Tokenizer: Wrong simplification of 'a.public:') 2015-10-19 10:01:57 +02:00
Philipp Kloke
06c20252fa Added dot at end of stringLiteralWrite message 2015-10-19 09:01:21 +02:00
Philipp Kloke
2a5206a444 Refactorization: Reordered conditions - simplematch is cheaper than findsimplematch 2015-10-19 09:01:21 +02:00
Philipp Kloke
a837cc48e0 Refactorization: Simplified code in tokenlist.cpp, token.cpp and testthreadexecutor.cpp 2015-10-19 09:01:20 +02:00
Daniel Marjamäki
5d12471caa fix travis, remove unused variable 2015-10-18 17:19:44 +02:00
Alexander Mai
8667184f12 #7062 Remove unnecessaryQualification check 2015-10-18 17:00:09 +02:00
Daniel Marjamäki
9be284e80f AST: proper operator precedence for c++11 initializer {} and :: 2015-10-18 16:58:15 +02:00