Commit Graph

278 Commits

Author SHA1 Message Date
PKEuS 4cd96158ae Fixed parsing of "__asm__ volatile {""};" 2012-11-04 12:21:34 +01:00
Daniel Marjamäki 24e71c479c Fixed #4301 (htmlreport broken) 2012-11-03 11:25:40 +01:00
Edoardo Prezioso b50e1f4451 Attempt to fix all doxygen warnings. 2012-10-24 01:32:07 +02:00
Daniel Marjamäki c65ac603e9 Fixed #3837 (False positive: national locale inline asm comments are reported as unsupported) 2012-09-30 09:35:32 +02:00
PKEuS 547d3e94b2 Fixed some sign conversion messages from clang. 2012-09-16 16:41:15 +02:00
Daniel Marjamäki bd734a9610 Fixed #3684 (Preprocessor: #include handling is searching directories in the wrong order) 2012-09-15 12:53:11 +02:00
Kamil Dudka b4d78e3d05 Fixed #3651 (Preprocessor: Wrong handling of #elif) 2012-09-15 09:34:41 +02:00
Daniel Marjamäki 329f672334 Preprocessor: Added TODO in code. How can userDefines be empty? It is an inner condition and the outer condition checks that it's not empty. 2012-09-15 08:13:52 +02:00
Daniel Marjamäki 6ebfbf42e1 Fixed #4191 (wrong syntax error if 'error' substring of stringification) 2012-09-12 16:10:45 +02:00
PKEuS 50f9dd52ab Used enum instead of string in implementation for '--language='. 2012-09-11 08:53:27 +02:00
PKEuS 87131f6105 Added new cmdline option --language= (alias of GCC-like -x) to enforce a specific language. Valid values: c, c++, java, c#. (#3994) 2012-09-10 18:51:32 +02:00
PKEuS 8c70778b70 Refactorization: Fixed several messages when self-checking cppcheck 2012-09-04 15:29:51 +02:00
Daniel Marjamäki 769cd4503d Preprocessor: Made function static after self-check suggestion 2012-09-01 10:32:27 +02:00
Daniel Marjamäki 41797d409d Fixed #4036 (cppcheck hangs with 100% cpu load) 2012-08-25 13:24:17 +02:00
PKEuS f238f3fad5 Support sizeof in preprocessor directives
Applied "patch" provided by michaeln123 in #4071
2012-08-22 17:28:06 +02:00
Daniel Marjamäki 79c84029fb Preprocessor: Reduce simplifyVarMap usage to make Cppcheck a bit faster 2012-07-27 12:30:43 +02:00
PKEuS f5e5d59562 Refactorizations:
- Removed redundant newlines at the end of test cases
- Make use of STL algorithms instead of own implementations of std::replace and std::remove+string::erase
- Removed unused variable (found by cppcheck)
- Prefer postfix increment (found by cppcheck)
2012-07-24 12:21:05 -07:00
Daniel Marjamäki dc6c3228d7 Fixed #3834 (Preprocessor: -U doesn't work) 2012-07-18 20:57:00 +02:00
Daniel Marjamäki 5645269bbf Preprocessor: Made proper fix for #3690 2012-07-13 11:36:02 +02:00
Daniel Marjamäki e4ad193b40 Fixed #3690 (CppCheck is stuck on evaluating false preprocessor expression( = 0)) 2012-07-13 11:28:45 +02:00
Daniel Marjamäki 8dd5270be3 Preprocessor: skip preprocessor directives in the Preprocessor::validateCfg function 2012-07-11 21:20:31 +02:00
Daniel Marjamäki 4f4be79f20 Preprocessor: Fixed bugs in my #3643 fix 2012-07-11 18:29:33 +02:00
Daniel Marjamäki 17cf24ed34 Fixed #3643 (Preprocessor: Invalid configuration (macro is used in code)) 2012-07-10 20:29:04 +02:00
Edoardo Prezioso fae40c4782 Change every C version of 'size_t' to C++ 'std::size_t'. 2012-07-09 13:30:18 +02:00
Edoardo Prezioso 3c4ce7b43a Fixed (for real) the preprocessor.cpp(1166) warning in #2123. 2012-07-06 13:17:08 +02:00
Edoardo Prezioso 1ad56a25c6 Fixed the preprocessor.cpp(1166) warning in #2123. 2012-06-26 12:28:52 +02:00
Daniel Marjamäki 956a37a382 Fixed compiler errors 2012-06-20 17:39:31 +02:00
Kimmo Varis 68c52ddd69 Refactoring information messages.
Currently the information severity messages are outputted as error
messages with Severity::Information. This causes constant confusion
as people think it as mildest error severity (and rightfully so).
When it was meant to be for printing messages about the checking
procedure itself (like missing header files etc).

