Commit Graph

353 Commits

Author SHA1 Message Date
Frank Zingsheim 41a54fceba Fixed false positives about uninitialized member variables if variable has a default value (#5500) 2014-10-16 21:57:43 +02:00
Frank Zingsheim 9dd3bce98b Fixed #6214: non-static member initializer causes false positive 2014-10-16 09:11:09 +02:00
Daniel Marjamäki 82972b7b0d SymbolDatabase: fix debug output 2014-10-14 19:39:08 +02:00
Daniel Marjamäki 77cffcde38 Fixed #6190 (SymbolDatabase: variable info not set properly when reinterpret_cast is used) 2014-10-12 16:06:50 +02:00
Frank Zingsheim 11867e3210 Fixed #6214 (non-static member initializer causes false positive (function call; initializer)) 2014-10-12 15:06:07 +02:00
Dmitry-Me 23bfd21bbc Don't proceed to outer scope once match is found 2014-10-02 12:24:19 +04:00
PKEuS 0ae09c0029 SymbolDatabase: A token with a varId cannot be a function declaration 2014-09-29 13:05:51 +02:00
Robert Reif 194e4a71a4 Symbol database: handle anonymous namespace 2014-09-24 06:09:08 +02:00
Dmitry-Me ebf1764bcc Move variable declarations, remove unneeded assignments, remove comparison duplication 2014-09-19 11:29:31 +04:00
Daniel Marjamäki 29a49d0641 removed some redundant null pointer checks before calling Token::Match 2014-09-14 11:35:04 +02:00
Simon Martin 53b58f0ed9 Refactoring. Use Token::Match instead of hardcoded patterns to increase readability. 2014-09-14 11:26:16 +02:00
PKEuS 605fb9039a Merge pull request #391 from Dmitry-Me/resolveIssue1037098
Resolve CID 1037098
2014-09-06 23:17:52 +02:00
PKEuS e8f7279039 Refactorization: Moved detection of STL strings to SymbolDatabase 2014-09-05 12:03:08 +02:00
PKEuS 6d27ca6c9a Fixed SymbolDatabase if unnamed struct is casted and returned (#6125) 2014-09-03 11:15:05 +02:00
PKEuS 80df3dc642 Disabled several checks and simplifications for C code, if they are C++-only. Do not match arguments for C code, since there can't be overloads. 2014-09-01 18:43:24 +02:00
PKEuS 9733a751ec SymbolDatabase: Several small refactorizations 2014-08-31 11:27:32 +02:00
PKEuS 862b18e0e2 SymbolDatabase: New scope type eLambda 2014-08-31 10:21:27 +02:00
PKEuS 8188578cf2 SymbolDatabase: Fixed handling of nested types for function arguments
Removed unnecessary loops between var->typeStartToken() and var->typeEndToken()
2014-08-19 11:55:00 +02:00
Dmitry-Me fd9009c494 Resolve CID 1037098 2014-08-12 10:02:54 +04:00
PKEuS 5d302716e7 Refactorized Variable::isIntegralType() and Variable::isFloatType():
- Cached property
- Make use of it in several checks
- float* is flagged as floating point type
2014-08-09 11:45:13 +02:00
PKEuS f3e0df7501 Support C++11 style initialization with {}:
-> Support in setVarId and SymbolDatabase (#4344)
-> Fixed false positives in unused variable checking (#5491, #5494)

Side-effect: Support global variables initialized with brackets (C++03 style) in SymbolDatabase
2014-08-05 15:33:57 +02:00
Dmitry-Me f104aa237f Bring declarations closer to where they're needed. 2014-07-24 18:34:13 +04:00
Dmitry-Me 615eb32fdc Use temp variables to avoid repeated actions in code. 2014-07-23 18:51:23 +04:00
Daniel Marjamäki 1e5eab8f17 xml dump: Added function attribute in scope 2014-07-20 11:44:01 +02:00
Daniel Marjamäki b1e5b015df xml dump: output some more info in the dump 2014-07-16 15:27:13 +02:00
Daniel Marjamäki 2f7b8fe4b2 xml dump: fixed some minor issues in symboldatabase dump 2014-07-14 19:25:30 +02:00
Daniel Marjamäki 84ec573d0a xml dump: Fixed segfault when dumping symboldatabase variables 2014-07-14 19:17:39 +02:00
Daniel Marjamäki 6732556eb8 xml dump: output a <variables> with all variables 2014-07-14 18:35:15 +02:00
Daniel Marjamäki 2e7a72856a xml dump: remove duplicate attribute 2014-07-14 18:13:27 +02:00
Daniel Marjamäki 8db5836e3f Fixed #5982 (Add xml dump) 2014-07-14 15:51:45 +02:00
Daniel Marjamäki 954400a382 Add simple xml debug output. When both --xml and --debug is used there will be xml debug output. 2014-07-13 17:21:45 +02:00
Dmitry-Me ba3757dfd3 Bring variables decalaration to where they are really needed. 2014-07-10 11:23:14 +04:00
Daniel Marjamäki d40b77dce2 Removed special 'else if' handling. this is redundant since these are simplified. 2014-07-02 16:16:19 +02:00
PKEuS e13de2681e SymbolDatabase: 'const' can't be the name of a variable - fix use after free #5882 2014-06-26 09:19:57 +02:00
PKEuS b20f87faf2 Optimized Tokenizer::simplifyPlatformTypes() once more: Another 3% improvement on Windows.
-> All Token::Match strings are uppercase, so check Token::isUpperCaseName() to avoid comparisons with very slow long Token::Match strings (idea from amai)
Removed duplicate Token::Match call in symboldatabase.cpp
2014-06-25 20:42:59 +02:00
PKEuS d93d7401c6 Moved getSourceFilePath(), isC() and isCPP() from Tokenizer to TokenList
Conflicts:
	lib/tokenize.cpp
2014-06-04 18:36:25 +02:00
Robert Reif e5ae575ace Fixed #5867 (invalid debug warnung: Scope::checkVariable : varid0) 2014-06-02 06:18:32 +02:00
PKEuS 04f3caf8e8 Fixed debug message #5159 2014-05-25 14:16:03 +02:00
PKEuS adf38fcfd0 Further include cleanup 2014-05-24 12:50:04 +02:00
PKEuS 1fc1ff1993 Moved implementation of two functions to new file check.cpp -> Don't include <iostream> everywhere 2014-05-24 12:50:04 +02:00
Robert Reif e993e2927c Fixed #5831 (FP in 1.65: call of pure virtual function 'throw' in destructor) 2014-05-20 06:10:34 +02:00
PKEuS 5fbd58d98d Fixed messages of CheckInternal, fixed a false positive. 2014-05-18 20:39:52 +02:00
Robert Reif 0bdecfd9cb Fixed #5767 (move bool Variable flag into flag variable) 2014-05-07 15:59:21 +02:00
Robert Reif ae96491d6c Fixed #5756 (declspec(nothrow) not supported) 2014-05-04 20:47:20 +02:00
Robert Reif 6ff5de2118 Fixed #5697 (Check for throw in __attribute__((nothrow)) function) 2014-04-20 20:40:55 +02:00
Alexander Mai 96d2666a6c Fix crash in SymbolDatabase - errorLogger may be 0 2014-04-18 21:19:49 +02:00
Alexander Mai 7d9ec01bdc #5593 - hang or --report-progress broken (does not report progress) : add reportProgress() call to SymbolDatabase 2014-04-18 20:42:22 +02:00
Daniel Marjamäki 79942df842 Fixed #5602 (false positive on std::vector - after unknown macro around the function header) 2014-04-13 13:05:30 +02:00
Daniel Marjamäki 9d51bfd015 Fixed #5397 (False positive: Same expression on both sides of '&') 2014-04-12 16:06:31 +02:00
PKEuS 9c921ab657 Fixed handling of member function pointers in setVarId and SymbolDatabase (#4577) 2014-04-12 12:04:55 +02:00