Commit Graph

8107 Commits

Author SHA1 Message Date
Daniel Marjamäki 66d0d7a0ad Fixed #7553 (False positive with 1.74 'returning an integer in a function with pointer return type' when no integer is used) 2016-07-29 21:53:58 +02:00
Daniel Marjamäki 5611a71820 Fixed #7543 (False positive boolean result used in bitwise operation) 2016-07-29 18:46:43 +02:00
Daniel Marjamäki 89be630156 Fixed #7543 (False positive boolean result used in bitwise operation) 2016-07-29 17:24:22 +02:00
Daniel Marjamäki a65ae3ce2e Token: Allow dollar sign in identifiers 2016-07-29 13:42:11 +02:00
Daniel Marjamäki 5546f052ef Preprocessor: the simplecpp begin() and end() has been renamed 2016-07-29 08:51:57 +02:00
PKEuS 452ecc7ceb Improved check: Detect passedByValue even for arguments that are not declared as "const" 2016-07-28 19:37:10 +02:00
Daniel Marjamäki 0777ecd071 Fixed #7640 (Preprocessor::getConfigs: -U is not honored) 2016-07-28 19:22:59 +02:00
Daniel Marjamäki 57951a2681 one more fix for rules 2016-07-28 15:35:41 +02:00
Daniel Marjamäki 1a4ef60e7c Fixed #7639 (rule support partially broken since simplecpp was introduced) 2016-07-28 13:40:52 +02:00
PKEuS 3f4fe8f578 Refactorized CheckBufferOverrun:
- Removed redundant code
- Apply non-simplified checking in test suite
2016-07-27 17:28:43 +02:00
PKEuS 13c11b8c1d Fixed compilation with HAVE_RULES 2016-07-26 17:10:05 +02:00
PKEuS eafed235a6 Attempt to fix build on Unix systems, ran AStyle. 2016-07-26 16:50:32 +02:00
PKEuS 9a6569fde1 Always set ErrorMessage::file0 to ensure that the source file that cppcheck is checking when an error occurs can be identified
Removed unused function and unused includes from preprocessor.h/cpp
2016-07-26 16:28:40 +02:00
Dmitry-Me 560e7d618d Get rid of "magic" patterns set
* magic should match "knownPatterns" but it didn't
* two identical sets are of no use
2016-07-26 16:42:17 +03:00
Daniel Marjamäki 71f62950ed Tokenizer::findGarbageCode: Make it less picky about 'UNKNOWN_MACRO if ..' 2016-07-26 14:35:11 +02:00
PKEuS fc1603eb9b MathLib, ValueType: Support integer suffix "i64" 2016-07-26 13:19:53 +02:00
Daniel Marjamäki 7ff9545b10 Fixed #7637 (FP syntax error assignment in switch) 2016-07-26 12:15:55 +02:00
Daniel Marjamäki fd19ab4ed1 fix garbage code handling 2016-07-26 08:50:00 +02:00
Dmitry-Me 2b31afe2ab Variable name consistent with surroundings 2016-07-26 09:46:50 +03:00
Daniel Marjamäki 383b815cca Tokenizer: refactoring garbage code handling 2016-07-26 08:16:10 +02:00
Matthias Krüger 6fd8edd6e5 Symboldatabase::sizeOfType: fix crash; fixes #7615 2016-07-26 01:18:47 +02:00
PKEuS 045116f797 Optimized SymbolDatabase::findVariableType(). 2016-07-25 18:33:22 +02:00
Dmitry-Me 64360d291d Variable name consistent with surroundings 2016-07-25 17:04:18 +03:00
Daniel Marjamäki 2feb86a6af Preprocessor: set platform info 2016-07-25 14:52:23 +02:00
Daniel Marjamäki 90faa80590 Preprocessor: Cleanup unused functions 2016-07-25 14:29:02 +02:00
Daniel Marjamäki 7ef02a7469 Cleanup Tokenizer 2016-07-25 12:12:11 +02:00
Daniel Marjamäki adf16fae8b Remove handling of ##, __FILE__, __LINE__ from tokenizer 2016-07-25 07:58:03 +02:00
Daniel Marjamäki 0767284ca1 Fixed #7630 (FP: dead store, modifying array, index var modified) 2016-07-25 07:35:33 +02:00
Daniel Marjamäki cd3818088f Remove unused function Tokenizer::tokenizeCondition 2016-07-24 14:37:43 +02:00
Daniel Marjamäki e9fef003ac Preprocessor: refactoring directives, they are now only set once for each file 2016-07-24 14:02:21 +02:00
Daniel Marjamäki 48fc19b34c Remove unused function Preprocessor::preprocessCleanupDirectives() 2016-07-24 12:51:52 +02:00
PKEuS 2e2800f5bd Fixed several MSVC warnings 2016-07-24 12:36:36 +02:00
PKEuS f44d9d5c9b Optimizations in CheckInternal:
- Run checks only on executable scopes
- Simplified patterns
2016-07-24 12:05:58 +02:00
Daniel Marjamäki f931c0cf2b Preprocessor::getConfigs: Handle invalid #else better 2016-07-23 14:40:01 +02:00
Daniel Marjamäki ed4a47de45 Tokenizer: Improve syntax checking of switch,if,while 2016-07-22 16:54:24 +02:00
Dmitry-Me 224e55780e Add const where const access is enough 2016-07-22 15:35:07 +03:00
PKEuS 12e3cf584c Visual Studio solution:
- Fixed include paths
- Export simplecpp to cppcheck-core.dll
- Added /Zc:rvalueCast
2016-07-21 20:38:58 +02:00
Daniel Marjamäki 99307846cf Preprocessor: simplecpp optimisations 2016-07-21 19:42:26 +02:00
Daniel Marjamäki 79ac409c7d Preprocessor: Refactoring Preprocessor::getConfigs() 2016-07-21 19:11:49 +02:00
Daniel Marjamäki b2f1b95e38 Bump simplecpp. Preprocessor: Warn about missing includes 2016-07-21 12:47:00 +02:00
Daniel Marjamäki 9899e81f2e handle inline suppressions in included files 2016-07-21 07:57:23 +02:00
Daniel Marjamäki e16f0e500c Preprocessor: Parse comments and then remove them 2016-07-21 07:48:17 +02:00
Daniel Marjamäki 8a1936d5c9 update AdditionalIncludeDirectories in vcxproj files 2016-07-20 22:17:23 +02:00
Daniel Marjamäki 4ceba79f7f Replace std::to_string, to hopefully make appveyor happier 2016-07-20 20:43:32 +02:00
Daniel Marjamäki f1839ebfaf Preprocessor: Fix crashes for invalid code 2016-07-20 20:39:03 +02:00
Daniel Marjamäki 03d2829fb9 Merge simplecpp branch 2016-07-20 12:21:00 +02:00
Daniel Marjamäki a68da1a725 ValueType: Set valuetype for sizeof argument 2016-07-20 09:39:48 +02:00
Daniel Marjamäki 3eef225b36 Revert preprocessor fix for struct tag macros. There are performance problems. 2016-07-19 18:59:58 +02:00
Matthias Krüger 18d5a7317e fix travis; fix [lib/preprocessor.cpp:2772]: (style) The scope of the variable 'noprescan' can be reduced. 2016-07-19 17:28:31 +02:00
Mavik 3e86c7b637 Fixed #5700 (Defect: False positives due to failure to expand struct tag macros) 2016-07-19 16:52:53 +02:00