Greg Hewgill
8c245cfd2f
switchCaseFallThrough is now a coding style check (ticket #2623 )
2011-03-06 09:43:27 +13:00
Greg Hewgill
e12ae654a8
Support a few more common styles of "fall through" comment
2011-03-05 18:02:38 +13:00
Greg Hewgill
cc7e05a5b0
fix case where fall through comment precedes preprocessor line
2011-03-05 00:45:58 +13:00
Greg Hewgill
1a606a57fd
slightly more flexible detection of 'fall through' comment
2011-03-05 00:45:58 +13:00
Greg Hewgill
610d2efaea
recognise fall through in c style comments
2011-03-05 00:45:58 +13:00
Greg Hewgill
93ea774484
initial simplistic implementation of switchCaseFallThrough
2011-03-05 00:45:57 +13:00
Greg Hewgill
2efb2efaca
refactor #if 0 handling to leave preprocessor statements alone
2011-03-01 20:04:11 +13:00
Greg Hewgill
a331516735
handle #if (0) after removing parentheses
2011-03-01 19:50:17 +13:00
Greg Hewgill
31c56d7353
handle embedded whitespace in #if 0 processing
2011-03-01 19:32:47 +13:00
Daniel Marjamäki
96c85104ab
astyle formatting
2011-02-26 20:09:14 +01: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
32a49235e3
Fixed #2578 (Preprocessor does not correctly handle #define A 0 / #if A)
2011-02-23 13:08:24 -08:00
Daniel Marjamäki
9983aa5721
Fixed #2605 (cppcheck hangs with 100% cpu load ( #define = ))
2011-02-22 19:55:02 +01:00
Daniel Marjamäki
c52704e636
astyle formatting
2011-02-20 21:00:03 +01:00
Daniel Marjamäki
c3fba356c0
Fixed #2563 (#if equality testing does not ignore parentheses)
2011-02-20 20:57:28 +01:00
Greg Hewgill
98ab34b2b5
Support cppcheck-suppression in C style comments
2011-02-20 11:44:42 +13:00
Ettl Martin
d2a1d3f14a
fixed pre/post increment warings, found during selfcheck
2011-02-13 23:57:07 +01:00
Daniel Marjamäki
227a6100f7
astyle formatting
2011-02-11 19:31:37 +01:00
Greg Hewgill
f2f2d1f885
Fixed #2571 (Preprocessor: better handling for #undef)
2011-02-11 18:51:22 +01:00
Greg Hewgill
751f8d46e5
Fixed #2570 (Preprocessor: #define parsing when there is no whitespace between a macro symbol and its double-quoted string expansion)
2011-02-11 18:01:27 +01:00
Erik Lax
b3e8ef9d48
Fixed #2559 (Refactoring Preprocessor::read)
2011-02-11 06:30:42 +01:00
Daniel Marjamäki
7c9e52546d
Fixed #2552 (preprocessor check XX is already guaranteed to be defined -- too eager?)
2011-02-07 20:26:29 +01:00
Raphael Geissert
8d5863133c
Use Token::simpleMatch where no patterns are used
2011-02-02 13:27:01 -06:00
Raphael Geissert
386de53ff7
Formatting, sorry
2011-01-30 20:37:37 -06:00
Raphael Geissert
29ca5fbe1e
Minor optimisations to the preprocessor
2011-01-30 18:47:49 -06:00
Raphael Geissert
b4a249f26e
Reduce std::string::find() abuse
2011-01-30 18:40:59 -06:00
Raphael Geissert
66253af1e5
Handle "#endif !defined" conditionals
2011-01-30 17:33:44 -06:00
Raphael Geissert
b944168bdc
Check for cpp conditionals where a define is already guaranteed
2011-01-30 12:47:17 -06:00
Raphael Geissert
49848fd752
Remove duplicated defines
...
After simplifying define(A) conditionals, the final list of
configurations could end up containing duplicate items.
Ticket #1468
2011-01-30 02:13:32 -06:00
Pete Johns
9c300813a4
Fixed gcc warning.
2011-01-17 08:52:26 +11:00
Kimmo Varis
846d3dae99
Accept include paths ending with backslash.
...
Convert include path to use internal path separators when parsing
command line. Convert back to native separators when using paths.
Ticket #2448 (Error in handling -I command line parameter)
2011-01-11 21:04:21 +02:00
Reijo Tomperi
226b605774
Change year 2010 -> 2011 in license texts.
2011-01-09 21:33:36 +02:00
Daniel Marjamäki
d27b6a1598
astyle formatting
2011-01-07 20:48:02 +01:00
Daniel Marjamäki
989e0e7ccb
Preprocessor: fix bug when determining location when there is a missing include. ticket: #2326
2011-01-07 19:48:51 +01: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
2e7e118cb8
Fixed #2392 (Preprocessor: Wrong simplification of __VA_ARGS__)
2011-01-02 11:19:37 +01:00
Daniel Marjamäki
38e7209d26
Fixed #2373 (Using XML2 in --errorlist output)
2010-12-29 12:43:29 +01:00
Daniel Marjamäki
4fd8d2e056
Fixed #2326 (Preprocessor: inline-suppr does not work for id=missingInclude)
2010-12-26 11:14:57 +01:00
Daniel Marjamäki
be46d453c4
Information: Added new severity
2010-12-22 19:53:17 +01:00
Daniel Marjamäki
79ea453913
Preprocessor: Report 'missing system include' with debug severity. temporary solution until the handling of system includes is better.
2010-12-18 14:45:53 +01:00
vBm
46a11183a5
Fixed some spelling mistakes
2010-12-15 18:45:53 +01:00
Daniel Marjamäki
1f1df0645b
Merge branch 'xml2' of github.com:danmar/cppcheck
2010-12-04 14:06:57 +01:00
Daniel Marjamäki
66f0948395
Preprocessor: Don't include system headers twice.
2010-12-02 18:07:32 +01:00
Daniel Marjamäki
af80384ae7
xml2: replace --xml2 with --xmlver=2. Ticket: #2106
2010-12-02 17:32:51 +01:00
Daniel Marjamäki
12c8eeff2c
xml2: Added experimental --xml2 result format. Ticket: #2106
2010-12-01 21:24:17 +01:00
Robert Reif
f12c0c7ada
Tokenizer: add assert(_settings) to Tokenizer to insure the tokenizer always has settings. Ticket: #2219
2010-12-01 18:00:55 +01:00
Daniel Marjamäki
3068dbf22e
Preprocessor: Temporarily skip 'missing include' warnings for system headers in release mode. When the handling works better these messages should not be skipped. Ticket: #1937
2010-11-28 12:38:06 +01:00
Daniel Marjamäki
71ea6213d0
Fixed #2131 (Preprocessor: incorrect include file loading)
2010-11-14 08:35:32 +01:00
Daniel Marjamäki
6836198a5c
system headers: merged the systemheaders branch into master. it works pretty well. Ticket: #1937
2010-11-13 13:06:58 +01:00
Daniel Marjamäki
ba7a3b376e
Fixed #2167 (Drop linefeeds from error messages)
2010-11-11 19:54:43 +01:00
Kimmo Varis
9627b667a1
Move simplifyPath method from FileLister to Path class.
...
simplifyPath() "fits" better to Path class conceptually. It handles
paths, not lists them. Also this way we get rid of few unneeded
dependencies to FileLister class.
2010-10-29 22:21:27 +03:00
Daniel Marjamäki
86e517c5d3
Fixed #1951 (Preprocessor: Compound macro statements not handled correctly)
2010-09-24 21:38:11 +02:00
Daniel Marjamäki
a6ff3681bb
Fixed #1802 (Preprocessor: macros are expanded wrong)
2010-09-18 22:20:01 +02:00
Daniel Marjamäki
ebf13acfbd
Fixed #2032 (inline suppressions fail with comment on the same line as function)
2010-09-15 21:10:54 +02:00
Daniel Marjamäki
de3b9f610a
Fixed #2033 (all inline suppressions fail with relative paths)
2010-09-15 21:03:21 +02:00
Daniel Marjamäki
42d0ad8262
Fixed #2048 (Preprocessor: ifndef incorrectly simplified)
2010-09-14 17:45:37 +02:00
Robert Reif
f2a3267ac7
Preprocessor: Report #error configuration when -D is used. Ticket: #2042
2010-09-14 07:21:19 +02:00
Daniel Marjamäki
b0bb71ee20
Preprocessor: Handle C++0x rawstrings by replacing them with normal strings. Ticket: #2022
2010-09-13 19:36:40 +02:00
Daniel Marjamäki
b1d74ed6b8
Revert "Preprocessor: Report #error configuration when -D is used. Ticket: #2042 "
...
This reverts commit 674644cb29
.
2010-09-13 16:59:43 +02:00
Robert Reif
674644cb29
Preprocessor: Report #error configuration when -D is used. Ticket: #2042
2010-09-13 16:55:40 +02: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
427c0f4bfd
Fixed #1975 (segmentation fault of cppcheck)
2010-09-02 23:01:12 +02:00
Daniel Marjamäki
d45186d645
Added --debug-warnings that we can use to enable various debug warnings
2010-08-27 20:28:00 +02:00
Daniel Marjamäki
1d9e484053
Fixed #1951 (Preprocessor: Compound macro statements not handled correctly)
2010-08-26 21:33:45 +02:00
Ettl Martin
a6be941006
actived Wconversion flag in Makefile and fixed almost all Warnings from gcc-4.4
2010-08-12 19:39:19 +02:00
Daniel Marjamäki
dcf54621d4
visual studio: fixed a few compiler warnings (when saving istream::get result in a char)
2010-08-07 20:33:24 +02:00
Daniel Marjamäki
adc47f1820
Fixed #1487 (fix gcc compiler warnings)
2010-08-06 21:02:43 +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
567f1da4b4
Preprocessor: Compiler dependent parsing of '<backspace><space><newline>'. Maybe it should be possible to control it from the commandline instead. Ticket: #640
2010-08-06 08:50:31 +02:00
Daniel Marjamäki
9edecd4a3f
Added ErrorLogger::reportProgress and removed ErrorLogger::ReportProgress. This will make it easier for GUI and other clients to display progress information.
2010-08-03 16:36:21 +02:00
Daniel Marjamäki
81d7a37b68
Fixed #1864 (Relative Path of #include-File doesn't work)
2010-07-27 18:07:30 +02:00
Daniel Marjamäki
7c5219324e
Refactoring: Cleanup include that checkheaders reported as not needed
2010-07-26 22:05:51 +02:00
Daniel Marjamäki
e358af9018
Refactoring: Report progress when checking takes a long time. Ticket: #1868
2010-07-25 18:19:37 +02:00
Daniel Marjamäki
29b2be19ab
Fixed #1383 (Preprocessor: define - ifndef problem)
2010-07-25 15:19:25 +02:00
Daniel Marjamäki
0c65796984
Refactoring: Cleanup headers using checkheaders
2010-07-24 22:12:56 +02:00
Daniel Marjamäki
3ad8f98c61
Refactoring: Settings::addSuppression return error message and callers make sure it's reported properly. Ticket: #1839
2010-07-23 23: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
b4d55d8e65
Fix path separators for missing include files-message.
2010-07-21 17:00:12 +03:00
Kimmo Varis
618076a65f
Better fix for #1371 .
...
Now handles also system includes. And have couple of tests.
2010-07-21 14:16:42 +03:00
Kimmo Varis
9d29ee6edd
Use enum for header file types
2010-07-21 12:58:30 +03:00
Daniel Marjamäki
3c376047ba
pulled changes from kimmov (filelocation-refactor)
2010-07-19 18:06:49 +02:00
Kimmo Varis
b384aabc52
Fixed #1371 (#include "foo\file.h" -> #include "foo/file.h" should be handled automatically on linux)
...
Linux can't open file paths with / separator. So we'll need to fix
such include file paths (in source files) first.
2010-07-18 20:02:18 +03:00
Kimmo Varis
6db365e6f7
Improve path name handling in ErrorLogger.
...
This commit adds setfile() method to FileLocation class. The setfile
method converts in Windows path separators to internally used Unix
separators. And getfile() converts path separators back to Windows
separators. This fixes bugs that error reports had mixed path
separators in paths.
2010-07-17 01:27:40 +03:00
Kimmo Varis
ad0394939a
Refactor ErrorMessage constructor to take Severity::SeverityType.
...
This removes lots of unneeded casting as everybody now uses the
Severity::SeverityType.
2010-07-14 23:11:32 +03:00
Kimmo Varis
5f8af2e1e8
Refactor ErrorMessage's severity to Severity::SeverityType.
2010-07-14 21:12:39 +03:00
Daniel Marjamäki
54b8e79cae
Preprocessor: Reduce copy/pasted code
2010-06-20 18:41:45 +02:00
Nicolás Alvarez
c76a9525c1
Change size-t to std::string::size_type.
2010-06-19 17:24:10 -03:00
Nicolás Alvarez
12d6947334
Fix build error on 64-bit systems.
2010-06-19 17:16:14 -03:00
Daniel Marjamäki
a402b6bb98
Fixed #1802 (Preprocessor: macros are expanded wrong)
2010-06-19 12:03:39 +02:00
Daniel Marjamäki
38c3de7343
Preprocessor: Refactoring. Broke out code that parses out the parameters from code.
2010-06-19 09:09:47 +02:00
Robert Reif
a8921afcd7
Fixed #1698 (Add define support to GUI)
2010-05-21 09:49:57 +02:00
firewave
43dd749cc6
Fix #1585 (--append doesn't work with TAB formating)
2010-04-15 22:45:38 +02:00
Reijo Tomperi
15e4b8dbd5
Fix #1595 (case marks improperly tokenized with macro)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1595
2010-04-15 23:21:00 +03:00
Daniel Marjamäki
c718a7c595
astyle: Update to astyle 1.24
2010-04-15 20:08:51 +02:00
Zachary Blair
2e276576a4
Fixed #1526 (Cppcheck checks redundant configurations)
2010-04-15 18:37:51 +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
0cad22314e
Reverted 'astyle fix'. Those changes are not in sync with my astyle configuration/setup.
2010-04-02 07:30:58 +02:00
Martin Ettl
193aa7d1d3
astyle fix
2010-04-02 02:21:53 +02:00