Commit Graph

81 Commits

Author SHA1 Message Date
Matthias Krüger 064a4aa4cc improve constness of functions as per cppchecks suggestions. 2017-01-07 14:31:03 +01:00
Robert Reif eca805ba3b ValueFlow: Fixed constant folding of sizeof(enum) and sizeof(enumerator) (#7564) 2016-07-08 20:39:34 +02:00
Lauri Nurmi 996c9244d8 Update copyright year to 2007-2016. 2016-01-01 15:34:45 +02:00
Alexander Mai 5b6758b03b Add some debugging code (inspired by #6021) 2015-12-27 17:38:15 +01:00
Alexander Mai 5b2dacb4b4 Correct travis and compiler warnings and comments 2015-12-12 16:08:52 +01:00
Alexander Mai 9a847d7b14 #7208 Cppcheck hangs with 100% CPU load in CheckOther::checkNegativeBitwiseShift (invalidcode). TokenList::validateAst() is running consistency checks on AST 2015-12-12 15:39:38 +01:00
Daniel Marjamäki 0f9d90d2be Changed Copyrights. Removed my name. 2015-11-18 20:04:50 +01:00
Philipp Kloke a837cc48e0 Refactorization: Simplified code in tokenlist.cpp, token.cpp and testthreadexecutor.cpp 2015-10-19 09:01:20 +02:00
PKEuS b7f2f826a4 Refactorization: Removed some redundant code 2015-10-07 18:40:04 +02:00
Jakub Melka b7d92a4fc7 Fixed warnings of CppCheck's own code (caused by new check #695) 2015-03-08 18:18:09 +01:00
orbitcowboy 5a8574cc05 tokenlist::createAst(); should not be const. 2015-01-20 11:22:22 +01:00
orbitcowboy bf1565bd34 Fixed inconclusive warnings regarding const correctness. 2015-01-20 09:09:16 +01:00
Daniel Marjamäki ff11ba9847 Updated copyright year to 2015 2015-01-03 12:14:58 +01:00
Daniel Marjamäki 051d42ae6b astyle formatting 2014-11-20 14:20:09 +01:00
orbitcowboy f5d804f71a running astyle 2014-11-20 10:13:03 +01:00
PKEuS bf2f76e70c Detect and purge duplicate configurations by calculating a checksum. 2014-09-02 22:35:52 +02:00
PKEuS ec1bd420a7 Refactorizations optimizing std::string usage:
1) Added global static const std::string emptyString; object:
-> Replaces some static variables in functions which might be not threadsafe
-> Avoids constructor call (std::string::string(""))
-> Even functions that return an empty string in some branches can return by reference now.
Added to config.h to ensure that it is available everywhere

2) Added overloads for TestFixture::assertEquals for the most common use cases:
-> Moves conversion from const char[] to std::string into a function, reducing code duplication in binary.
2014-06-26 11:51:02 +02:00
PKEuS 1b5d127373 Cache results for TokenList::isC() and TokenList::isCPP() to avoid redundant calls to Path::isCPP()/isC(), which perform slow string operations (conversion to lowercase, substring, comparisons)
-> Speedup of 2% on self-checking cppcheck-core (MSVC12, x64, not matchcompiled)
2014-06-24 17:42:39 +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
Frank Zingsheim 5e0a575091 Optimization: tokenlist::addtoken 2014-03-09 17:54:49 +01:00
Daniel Marjamäki fd3a8a2a18 Update copyright 2014-02-15 07:45:39 +01:00
Kamil Dudka dee18d10a8 Fixed #5423 (fix parsing of #line NNNN "file.c") 2014-01-28 17:15:07 +01:00
Daniel Marjamäki de29991c11 AST: Rewrite using standard approach 2013-11-04 11:26:16 +01:00
Ettl Martin 9ab6655d85 Fixed #5007 (Same include guard naming) 2013-09-04 20:59:49 +02:00
Daniel Marjamäki e3dd51dd2b Fixed Cppcheck warning. Method TokenList::createAst can be const 2013-06-01 15:04:37 +02:00
PKEuS 14feaa8d39 Refactorizations:
- Fixed lots of cppcheck messages about functions that can be const or static
- Fixed possible nullpointer dereference message in symboldatabase.cpp
- Replaced tokAt(+-1) by next()/previous()
2013-03-12 07:42:00 -07:00
Reijo Tomperi 5d5f7085bf Updating year 2012 -> 2013 to .cpp and .h files and man page. 2013-01-01 18:29:08 +02:00
Daniel Marjamäki fa8e5cd7d8 AST: Simple AST. Not used in the clients. Only part of the testing for now. 2012-12-15 20:21:09 +01:00
Reijo Tomperi 7ddd564ad6 Change file encoding to UFT-8 like it is for other files. 2012-08-26 00:12:38 +03:00
PKEuS 4b80e91145 Implemented support for building cppcheck lib into a dll
Updated VS9 solution
New VS10 solution that builds cppcheck into a dll used by cli and testrunner.
Functional changes and advantages of new solution:
- Share code between testrunner and cli; ability to share code with gui as well (not yet implemented)
- Files of /lib are no longer compiled twice (should improve build time on single core machines)
- Added configuration for building with PCRE support
- Executables are build into /bin (/bin/debug in debug mode) folder (Should no longer require rebuild when switching between debug and release)
- Completely x64 compatible (contains also x64-debug configuration now)
2012-06-10 05:19:09 -07:00
PKEuS 1a5fbd61d2 Splitted class TokenList from Tokenizer 2012-05-05 09:33:26 -07:00