Commit Graph

7639 Commits

Author SHA1 Message Date
Daniel Marjamäki 296f250caa qt.cfg: configure some QString methods 2017-04-18 19:21:34 +02:00
Daniel Marjamäki 01c5c2fc5b qt.cfg: Add reademptycontainer test 2017-04-18 18:47:35 +02:00
Daniel Marjamäki c229754a70 qt.cfg: Add configuration for QString 2017-04-18 18:04:27 +02:00
Daniel Marjamäki 1a95dc9bd6 Fixed #7979 (Tokenizer: Detect and reject c++ code in .c file) 2017-04-17 22:15:29 +02:00
Daniel Marjamäki bb015c6a2b Fixed #8006 (AST: Wrong tree with complex for loops and casts) 2017-04-17 21:11:53 +02:00
Simon Martin 5fd686c878 Ticket #4544: Also handle Foo<struct Bar> constructs. 2017-04-17 11:24:28 +02:00
PKEuS b97779591e Fixed unit test in testbufferoverrun.cpp 2017-04-11 23:00:33 +02:00
Daniel Marjamäki 41a64f6d1f Fix crash 2017-04-11 20:16:33 +02:00
PKEuS b1f4bd7504 Refactorization: Reimplemented Settings::_enabled as a bitfeld instead of std::set (#7995) 2017-04-11 11:49:26 +02:00
Daniel Marjamäki 632a6b664c AST: Harden handling of C++11 2017-04-10 23:29:15 +02:00
Daniel Marjamäki 2c43075ece AST: weird clang syntax 2017-04-10 23:05:41 +02:00
Daniel Marjamäki df90ff9f5e Merge pull request #888 from simartin/ticket_7942
Don't generate invalid syntax for out of line template class constructors during instantiation
2017-04-10 22:18:20 +02:00
Daniel Marjamäki 5e1b6aee8c AST: Fix hang for weird VLA code 2017-04-10 22:17:34 +02:00
Daniel Marjamäki ffeadbdde4 AST: improved handling for struct initialization 's = { [0] = 123 }' 2017-04-10 07:25:18 +02:00
Daniel Marjamäki d92c529aa6 AST: Fix wrong handling of struct initialization, caused hang 2017-04-09 22:06:13 +02:00
Daniel Marjamäki e6005dfa3c AST: Fix AST for lambda '[&]{..}' 2017-04-09 17:49:55 +02:00
Matthias Krüger 494f64cb88 tests: fix some self-check findings about functions that can be static.
Was:
[test/testtype.cpp:223]: (performance, inconclusive) Technically the member function 'TestType::removeFloat' can be static.
[test/testsymboldatabase.cpp:61]: (performance, inconclusive) Technically the member function 'TestSymbolDatabase::getSymbolDB_inner' can be static.
[test/teststl.cpp:1437]: (performance, inconclusive) Technically the member function 'TestStl::getArraylength' can be static.
2017-04-09 17:28:00 +02:00
Simon Martin ee05fe7d77 Ticket #7942: Don't generate invalid syntax for out of line template class constructors during instantiation. 2017-04-09 16:12:59 +02:00
Daniel Marjamäki 8ffed6862d Tokenizer: Add --check-config warning for macro with semicolon in argument 2017-04-07 19:19:10 +02:00
Daniel Marjamäki 7d8af7bdca Fixed #7979 (crash (nr 2): CheckFunctions::checkIgnoredReturnValue()) 2017-04-07 13:18:53 +02:00
Daniel Marjamäki 392a06a44b AST: better handling of '(struct X){...}' 2017-04-06 21:28:13 +02:00
Daniel Marjamäki 50da7d4919 Tokenizer: Write syntax error if there is C++ code in C file. 2017-04-06 08:50:35 +02:00
Daniel Marjamäki fd2651909c Fixed #7978 (ValueType: container type not set properly) 2017-04-06 07:07:20 +02:00
Daniel Marjamäki fee86b9684 ValueType: Better handling of 'new Container' 2017-04-05 22:05:29 +02:00
Daniel Marjamäki e6ed08c4d8 Fixed #7976 (Internal error. Token::astOperand1() cyclic dependency. (ticket nr 2, new regression)) 2017-04-05 11:00:02 +02:00
Daniel Marjamäki 9c5a136f04 Fixed #7975 (crash: Tokenizer::createLinks2 problem with enable_if<x&&y,C*>) 2017-04-03 21:48:22 +02:00
Daniel Marjamäki abb43b6a81 Fixed #7934 (Wrong AST for 'for (i=0;cond;({min(x,10);}))') 2017-04-02 19:44:33 +02:00
Daniel Marjamäki 92fe210217 tweaked TestSymbolDatabase test case for unknown type. 2017-04-02 15:38:06 +02:00
Daniel Marjamäki d403a6a883 Preprocessor::getConfigs: Remove bad configurations when #error is seen 2017-04-02 12:15:53 +02:00
Daniel Marjamäki 7eb95aac2a Preprocessor::getConfigs: Handle #error in '#if !A' better 2017-04-02 10:06:39 +02:00
Daniel Marjamäki edd1c32e5b Preprocessor::getConfigs: Better handling of ! in #if 2017-04-02 09:03:43 +02:00
Daniel Marjamäki b7dcdc00d0 Fixed #7970 (ValueType: no types set below 'new std::string') 2017-04-01 22:22:37 +02:00
PKEuS ea215c3b7b Fixed false positives in CheckClass::checkConst() due to unmatched function overloads
Fixed function matching if constness mismatches
2017-04-01 10:19:32 +02:00
Daniel Marjamäki 164df2aa7b Fixed #7966 (ValueType: wrong type for gcc initialization {[1]=..}) 2017-03-31 09:41:38 +02:00
Daniel Marjamäki 8fe7ee1012 Fixed #7886 (ValueFlow: endless forloop 'for (i = 0, j = 0; i < sz && j < 9; i++)') 2017-03-30 22:02:36 +02:00
Daniel Marjamäki 2da3123db2 Fix ValueType. The '[' in variable declaration is not a dereference. 2017-03-30 11:01:29 +02:00
IOBYTE 7cae057615 Add missing varid or variable for member variables.
Add an optional extended description…
2017-03-30 10:07:58 +02:00
PKEuS 3c8f5b85ae Refactorization: Allocate Token::_values (ValueFlow information) dynamically, reducing size of each token by around 10% 2017-03-27 18:48:34 +02:00
PKEuS 2938278f00 Refactorization: Store minsizes in vector instead of list which has less overhead 2017-03-27 17:53:43 +02:00
PKEuS 680828788b Fixed false negative in CheckBufferOverrun::checkInsecureCmdLineArgs(), removed redundant tests 2017-03-27 11:30:07 +02:00
PKEuS 171e1b8244 Fixed false negatives in CheckBufferOverrun::arrayIndexThenCheck() 2017-03-27 11:07:49 +02:00
Robert Reif 3dba1b1739 Tests for git pull request #882. 2017-03-25 15:46:25 -04:00
Robert Reif c96e8daebc Don't change varid of member variables. 2017-03-25 10:59:35 -04:00
PKEuS f4c0ab5dd5 SymbolDatabase: Match function overloads by using ValueType information by running a second pass of the function pointer assignment routine. 2017-03-24 12:19:29 +01:00
Alexander Alekseev abba762d42 New check: checking for copy ctor and eq operator co-existence 2017-03-24 12:00:20 +01:00
Robert Reif bc87e874e9 Add variable and type information for auto and auto variables in range based for loops of containers. 2017-03-23 20:14:49 -04:00
Robert Reif 7adfb6e0e4 Add variable and type information to tokens for C array range based for loops. 2017-03-23 19:48:20 -04:00
Robert Reif f8dd6ee014 Fix test code so it compiles. 2017-03-23 19:16:15 -04:00
PKEuS 97fa9e9d1b ValueFlow: Stop on inline assembly 2017-03-23 20:01:16 +01:00
PKEuS 9225bff31d Added (back) support for enums to CheckCondition::checkIncorrectLogicOperator() (#7794) 2017-03-23 18:57:48 +01:00