Commit Graph

17958 Commits

Author SHA1 Message Date
Sebastian c39a3e3f1c
windows string macros: Handle _T, _TEXT and TEXT internally, add tests (#1163)
Remove TEXT() macro from windows.cfg and handle it internally where it
can be correctly simplified (Ansi vs. Unicode).
Also add handling of _TEXT() macro which is just a synonym for _T().
Add tests to verify correct function and macro simplification.
2018-04-12 08:52:31 +02:00
Daniel Marjamäki 308e044769 GUI: minor gui updates
* when loading xml results, show filename in window title
 * when xml results are loaded, enable the save/print/etc buttons
2018-04-12 08:15:04 +02:00
Sebastian a36dad918a std.cfg: Add std::make_pair() (#1165) 2018-04-11 19:16:55 +02:00
orbitcowboy ef62207ada std.cfg: Added more tests for some std::vector functions. 2018-04-11 17:21:26 +02:00
Daniel Marjamäki 7176632bc6 manual: Document suppressions 2018-04-11 12:50:02 +02:00
PKEuS b596b0d549 Refactorization: pass std::string directly to std::*fstream 2018-04-11 09:50:42 +02:00
PKEuS d2146844dd Refactorizations:
- Replace several push_back-calls by emplace_back
- Replace some x = x.substr(0, y) calls by x.erase(y)
2018-04-11 09:44:35 +02:00
versat 8aa71d62a0 Revert "windows.cfg: Add macros _TEXT() and _T() (#1161)"
This reverts commit 9db64ca934.
2018-04-11 08:37:15 +02:00
Daniel Marjamäki a0c9de0048 Suppressions: Validate inline suppressions 2018-04-11 08:18:00 +02:00
Sebastian 3fc53eb122 std.cfg: Add std::[w]string::compare() with tests (#1162) 2018-04-10 21:07:39 +02:00
Sebastian 9db64ca934
windows.cfg: Add macros _TEXT() and _T() (#1161) 2018-04-10 18:39:59 +02:00
Daniel Marjamäki 87557afc43 Suppressions: Better XML formatting 2018-04-10 16:32:47 +02:00
Daniel Marjamäki a2b8eb7405 Suppressions: Report error if bad suppression element is used 2018-04-10 16:26:00 +02:00
Daniel Marjamäki 1767fe525b Addons: Fixed handling of noname arguments 2018-04-10 11:10:10 +02:00
Sebastian d46e4c1df6
misra.py: Typo in number of rules (comment) (#1150)
I have no copy of the misra pdf but according to
https://sourceforge.net/p/cppcheck/discussion/general/thread/ccbe9e89/#a6ab
and the number of lines/rules printed by misra.py -generate-table i
guess 143 is really the correct number of rules.
2018-04-10 08:55:25 +02:00
Daniel Marjamäki dffad3b3d1 Remove some more cxx11emu.h references 2018-04-10 06:52:33 +02:00
Daniel Marjamäki 8c082f1b3f Remove lib/cxx11emu.h 2018-04-09 22:28:41 +02:00
Daniel Marjamäki c5923fbdd3 astyle formatting 2018-04-09 22:21:17 +02:00
Daniel Marjamäki 8f84a493f4 remove foreach emulator 2018-04-09 22:09:10 +02:00
Daniel Marjamäki e6114a2321 glob patterns: wildcards also match path separators (like before) 2018-04-09 18:59:18 +02:00
IOBYTE 8734e4dd38 Fix SymbolDatabase bailout to also support struct (#1160) 2018-04-09 18:53:55 +02:00
Paul Fultz II d8b3fa5c70 Fix #8482: Regression with valueflow (#1159)
* Fix regression with valueflow

* Simplify test case
2018-04-09 16:13:17 +02:00
Matthias Krüger aed5cf3618 run dmake 2018-04-09 12:32:02 +02:00
Daniel Marjamäki f677322c69 Suppressions: Allow symbol-based inline suppressions 2018-04-09 11:50:59 +02:00
PKEuS 17b4721bd2 C++17: Support "if constexpr" (by simplifying it to plain if() statement)
This might lead to complaints about constant expressions as if() statement, but should fix syntax errors.
2018-04-09 11:42:59 +02:00
Daniel Marjamäki 49a3f32f80 bump simplecpp 2018-04-09 10:47:41 +02:00
PKEuS b15cc3f236 Refactorization: Replace several push_back-sequences by initializer lists 2018-04-09 09:54:39 +02:00
PKEuS bbfcccf078 Refactorization: Replace several push_back-sequences by initializer lists 2018-04-09 09:41:24 +02:00
Daniel Marjamäki 6f9c115640 Refactoring: use range for loops 2018-04-09 08:00:11 +02:00
Daniel Marjamäki a0906140a6 Suppressions: New extensible Suppressions xml format that allow more attributes. To start with it also allows symbolName. 2018-04-09 06:43:48 +02:00
Daniel Marjamäki 148af12bec appveyor: go back from vs2017 to vs2015 since the path worked better 2018-04-09 06:14:16 +02:00
PKEuS a5162e26e8 Set minimum required compilers to GCC 4.6 or Visual Studio 2013 to support more C++11 features. Use VS 2013 and VS 2017 in AppVeyor. 2018-04-08 23:03:57 +02:00
PKEuS e2002db78d Replaced make_container by C++11 initializer lists 2018-04-08 23:03:44 +02:00
Daniel Marjamäki ae3e649cc4 astyle formatting
[ci skip]
2018-04-08 20:29:52 +02:00
Dmitry-Me d9cbaa83d6 Extract common condition 2018-04-08 21:11:44 +03:00
Paul Fultz II 95fc84a26b Find duplicate expressions assigned to the same variable (#1129)
* Check for duplicate assignments

* Improve checking of expression

* Add more tests

* Use simple match

* Improve robustness of check

* check for null

* Reduce side effects by checking for side effects

* Improve verbose message

* Reword the error message
2018-04-08 14:43:19 +02:00
Daniel Marjamäki ee5c60e8f6 Refactoring, use early continue 2018-04-08 09:30:13 +02:00
Daniel Marjamäki 795b9f5e0f astyle formatting 2018-04-08 09:25:59 +02:00
Paul Fultz II aed84abfd5 Extend valueflow comparison ops (#1153)
* Handle else clause when doing a compare

* Break early

* Fix bug in checking no return else

* Escape quotes

* Add equal sign

* Simplify the logic
2018-04-08 09:24:01 +02:00
Paul Fultz II b85dda77da Add a check for identical inner conditions (#1156) 2018-04-08 08:13:44 +02:00
Daniel Marjamäki 541e255159 Remove inner identical condition 2018-04-08 08:12:56 +02:00
IOBYTE 90983303f0 Fix #8477 (False positive caused by anonymous enum in method body) (#1154) 2018-04-08 08:00:12 +02:00
IOBYTE 4f9073159a Fix another SymbolDatabase bailout (#1157) 2018-04-08 07:29:19 +02:00
orbitcowboy 270635eb1f wxwidgets.cfg: Improved support for wxString to number conversion functions. 2018-04-07 20:27:02 +02:00
IOBYTE 20f0784c06 Fix #8470 ((error) SymbolDatabase bailout; unhandled code) (#1155) 2018-04-07 16:41:39 +02:00
Daniel Marjamäki e240f8cee8 Fixed #8473 (GUI: Missing addon, not looking in executable path subfolder) 2018-04-07 10:32:10 +02:00
Daniel Marjamäki a828d2a199 GUI: Fix so correct tab is shown first in ProjectFileDialog 2018-04-07 10:20:47 +02:00
Matthias Krüger 5a104cab6e remove weird "#line 2" from valueflow.cpp 2018-04-06 23:26:08 +02:00
Daniel Marjamäki 0daa3bba30 ValueType: Improved type handling of containers when [] operator is used 2018-04-06 22:26:35 +02:00
IOBYTE 7e15e39f39 Fix some new SymbolDatabase bailout; unhandled code syntax errors. (#1152) 2018-04-06 21:32:32 +02:00