Commit Graph

314 Commits

Author SHA1 Message Date
Zachary Blair a381170886 Fixed #4874 (Minor spelling corrections) 2013-06-26 00:47:02 -07:00
Simon Martin 75c8dcc664 Fixed #4873 (Preprocessor: Cppcheck is unable to scan a file with a single quote in a comment inside assembler section) 2013-06-25 06:45:11 +02:00
Daniel Marjamäki bfc40ffe9f Fixed #4868 (Segmentation fault in Preprocessor::handleIncludes()) 2013-06-21 20:10:46 +02:00
Daniel Marjamäki e4270bab78 Fixed #4863 (macros not propagated) 2013-06-19 21:29:39 +02:00
Daniel Marjamäki a5636d55bc Preprocessor: Reuse help function that converts string to map 2013-06-19 17:42:55 +02:00
Daniel Marjamäki 15c92384f4 Fixed #4851 (Preprocessor: problem when using #ifndef symbol in the code) 2013-06-15 12:08:18 +02:00
Daniel Marjamäki 75616786ef Fixed #4848 (--include not working since the last 2 days) 2013-06-12 16:59:25 +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
PKEuS 0b22cb932e Fixed crash in test suite (#4595) 2013-03-14 04:21:38 -07:00
Alexander Mai f43ea5c491 Fixed #4594 (Analyzing errors about system headers not being found) 2013-03-13 19:50:50 +01:00
Alexander Mai 59d636742e Fixed #4594 (Analyzing errors about system headers not being found) 2013-03-13 06:48:33 +01:00
PKEuS 2333aa2cc7 Don't use native separators for suppression matching 2013-03-12 07:53:18 -07: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 Marjamäki 4391f0880f Tokenizer: Add special tokenize method for the Preprocessor with only basic simplifications 2013-01-27 17:58:54 +01:00
Daniel Marjamäki 42dd956dff Preprocessor: Better fix for hangs. And added proper unit test. 2013-01-27 02:53:29 +01:00
Daniel Marjamäki 6238db3a78 Preprocessor: Fix hang 2013-01-26 19:11:58 +01:00
Daniel Marjamäki 9313f7aa79 Preprocessor: Fix. Ticket: #4516 2013-01-26 18:45:18 +01:00
Daniel Marjamki f69b1f426e Preprocessor: Improved handling of expressions in simplifyVarMap. Ticket: #4516 2013-01-26 16:21:33 +01:00
Daniel Marjamki 641e7cba28 Fixed #4516 (Preprocessor: wrong #if evaluation) 2013-01-26 12:37:46 +01:00
Daniel Marjamki d33341a21a Fixed #4502 (Preprocessor: Treat SystemInclude and UserInclude the same) 2013-01-20 14:42:04 +01:00
Andrew C. Martin 4a73c93750 Fix compiler warnings and comment/string typos
- fix g++ warning:

> lib/checkother.cpp:3779: warning: comparison between signed and unsigned integer expressions

 - fix suncc warning (see [everything2](http://everything2.com/title/C%252B%252B%253A+static+extern+%2522C%2522)):

> "lib/checkmemoryleak.cpp", line 578: Warning (Anachronism): Formal argument __compar of type extern "C" int(*)(const void*,const void*) in call to bsearch(const void*, const void*, unsigned long, unsigned long, extern "C" int(*)(const void*,const void*)) is being passed int(*)(const void*,const void*).

- prefer empty() / isEmpty() over "size() > 0" (cases not caught by stlSize)

- fix word misspellings (mostly comments, a few output lines)

  - Parenthesis => Parentheses (both variations were used in the codebase)

  - fix typo and wording ("never alwayw") in gui/test/data/benchmark/simple.cpp's CheckOther::unsignedPositive():

```
-  "An unsigned variable will never alwayw be positive so it is either pointless or "
+  "An unsigned variable can't be negative so it is either pointless or "
```
2013-01-16 07:37:07 -07:00
Daniel Marjamäki f0ce26a2aa Preprocessor: Let the Tokenizer handle NULL 2013-01-13 15:01:31 +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
Simon Kagstrom 95b51d02c9 path: Add getPathFromFilename (returns the path part of a filename)
E.g.,

  /tmp/a.h -> /tmp/
  a.h ->

etc.
2012-12-28 12:44:26 +01:00
Simon Kagstrom 350f86fb6a preprocessor: Kill commented out code 2012-12-28 12:43:43 +01:00
Simon Kagstrom 1e4288fe2e preprocessor: Don't access empty lists
libc aborts with:

/usr/include/c++/4.4/debug/list:256:error: attempt to access an element in
    an empty container.

Objects involved in the operation:
sequence "this" @ 0x0xbfffe5f0 {
  type = NSt7__debug4listISsSaISsEEE;
}

otherwise.
2012-12-28 12:43:43 +01:00
Daniel Marjamäki 7368079949 Fixed Cppcheck self-check message 2012-12-27 17:11:22 +01:00
Daniel Marjamäki 57488db9da Preprocessor: Reduce variable scope 2012-12-27 17:00:59 +01:00
Daniel Marjamäki 0585588fc7 astyle formatting 2012-12-27 16:59:30 +01:00
Simon Kagstrom ef28bde3e4 Fixed #4408 (Force inclusion of files (a la -include /.../ in GCC)) 2012-12-27 16:52:31 +01:00
Daniel Marjamäki b08ba5b575 Preprocessor: Refactoring previous fix 2012-12-02 20:17:25 +01:00
Daniel Marjamäki cb06d07ae7 Fixed #4351 (Escaped whitespace gives wrong error) 2012-12-02 18:04:19 +01:00
Edoardo Prezioso f42ab9871d Fix build breakage in recent commits. 2012-12-01 02:02:45 +01:00
Daniel Marjamäki 45b77554ea Fixed #4308 (C++11 raw string literals not parsed correctly) 2012-11-30 13:46:46 +01:00
Daniel Marjamäki 7d94230329 Fixed #4079 (#if condition does not evaluate numbers with sign) 2012-11-28 07:33:24 +01:00
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