Commit Graph

125 Commits

Author SHA1 Message Date
Daniel Marjamäki 216ecd06e1 Fix Cppcheck warning. Make function Preprocessor::readpreprocessor static instead of const. 2014-07-25 12:43:55 +02:00
Daniel Marjamäki 42140b6488 Preprocessor: set error flag when unhandled characters are found so checking can bailout 2014-06-01 11:24:10 +02:00
Daniel Marjamäki 1903d95015 Fixed #5661 (--suppress=missingInclude has no effect) 2014-05-03 19:31:15 +02:00
Alexander Mai b5c580a59e Fix some clang warnings - most related to semantic doxygen errors 2014-04-26 16:17:26 +02:00
Lauri Nurmi 70a67eaf85 Change some more 0 literals into nullptr. 2014-02-16 13:38:50 +02:00
Daniel Marjamäki fd3a8a2a18 Update copyright 2014-02-15 07:45:39 +01:00
Daniel Marjamäki 8c7e3d14aa Fixed #5119 (Preprocessor: Using -D suppresses __cplusplus for C++ files) 2013-11-15 19:21:21 +01:00
Daniel Marjamäki ec3ab74631 Preprocessor: Use set instead of list to track '#pragma once' usage 2013-10-27 10:33:37 +01:00
Daniel Marjamäki 22351a73b1 doxygen: escape #pragma in comment to make doxygen happy. Thanks XhmikosR for the suggestion! 2013-10-25 16:08:19 +02:00
Ettl Martin 9ab6655d85 Fixed #5007 (Same include guard naming) 2013-09-04 20:59:49 +02:00
Daniel Marjamäki a781a83822 Preprocessor: Quicker response for --check-config. No 'normal' code is needed so skip it. 2013-09-01 07:13:48 +02:00
Daniel Marjamäki 342142b783 Fixed #4256 (Preprocessor: '#pragma once' doesn't work properly when using -D) 2013-08-18 18:04:06 +02:00
Daniel Marjamäki ff71c94f6e Fixed #4949 (define symbol used in code => 'Analysis failed' message is written.) 2013-08-12 18:12:49 +02:00
Daniel Marjamäki 44333f316a Added terminate() handling to get quicker response when the user wants to terminate 2013-07-24 13:06:59 +02:00
Daniel Marjamki 4e09b06bc1 Fixed #4827 (allow checking multiple configurations when using -D by also using --max-configs or --force) 2013-06-08 16:46:54 +02:00
Daniel Marjamäki 9eac4489ac Fixed #4838 (False positive for ... seems to be invalid) 2013-06-06 12:44:19 +02:00
Alexander Mai 59d636742e Fixed #4594 (Analyzing errors about system headers not being found) 2013-03-13 06:48:33 +01:00
Andrew C. Martin bd0d9b9639 fix misspellings & gcc v3.4.6 warnings
1.  fix typos / misspellings
 - Fix misspelling within comments, variable/function names, stdout messages
 - changes the name of an error code: ```stlBoundries``` changed to ```stlBoundaries```.  Alias old name (```stlBoundries```) to the new one.

2.  fix gcc v3.4.6 32bit & 64bit warnings

 - fixes gcc v3.4.6 warnings, except for those in tinyxml and "-Wmissing-declarations" makefile warnings
 - in Preprocessor::handleIncludes(), replace a ```vector <bool>``` with ```stack<bool>``` (see ```vector<bool>``` warning below).
   - this is the only ```vector<bool>``` in the codebase
 - ```vector <bool>``` is actually a case of template specialization, and is not recommended, according to the following links:

http://stackoverflow.com/q/6461487
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2160.html
http://stackoverflow.com/q/670308

 - in the codebase before and after this change, testrunner SEGVs in a number of places on gcc v3.4.6, including ```Check::~Check()```, among others
   - fc42fc95 fixes this particular runtime issue for DJGPP & __sun