So I'm adding a new function for the ErrorLogger for printing these
informative messages. This makes clear the distinction of errors
found from the code and messages related to the checking itself.
It also makes it easier for clients to handle these separately.
2012-06-19 00:16:20 +03:00
Daniel Marjamäki 171f570639 Handle UTF-16 files. Partial fix for ticket #2083 2012-06-10 11:00:27 +02:00
PKEuS 279b0c59bb Don't set Preprocessor::missingIncludeFlag if missingInclude warning is suppressed (#3487). 2012-05-16 02:59:45 -07:00
Edoardo Prezioso eacf74be8d Changed the order of some structures in order to improve, even if for a bit, their padding. 2012-05-14 20:49:03 +02:00
Daniel Marjamäki dad2fb6db1 Fixed #3737 (Preprocessor: __cplusplus always defined for c++ code) 2012-05-08 11:49:43 -07:00
PKEuS 1a5fbd61d2 Splitted class TokenList from Tokenizer 2012-05-05 09:33:26 -07:00
Daniel Marjamäki 005ce81689 Fixed #3640 (False positive: statement begins with numeric code) 2012-05-04 17:53:47 +02:00
Ahti Legonkov 79af6f65d7 Fixed #3699 (cppcheck hangs with 100% cpu load on parsing preprocessor code) 2012-04-22 06:49:42 +02:00
PKEuS 25167b58a9 Implemented #2990: Print relative paths if -rp or --relative-paths is given 2012-04-06 10:49:21 +02:00
Daniel Marjamäki 01ddfb6f80 Fixed #3534 (Broken support for dollar signs in identifiers) 2012-03-27 19:35:41 +02:00
Ahti Legonkov 780481e82a Fixed ticket #3675. 2012-03-23 01:45:47 +02:00
Daniel Marjamäki fc84f55f80 Fixed #3536 (Preprocessor #if fails to correctly compare two #defined values) 2012-03-15 20:04:34 +01:00
Daniel Marjamäki db1205cdb3 Preprocessor: better handling of '#if A==1' 2012-02-29 19:08:01 +01:00
Daniel Marjamaki fbb5ebe3c6 Fixed #3577 (Preprocessor: Defines given on command line are not used in the code) 2012-02-05 20:48:28 +01:00
Daniel Marjamäki 8e2c40b4b3 Fixed #3323 (#undef needs different handling) 2012-01-24 07:43:26 +01:00
Ahti Legonkov 78461093f0 Fixed #3531 (When macro definition contains parenthesis, the #defined symbol does not get #defined.) 2012-01-21 12:51:54 +01:00
seb777 9be2d1cc62 It is a good practice to clear container after deleted all the items 2012-01-19 12:41:14 +01:00
Daniel Marjamäki bd8c21fc6b Refactoring: Made Preprocessor::simplifyCondition nonstatic 2012-01-06 08:42:07 +01:00
Daniel Marjamäki e4875178fa Refactoring: Removed redundant settings parameter for Preprocessor::removeComments 2012-01-06 08:09:53 +01:00
Daniel Marjamäki 94d220e370 Refactoring: Made Preprocessor::getcode nonstatic 2012-01-06 08:01:50 +01:00
Daniel Marjamäki 07776e90ad Preprocessor: cleanup 2012-01-05 18:37:15 +01:00
PKEuS 9c423b82c1 Refactorizations in preprocessor.cpp 2012-01-02 15:52:19 +01:00
PKEuS 38ddcde7b0 - Refactorizations in preprocessor.cpp and tokenizer.cpp
- Bugfix: tok->stringify(tok) returns now "".
- Removed most of the inline-asm handling in preprocessor; improved the remaining handling of #asm/#endasm: Simplified to "asm(...);" statement
2012-01-02 12:58:34 +01:00