9434 Commits

Author SHA1 Message Date
Daniel Marjamäki
121d4ff2ba isLikelyStreamRead: when using & dont allow astParent 2018-04-22 07:30:45 +02:00
Daniel Marjamäki
e1db4c0e2c astyle formatting
[ci skip]
2018-04-21 13:28:31 +02:00
Daniel Marjamäki
8cc7131ee9 Rename CppCheck::processFile to CppCheck::checkFile 2018-04-21 13:28:26 +02:00
Simon Martin
a451a5b598 Ticket #8436: Handle C++11 initializations within ternary operator. (#1174) 2018-04-21 11:30:07 +02:00
Paul Fultz II
d939c6015a Report opposite expressions (#1182)
* Report opposite expressions

* Skip assignment operator
2018-04-21 11:28:21 +02:00
Paul Fultz II
bad66594d6 Fix double free regression with smart pointers (#1184) 2018-04-21 11:24:19 +02:00
Daniel Marjamäki
2073bd02d8 Refactoring: Use range for loop 2018-04-20 22:13:05 +02:00
Daniel Marjamäki
3fdb2da0d1 Refactoring: Use range for loop 2018-04-20 22:10:29 +02:00
Daniel Marjamäki
46bb63ceaf Refactoring: Use range for loop 2018-04-20 22:08:22 +02:00
Daniel Marjamäki
d5fb529d4f Fixed #8492 (Improve message: parameter should be passed by reference) 2018-04-20 17:33:42 +02:00
Daniel Marjamäki
313b2a1755 Refactoring: Use ranged for loops 2018-04-19 22:31:36 +02:00
rikardfalkeborn
57019c0128 Fix comment in Tokenizer::simplifyMathFunctions (#1179)
In 9cea2d6df, simplifications were removed for a number of functions
which should instead be handled with configurations. The commit did
however not update the description of the function, do this now.

Also sin() and sinh() and their float and long double versions were
missing from the comment so add these as well.
2018-04-19 06:14:16 +02:00
Daniel Marjamäki
b459da2ac3 Refactor Path::getRelativePath() 2018-04-18 22:23:38 +02:00
Daniel Marjamäki
4b8769a9f5 astyle formatting
[ci skip]
2018-04-18 17:46:31 +02:00
Daniel Marjamäki
7ee636b934 Refactoring: Reuse isLikelyStreamRead in isVariableChanged 2018-04-18 17:46:10 +02:00
Daniel Marjamäki
26e36a1d6b Fix FP uninitvar when stream bool operator is used 2018-04-18 16:13:24 +02:00
Daniel Marjamäki
1b4f4d7130 Fixed #8495 (False positive: boolean result used in bitwise operation when & is overloaded) 2018-04-17 22:14:17 +02:00
Daniel Marjamäki
219176c11c Update isLikelyStreamRead (#8494) 2018-04-17 20:34:31 +02:00
Daniel Marjamäki
7825eb8670 Refactoring; reuse isLikelyStreamRead 2018-04-17 19:51:27 +02:00
Daniel Marjamäki
4f6bd5d607 Fix Travis 2018-04-17 14:54:12 +02:00
Daniel Marjamäki
c84628c28a Fixed #8494 (False positive: serialization class overloads operator) 2018-04-17 14:23:04 +02:00
Paul Fultz II
7d5a1b1248 Fix shadow warning (#1175) 2018-04-17 08:37:41 +02:00
Daniel Marjamäki
a4f8c44432 astyle formatting
[ci skip]
2018-04-16 12:55:37 +02:00
Paul Fultz II
2a657cfd08 Check for double frees when using smart pointers (#1172)
* Check for double frees when using smart pointers

* Some updates from feedback

* Add test for mismatch allocation

* Constants

* Check smart pointer deleter

* Switch order

* Use next

* Add owned state

* Fix handling of leaks

* Use ast for checking addressof operator

* Remove stray character

* Add a test for mismatch allocator

* Add another test for deallocating with custom function
2018-04-16 11:11:13 +02:00
Simon Martin
5c1540915d Fix warning emitted by clang. (#1173) 2018-04-15 20:40:24 +02:00
Daniel Marjamäki
9a0756c13f CheckLeakAutoVar: clarify the code; replace magic values with constants, add a comment 2018-04-15 01:53:00 +02:00
Daniel Marjamäki
6ecd638e49 chmod 644 checkinternal.*
[ci skip]
2018-04-14 19:45:42 +02:00
Daniel Marjamäki
0a83c6b173 CheckInternal: Check that emplace is not used 2018-04-14 19:43:57 +02:00
Daniel Marjamäki
e95ff8c7b6 Avoiding emplace 2018-04-14 19:24:35 +02:00
Daniel Marjamäki
e73fe49d3c 4e820b6c4a7a59118f0042a7bc40450751d8cbd9 2018-04-14 15:46:55 +02:00
Daniel Marjamäki
be78e44c3f Revert "I see compilation problems with std::multimap::emplace on a old system so lets avoid that"
This reverts commit 4e820b6c4a7a59118f0042a7bc40450751d8cbd9.
2018-04-14 15:43:14 +02:00
Daniel Marjamäki
4e820b6c4a I see compilation problems with std::multimap::emplace on a old system so lets avoid that 2018-04-14 15:19:04 +02:00
Daniel Marjamäki
97c86ff0e6 Dumps: Added isVirtual/isImplicitlyVirtual info 2018-04-13 21:15:43 +02:00
Daniel Marjamäki
f7d65cd735 SymbolDatabase: add constness attribute for Variable 2018-04-12 20:23:34 +02:00
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
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
Daniel Marjamäki
a0c9de0048 Suppressions: Validate inline suppressions 2018-04-11 08:18:00 +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
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
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
PKEuS
b15cc3f236 Refactorization: Replace several push_back-sequences by initializer lists 2018-04-09 09:54:39 +02:00