2013-02-09 23:43:09 -07:00
Daniel Marjamki d33341a21a Fixed #4502 (Preprocessor: Treat SystemInclude and UserInclude the same) 2013-01-20 14:42:04 +01: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 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
XhmikosR 6e4e3dfbfb lib: tabs to spaces, remove trailing spaces and extra empty lines at the end of files 2012-09-17 13:51:23 +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 dc6c3228d7 Fixed #3834 (Preprocessor: -U doesn't work) 2012-07-18 20:57:00 +02:00
Daniel Marjamäki 17cf24ed34 Fixed #3643 (Preprocessor: Invalid configuration (macro is used in code)) 2012-07-10 20:29:04 +02: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
Daniel Marjamäki 01ddfb6f80 Fixed #3534 (Broken support for dollar signs in identifiers) 2012-03-27 19:35:41 +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 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 bd8c21fc6b Refactoring: Made Preprocessor::simplifyCondition nonstatic 2012-01-06 08:42:07 +01:00
Daniel Marjamäki 66472b09c0 Refactoring: Made Preprocessor::match_cfg_def nonstatic 2012-01-06 08:15:48 +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
Reijo Tomperi 8cae17fda8 Update year to 2012 2012-01-01 01:05:37 +02:00
Daniel Marjamaki f2199adc3f Preprocessor: Bailout #include if it is recursive 2011-10-30 19:00:11 +01:00
Daniel Marjamaki 9e50b7cb68 Preprocessor: updates to 'normal' preprocessing 2011-10-23 19:17:29 +02:00
Daniel Marjamaki bf0386c938 Preprocessor: Started working on new preprocessing that uses -D information better. Ticket: #2131 2011-10-17 20:12:46 +02:00
Daniel Marjamäki 6f8e42a5af changed the astyle formatting flags 2011-10-13 20:53:06 +02:00
Daniel Marjamäki 07a1222ac6 Preprocessor: fix handling of (1&&2) condition 2011-07-16 09:24:27 +02:00
Daniel Marjamäki 8603919b2d Missing includes - normally just report that there are missing includes. The --check-includes can then be used to check what missing includes there are. Ticket: #2719 2011-05-02 14:58:16 +02:00
Daniel Marjamäki 0dbf5c6151 fixed doxygen warnings about undocumented function parameters 2011-03-31 19:16:43 +02:00
Stefan Weil 675e63b6a7 Spell checks 2011-03-30 16:45:31 +02:00
Daniel Marjamäki ab2bf0ee0c Fixed #2575 (false positive: Preprocessor does not ignore #include within #if 0 block) 2011-02-26 10:04:38 -08:00
Daniel Marjamäki 227a6100f7 astyle formatting 2011-02-11 19:31:37 +01:00
Erik Lax b3e8ef9d48 Fixed #2559 (Refactoring Preprocessor::read) 2011-02-11 06:30:42 +01:00
Reijo Tomperi 226b605774 Change year 2010 -> 2011 in license texts. 2011-01-09 21:33:36 +02:00
Daniel Marjamäki a7835c4054 Preprocessor: Reverted fix for #2131, it didn't work well so a better fix is needed 2011-01-06 20:01:09 +01:00
Daniel Marjamäki 38e7209d26 Fixed #2373 (Using XML2 in --errorlist output) 2010-12-29 12:43:29 +01:00
vBm 46a11183a5 Fixed some spelling mistakes 2010-12-15 18:45:53 +01:00
Daniel Marjamäki 66f0948395 Preprocessor: Don't include system headers twice. 2010-12-02 18:07:32 +01:00
Daniel Marjamäki 71ea6213d0 Fixed #2131 (Preprocessor: incorrect include file loading) 2010-11-14 08:35:32 +01:00
Robert Reif aae2986361 Fixed #2042 (#error messages should be displayed when user defines are used) 2010-09-12 21:30:47 +02:00
Daniel Marjamäki f490ebcf88 Fixed #1872 (Confused -v switch) 2010-09-03 13:30:49 +02:00
Daniel Marjamäki 290d02780f gcc: Fixed some compiler warnings when using -Wsign-conversion. Ticket: #1487 2010-08-06 19:38:21 +02:00
Daniel Marjamäki 0c65796984 Refactoring: Cleanup headers using checkheaders 2010-07-24 22:12:56 +02:00
Daniel Marjamäki 5e0a4a173a Refactoring: The preprocessor will report errors instead of throwing exceptions. Ticket: #1866 2010-07-23 13:54:52 +02:00
Kimmo Varis 9d29ee6edd Use enum for header file types 2010-07-21 12:58:30 +03:00
firewave 43dd749cc6 Fix #1585 (--append doesn't work with TAB formating) 2010-04-15 22:45:38 +02:00
Reijo Tomperi 35d2a27b9c Update copyright year in all source files 2010-04-13 22:23:17 +03:00
Reijo Tomperi 6dc3860ae9 Fix more -Wshadow compile warnings 2010-04-09 22:40:37 +03:00
Daniel Marjamäki 7bcb7897e4 doxygen: fixed error messages 2010-03-14 07:48:44 +01:00
Daniel Marjamäki e4a45aefe2 doxygen: fixed warning messages 2010-03-13 22:16:06 +01:00
Daniel Marjamäki bc5800004b wrote comments about the preprocessor 2010-01-13 21:50:44 +01:00
Daniel Marjamäki 829a4f8453 Fixed #1084 (define configuration lost) 2009-12-13 17:18:27 +01:00
Daniel Marjamäki 418d93eafb Preprocessor: Refactoring the Preprocessor::expandMacros 2009-12-09 17:13:48 +01:00
Daniel Marjamäki 3c063bfdb8 Preprocessor: Reverted refactoring 2009-12-06 20:10:10 +01:00
Daniel Marjamäki 046db9b2bb Preprocessor: Fix so the unit tests work again 2009-12-06 19:53:17 +01:00
Daniel Marjamäki bbc63b6b5b twistedwave: Fixed #1055 (Support for inline suppressions) 2009-12-06 19:38:53 +01:00
Daniel Marjamäki 46b19e0184 Preprocessor: Refactoring to make it simpler 2009-12-06 19:17:59 +01:00
Daniel Marjamäki 092f64b77a Fixed #982 (Preprocessor: detects and remove conditions which always true) 2009-11-21 19:53:07 +01:00
Daniel Marjamäki 7890589693 Fixed #912 (### Unlogged error at Tokenizer::syntaxError: Invalid number of character (()) 2009-11-20 19:18:57 +01:00
Daniel Marjamäki 09859c1019 refactoring the folder structure 2009-10-25 12:49:06 +01:00