Commit Graph

401 Commits

Author SHA1 Message Date
Daniel Marjamäki bbb5bfd432 Preprocessor: Test case has been moved to simplecpp 2019-05-03 19:27:08 +02:00
Daniel Marjamäki bd7790fd8c Update copyright year 2019-02-09 07:24:06 +01:00
Daniel Marjamäki 8dd641b8be Use OVERRIDE in test 2019-01-12 15:45:25 +01:00
PKEuS 86a1b84b0c Fixed handling of macros with known value defined in header file in configuration splitting (#8404)
Added proper unit test for configuration validation to ensure that it actually works when cppcheck is executed
2018-10-08 16:38:47 +02:00
Daniel Marjamäki 45379a3aa6 Updated copyright year for modified files
[ci skip]
2018-06-10 22:07:21 +02:00
orbitcowboy 976e9e2544 Cleared -Wshadow warnings. 2018-05-29 11:54:07 +02:00
IOBYTE ce50df8047 Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
Daniel Marjamäki 6bd4bdb0f9 Updated 'noValidConfiguration' message. It should not write this message when there is no code. It should be possible to see the preprocessor errors otherwise it is hard to fix the configuration. 2018-05-15 15:42:54 +02:00
PKEuS bbfcccf078 Refactorization: Replace several push_back-sequences by initializer lists 2018-04-09 09:41:24 +02:00
Daniel Marjamäki c4caee6b18 Updated copyright year 2018-01-14 15:37:52 +01:00
Ayaz Salikhov 28aa939d69 iwyu - include what you use 2017-05-27 04:33:47 +02:00
Daniel Marjamäki 099b4435c3 Fixed #8074 (Preprocessor::getConfigs: wrong configuration extracted 'A;B;;') 2017-05-24 11:16:41 +02:00
Daniel Marjamäki 899615c1e4 update simplecpp includes
[ci skip]
2017-05-18 22:26:07 +02:00
Daniel Marjamäki 1f4b84379d Fix for #pragma asm 2017-05-17 21:58:46 +02:00
Daniel Marjamäki 67e3187653 Preprocessor: Refactor handling of #pragma asm 2017-05-17 10:25:37 +02:00
Daniel Marjamäki e72ec4282d Fixed #7842 (Preprocessor::getConfigs: #error in #ifndef not handled well) 2017-04-22 12:44:57 +02:00
Daniel Marjamäki d403a6a883 Preprocessor::getConfigs: Remove bad configurations when #error is seen 2017-04-02 12:15:53 +02:00
Daniel Marjamäki 7eb95aac2a Preprocessor::getConfigs: Handle #error in '#if !A' better 2017-04-02 10:06:39 +02:00
Daniel Marjamäki edd1c32e5b Preprocessor::getConfigs: Better handling of ! in #if 2017-04-02 09:03:43 +02:00
Daniel Marjamäki 865588950a Preprocessor: quick fix for #7939 2017-03-22 10:53:21 +01:00
Simon Martin 43e4364675 Ticket #7912: Properly preprocess files with decreasing line numbers, due to #line directives. 2017-03-05 16:46:43 +01:00
Matthias Krüger 064a4aa4cc improve constness of functions as per cppchecks suggestions. 2017-01-07 14:31:03 +01:00
PKEuS cfac3b457d Several small refactorizations 2016-12-06 22:12:02 +01:00
Daniel Marjamäki 9c69546d72 Fixed #7842 (Preprocessor::getConfigs: #error in #ifndef not handled well) 2016-12-03 11:59:48 +01:00
Daniel Marjamäki b04f6fb359 bump simplecpp to rev d1c995c03515d289c7aa7246a74d666fd012c4eb 2016-11-10 20:04:05 +01:00
Miika-Petteri Matikainen 26816ed954 Fixes preprocessor regression causing hang
Cppcheck 1.76 introduced a regression in preprocessor which causes
the following code to hang:

    $ cat > test.c << EOF
    #ifndef Y
    #else
    #endif
    EOF
    $ cppcheck -D BAR --force test.c
    Checking test.c ...
    ^C

This used to work with version 1.75. Git bisect reveals that this
regression was caused by commit:
ff036c8742

This commit fixes the regression by avoiding infinite loop in
hasDefine(). If cfg is empty string "", we can skip the whole loop
and exit early.
2016-10-11 19:56:13 +03:00
Daniel Marjamäki b97bdb5300 bump simplecpp to rev b50ced8ac14f8debab9e85e78036f881ff2b3965 2016-09-03 12:29:45 +02:00
Daniel Marjamäki d9ebdc6a10 Preprocessor: fix handling of -U in Preprocessor::getConfigs() 2016-08-21 15:01:04 +02:00
Daniel Marjamäki ff036c8742 Fixed #7700 (Using -D to force a configuration still checks the configuration as well as configurations that are not relevant) 2016-08-21 13:53:44 +02:00
Daniel Marjamäki d982dc5ffe TestPreprocessor: Refactoring 2016-08-21 08:06:20 +02:00
Daniel Marjamäki 363605906f Fixed #7695 (Running with -U_WIN32 still checks related configurations) 2016-08-21 07:45:15 +02:00
Daniel Marjamäki b86c2689b3 TestPreprocessor: Fix output 2016-08-06 13:28:24 +02:00
Daniel Marjamäki cbfeae0ff7 bump simplecpp 2016-08-04 22:53:10 +02:00
Daniel Marjamäki 695b1f0ef3 Fixed #5692 (Preprocessor: ifdef symbol used indirectly in code leads to 'analysis failed') 2016-08-01 20:09:41 +02:00
Daniel Marjamäki d89a646ed9 TestPreprocessor refactorings 2016-07-30 20:22:07 +02:00
Daniel Marjamäki 0777ecd071 Fixed #7640 (Preprocessor::getConfigs: -U is not honored) 2016-07-28 19:22:59 +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
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 e9fef003ac Preprocessor: refactoring directives, they are now only set once for each file 2016-07-24 14:02:21 +02:00
Daniel Marjamäki 99307846cf Preprocessor: simplecpp optimisations 2016-07-21 19:42:26 +02:00
Daniel Marjamäki e16f0e500c Preprocessor: Parse comments and then remove them 2016-07-21 07:48:17 +02:00
Daniel Marjamäki 03d2829fb9 Merge simplecpp branch 2016-07-20 12:21:00 +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
Mavik 3e86c7b637 Fixed #5700 (Defect: False positives due to failure to expand struct tag macros) 2016-07-19 16:52:53 +02:00
Daniel Marjamäki a87b4368cb Revert "Preprocessor: Start replacing our Preprocessor code with simplecpp"
This reverts commit 9820783b60.

There was Travis errors I'll need to look more at.
2016-07-07 23:45:42 +02:00
Daniel Marjamäki 9820783b60 Preprocessor: Start replacing our Preprocessor code with simplecpp 2016-07-07 22:58:56 +02:00
Simon Martin 3095f47a7b Ticket #7137: Properly detect C++14 digit separators. (#802)
Add an optional extended description…
2016-06-04 22:55:55 +02:00
Daniel Marjamäki 2b2f12bcd5 Fixed #6758 (Preprocessor: handle #__VA_ARGS__) 2016-05-28 11:27:45 +02:00
Daniel Marjamäki c5c376513b Fixed #7102 (Preprocessor: skip __cplusplus sections in headers when .c file is checked) 2016-02-29 07:34:06 +01:00