Commit Graph

6825 Commits

Author SHA1 Message Date
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 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 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 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
Alexander Mai 7d8b62e615 Add regression test for #6669 Return value of malloc is reported not stored, while it is. 2015-10-26 18:24:49 +01:00
PKEuS 636bf75799 Fixed crash on garbage code (#7074) 2015-10-26 13:29:47 +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
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 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 7060c7c87d Refactorization: Reduced code duplication in testlibrary.cpp 2015-10-19 09:01:20 +02:00
Philipp Kloke a837cc48e0 Refactorization: Simplified code in tokenlist.cpp, token.cpp and testthreadexecutor.cpp 2015-10-19 09:01:20 +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
PKEuS 52be380ef0 Fixed fix for #7042 - support hexadecimal digits 2015-10-18 16:37:33 +02:00
Alexander Mai 21efa992e3 #6865 TemplateSimplifier::expandTemplate doesn't terminate on invalid code. Add some another syntax check on templates to avoid problems later on. 2015-10-18 15:47:37 +02:00
Daniel Marjamäki 9bb2af1893 Fixed #7059 (AST: handle C++ initialization with {} better) 2015-10-18 13:43:39 +02:00
Alexander Mai 8f07b2e440 #6922 valueFlowForward does not terminate: xorg/driver/xf86-video-neomagic : src/neo_driver.c (invalid code). Add regression test for previously fixed bug. 2015-10-18 11:52:25 +02:00
Daniel Marjamäki fe4fac7eb2 Fixed #7058 (Tokenizer::simplifyTypedef: wrong simplification of enum constant 'AB::A' if AB is a struct typedef) 2015-10-18 04:55:04 +02:00
Daniel Marjamäki ec87b09d89 Fixed #7056 (iscast does not handle '(ulong)~0' properly, Tokenizer::simplifyCalculations wrongly simplifies '(ulong)~0' to 'ulong~0') 2015-10-17 18:58:13 +02:00
Daniel Marjamäki 30af2fcd73 iscast: handle '(ulong)~0' better 2015-10-17 18:25:27 +02:00