Commit Graph

119 Commits

Author SHA1 Message Date
Daniel Marjamäki 67eb54c4c0 Merge branch 'abc' 2009-04-27 21:29:29 +02:00
Daniel Marjamäki b49997e69d bail out instead of crash when parsing unicode code (#207) 2009-04-27 21:29:03 +02:00
Reijo Tomperi d8f6636673 Improve fix to ticket #261: Allow macro definition to have uncoupled double quote.
http://apps.sourceforge.net/trac/cppcheck/ticket/261
2009-04-26 22:19:08 +03:00
Daniel Marjamäki 7b58e09a07 Preprocessor: Report correct file and line in message 'No pair for character..' (#261) 2009-04-26 11:05:32 +02:00
Reijo Tomperi 051f2929b5 Fix ticket #244 (Headers from included file are searched from wrong path)
http://apps.sourceforge.net/trac/cppcheck/ticket/244
2009-04-05 21:14:02 +03:00
Reijo Tomperi 7a11f0e61f Fix ticket #242 (Preprocessor: Bail out on failure instead of terminating the program)
http://apps.sourceforge.net/trac/cppcheck/ticket/242
2009-04-03 22:09:12 +03:00
Reijo Tomperi ca055dc830 Fix ticket #191 (semicolon after #endif stop tokenizing of function)
http://apps.sourceforge.net/trac/cppcheck/ticket/191
2009-03-18 01:10:26 +02:00
Reijo Tomperi c413c8d4b3 Fix ticket #179 (preprocessor issues)
http://apps.sourceforge.net/trac/cppcheck/ticket/179
2009-03-16 23:20:55 +02:00
Reijo Tomperi bb3316a45b Fix ticket #181 (#pragma causes wrong line numbers)
http://apps.sourceforge.net/trac/cppcheck/ticket/181
2009-03-15 14:23:12 +02:00
Daniel Marjamäki cd54a0ed3b Fixed ticket 147 (Invalid line number for error message) 2009-03-09 20:29:25 +01:00
Reijo Tomperi 765da17132 Astyle fix 2009-03-08 09:49:04 +02:00
Reijo Tomperi 5be85d71a0 Fix ticket #145 (Line numbers are invalid if file is included inside #ifdef)
http://apps.sourceforge.net/trac/cppcheck/ticket/145
2009-03-08 09:45:53 +02:00
Reijo Tomperi fc8f47145a Copyrights updated 2009-03-01 19:52:33 +00:00
Reijo Tomperi 45c30f0c87 Code comments updated 2009-02-14 22:03:55 +00:00
Leandro Penz de80baeea1 Preprocessor: support for ##-comma-eating in variadic macros; passing now fmt2 test. 2009-02-13 13:34:24 +00:00
Leandro Penz d511863b57 Preprocessor: initial variadic macro support; passing now on fmt1 case. 2009-02-13 13:31:40 +00:00
Daniel Marjamäki 9c51729be6 preprocessor: stringify macros 2009-01-25 13:30:15 +00:00
Daniel Marjamäki 5acc6aca31 preprocessor: insert space. '#if(' => '#if (' 2009-01-24 19:28:30 +00:00
Daniel Marjamäki 9d29de02d3 removed windows encodings 2009-01-23 21:34:03 +00:00
Daniel Marjamäki 42e56153a4 borland and visual c++ fixes 2009-01-23 21:28:45 +00:00
Reijo Tomperi c9133fb85d Add additional checking to avoid ethernal loops when someone is using incorrect different case for the same file.
It should be unlikely that anyone would actually use different files in the same project and separate them only by 
casing of some letters.
2009-01-23 20:36:43 +00:00
Reijo Tomperi 8d6f41397a Fixing ticket #35 (Get rid of #ifdefs in our code where possible) 2009-01-23 20:25:13 +00:00
Reijo Tomperi 6a523f2730 Fixed Ticket #52, Cppcheck hangs when checking VLC's source code 2009-01-23 18:27:04 +00:00
Daniel Marjamäki 193cffdb0b preprocessor: fixed bug with mixed macros ABC and ABCD 2009-01-23 17:14:42 +00:00
Daniel Marjamäki 9af881d548 removed bam coding 2009-01-23 16:51:45 +00:00
Daniel Marjamäki 89f4a84c37 preprocessor: The stdlib.h is needed for the exit function 2009-01-23 11:34:19 +00:00
Daniel Marjamäki 67e4ea10c9 preprocessor: handle redefinition of macro 2009-01-22 20:19:07 +00:00
Reijo Tomperi e897637c7a Fix Ticket #30, Need a way to specify include file folders (-I parameter was added) 2009-01-22 19:59:50 +00:00
Daniel Marjamäki a9e84c5cd5 preprocessor: handle include guards by not checking for configurations in header files 2009-01-22 18:19:17 +00:00
Nicolas Le Cam f9191539a8 Code cleanup. 2009-01-21 22:07:22 +00:00
Reijo Tomperi 1ef2c5caf5 Fixed style 2009-01-21 21:58:06 +00:00
Nicolas Le Cam b7e4f1319c Fix Preprocessor::read to handle char constant of more than one char, fixing issue #45; Fix the test that handle the case. 2009-01-21 21:45:17 +00:00
Reijo Tomperi 53d02c0804 Fix Ticket #43, preprocessor: include file doesn't work so good in subfolders (note, because of other issues, checking will be very slow now
that this is fixed)
2009-01-21 21:03:46 +00:00
Reijo Tomperi 176dd41306 Fixed Ticket #40, Check copyright texts in files, now that we have new developers. 2009-01-21 20:04:20 +00:00
Daniel Marjamäki 76cb2310af preprocessor: handled problem with parsing strings when expanding macros 2009-01-21 17:11:24 +00:00
Daniel Marjamäki d82314b365 preprocessor: Handle ## 2009-01-20 18:28:24 +00:00
Reijo Tomperi 4d0e3dac45 Added a test case and fixed bug. If #include was inside a string, cppcheck hanged in preprocessor. 2009-01-19 19:24:41 +00:00
Daniel Marjamäki af87fececa preprocessor: Activated the include handling 2009-01-19 17:47:43 +00:00
Reijo Tomperi 3cb51d6946 Fixing crash, not sure about side effects. Ticket #37 2009-01-18 23:03:28 +00:00
Reijo Tomperi 50d9a085da Added temporary bailout code, cppcheck crashes when string checking leaks out. This needs a better fix, this is just to
see the problem more easily.
2009-01-18 22:46:48 +00:00
Reijo Tomperi 45c1b3c3ca More work for includes, still commented out. Uncomment from tokenize.cpp and
preprocessor.cpp to take into use.
2009-01-18 18:59:58 +00:00
Reijo Tomperi 3f98024215 More work for includes, still commented out. Tokenizer needs #file handling 2009-01-18 18:01:56 +00:00
Daniel Marjamäki 0177f77505 code style fix 2009-01-18 17:47:40 +00:00
Reijo Tomperi b1250e1750 Some work for the include support (commented out for now) 2009-01-18 17:13:05 +00:00
Daniel Marjamäki 965daabe60 preprocessor: Make sure that "#define ABC (a+b+c)" is expanded correctly 2009-01-18 16:56:12 +00:00
Daniel Marjamäki 8785483878 preprocessor: Reactivated the expandMacros. This time it's done after the #if #else #endif has been
processed
2009-01-18 16:42:15 +00:00
Daniel Marjamäki ea686a1da9 preprocessor: fixed so the TestPreprocessor::preprocessor_undef succeeds 2009-01-18 16:37:40 +00:00
Daniel Marjamäki 73630c4640 style updated 2009-01-18 12:19:48 +00:00
Daniel Marjamäki 6cb6e163cd preprocessor: Refactoring. Broke out some functionality of expandMacros into a class Macro 2009-01-18 12:17:26 +00:00
Daniel Marjamäki 4ee4645858 Preprocessor: Reverted [1008] - The old expandMacros was readded 2009-01-18 10:54:07 +00:00
Daniel Marjamäki 86c95c27d2 Preprocessor: Removed "Preprocessor::expandMacros" and commented all its tests 2009-01-18 07:32:06 +00:00
Daniel Marjamäki 0a027a55ef preprocessor: Don't use the "expandMacros" from cppcheck 2009-01-18 07:22:17 +00:00
Daniel Marjamäki c279f83664 preprocessor: bail out code in expandMacros 2009-01-16 21:30:06 +00:00
Daniel Marjamäki a39eaec1cc preprocessor: Fixed a null pointer dereference 2009-01-16 19:50:39 +00:00
Daniel Marjamäki a01c5a6099 preprocessor: Bail out the expandMacros if it finds "#undef". The previous handling can cause cppcheck to hang 2009-01-14 19:50:17 +00:00
Daniel Marjamäki b9460ca6f8 preprocessor: a segmentation fault fix. Check if tokens is null. 2009-01-14 17:22:11 +00:00
Daniel Marjamäki 153487d504 preprocessor: Style updates 2009-01-12 06:43:56 +00:00
Daniel Marjamäki eb8675ab76 preprocessor: Handle newlines better 2009-01-12 06:33:06 +00:00
Daniel Marjamäki ea6c48b2bd preprocessor: fixed a small bug when expanding macro without parameter 2009-01-11 16:06:37 +00:00
Daniel Marjamäki da881fdd0a preprocessor: Fixed bug when expanding macros without parameters 2009-01-11 15:51:46 +00:00
Daniel Marjamäki ecdfee850d preprocessor: expand macro without parameters 2009-01-11 15:07:13 +00:00
Daniel Marjamäki 9d8af10583 errmsg: the "unused function" message shall not take any Tokenizer nor Token parameters 2009-01-11 08:10:51 +00:00
Daniel Marjamäki 94667320e8 preprocessor: Handle "<backslash><newline>" better 2009-01-11 07:19:28 +00:00
Daniel Marjamäki ae4ab2fcb6 preprocessor: code style fixing 2009-01-10 07:09:47 +00:00
Daniel Marjamäki cd9323ca62 preprocessor: handle the \newline in strings 2009-01-10 07:07:51 +00:00
Daniel Marjamäki de7de91091 preprocessor: applied patch submitted by kimmov 2009-01-07 17:47:32 +00:00
Daniel Marjamäki 40637e436f Reverted [890] it cause more problems with Visual C++ 2009-01-07 15:43:20 +00:00
Daniel Marjamäki 8c71c4194f Borland C++: Removed unneeded ifdefs 2009-01-07 15:16:15 +00:00
Reijo Tomperi e435a1f1d6 Refactoring: Added src/ and test/ folders. Moved source files to those folders, updated makefile and codeblocks project file. 2009-01-06 14:18:36 +00:00