Commit Graph

9074 Commits

Author SHA1 Message Date
Daniel Marjamäki 5de3c43209 changed id for new checker to unsafeClassDivZero 2017-10-21 21:45:04 +02:00
Ayaz Salikhov 64e61d28ba Add an ability to use address sanitizer (#979) 2017-10-21 21:04:14 +02:00
Daniel Marjamäki 15d814e609 classPublicInterfaceDivZero: Try to make the error message a bit better. Added variable name and what the bad input value is. 2017-10-21 13:00:52 +02:00
Daniel Marjamäki 7a67bced71 classPublicInterfaceDivZero: extend bailout 2017-10-21 12:40:20 +02:00
Daniel Marjamäki 299835da2f classPublicInterfaceDivZero: don't warn in overloaded operators. It is normal behaviour that these are not protected. 2017-10-21 08:56:23 +02:00
Daniel Marjamäki 05e1e5e0a0 astyle formatting
[ci skip]
2017-10-20 22:11:12 +02:00
Daniel Marjamäki 8a7411abdb CheckClass: Fix wrong 'public interface' warnings 2017-10-20 22:10:55 +02:00
Daniel Marjamäki 819862ddcb Fix compiler errors 2017-10-20 17:38:15 +02:00
Daniel Marjamäki 1d5e3e4f0c Fixed #8247 (False positive knownConditionTrueFalse) 2017-10-20 17:31:58 +02:00
Daniel Marjamäki 86c84029e3 New check: Check public interface of classes (#8248) 2017-10-20 02:02:51 +02:00
Daniel Marjamäki afbfc914bc astyle formatting
[ci skip]
2017-10-20 01:53:20 +02:00
Dmitry-Me 5040491ee6 Size computation code not required outside this translation unit 2017-10-19 19:01:41 +03:00
Dmitry-Me 606e28a3c5 Extract and reuse size computation 2017-10-19 00:25:21 +03:00
Dmitry-Me 34a8d2431f Extract and reuse size computation 2017-10-19 00:20:04 +03:00
Dmitry-Me 8709490903 Clarify expressions with parentheses 2017-10-18 23:40:43 +03:00
Dmitry-Me e356ccca22 Revert "Clarify expression with parentheses"
This reverts commit bbf0a81c2d.
2017-10-18 23:31:44 +03:00
Dmitry-Me bbf0a81c2d Clarify expression with parentheses 2017-10-18 23:24:31 +03:00
Sign Bit aaafa72bc8 Use a 'negative cache' for tokens / enumerator checks (#980)
Checking whether a token is an enumerator in all the available scopes
is expensive.  Once we determined that a token is not an enumerator,
skip all the expensive checks.
2017-10-18 18:01:36 +02:00
Dmitry-Me 151ace2581 Use Platform for char limits computation (#972) 2017-10-18 17:30:47 +02:00
Daniel Marjamäki ad1749738e Fixed #6153 (ValueFlowBeforeCondition: Handle global variables) 2017-10-17 16:55:37 +02:00
orbitcowboy f1e5f64690 wxwidgets.cfg: Added support for wxMenu:Append(). 2017-10-17 10:59:23 +02:00
Florin Iucha 6e737082da Store the defined types in a map, for faster lookup 2017-10-17 09:00:14 +02:00
Florin Iucha cccf035535 Memoize token nature computation 2017-10-17 09:00:14 +02:00
Daniel Marjamäki 4700b75ded Clarify error message 'condition is always true/false' 2017-10-16 22:05:00 +02:00
Daniel Marjamäki 6d59290858 Fixed #10 (ValueFlow: condition variable has known value in switch case) 2017-10-16 21:51:30 +02:00
Daniel Marjamäki 0425f1d46d Fixed #8241 (FP: Same expression on both sides of operator) 2017-10-16 17:39:50 +02:00
IOBYTE 352fd7a381 SymbolDatabase: Add support for functions in unions. (#973) 2017-10-15 11:49:36 +02:00
Dmitry-Me e4de220a2d Only check pointer that can be null at that point 2017-10-14 19:09:42 +03:00
Dmitry-Me 288ee96cc7 Avoid recomputing loop range end 2017-10-14 18:57:27 +03:00
orbitcowboy db787369b9 #8243: Changed order of includes. Moved mathlib include at first place. 2017-10-14 16:30:10 +02:00
Daniel Marjamäki 1656ecd73b Revert changes I committed by mistake 2017-10-11 17:15:28 +02:00
Daniel Marjamäki cc82288ff6 Travis: Suppress false positive 2017-10-11 17:14:02 +02:00
Dmitry-Me 2d1c47b474 Omit repeated map access 2017-10-11 17:36:43 +03:00
amai2012 e4cdb51f7f #8240 Fix test error due to path handling 2017-10-11 08:45:29 +02:00
Daniel Marjamäki fbccb3ae55 Add errorpath for accessMoved message 2017-10-10 15:49:15 +02:00
Daniel Marjamäki abc3779e61 Tweaked the --check-library output so configured methods will not be shown 2017-10-10 10:18:03 +02:00
Daniel Marjamäki d3c9d06aa4 astyle formatting
[ci skip]
2017-10-08 14:16:45 +02:00
Daniel Marjamäki 9d27917fea c++98 compatibility 2017-10-08 14:16:18 +02:00
Dmitry-Me 9c0e6986da Passing string literals into printf as %p is fine 2017-10-08 11:14:10 +03:00
Ayaz Salikhov be2c65eb58 Simplify int vs bool 2017-10-08 07:54:39 +02:00
PKEuS a29b33b833 Set version to 1.81.99/1.82 dev 2017-10-07 23:22:31 +02:00
Daniel Marjamäki cebf34e718 1.81: Set versions 2017-10-07 12:55:36 +02:00
Daniel Marjamäki b1c730405f Code cleanup 2017-10-06 22:45:37 +02:00
Daniel Marjamäki a1053dd7dd --check-library: Report unconfigured scoped functions also 2017-10-06 11:27:01 +02:00
Daniel Marjamäki 2a6fbe2e3c astyle formatting
[ci skip]
2017-10-05 23:01:42 +02:00
hexcoder 051a18b120 pull request for ticket 8180 (better diagnostic output for bailouts) (#964)
* sync build instructions from readme.txt

* refactored the patch from ticket 8180. Moved logic from macros to the bailoutInternal function

* adapt to new bailout message format

* adapt to new bailout message format

* adapt to new bailout message format

* compile fix for Microsoft platform

* remove directory part from file locations in bailout message (normalize)

* remove directory part from valueflow message filter

* adapt tests to file format without directory part

* adapt tests to file format without directory part

* new line number agnostic assert_equals methods

* new line number agnostic assert_equals methods

* adapt to new method assertEqualsWithoutLineNumbers()

* adapt to new method assertEqualsWithoutLineNumbers()

* Bugfix: do not replace line number with spaces, remove it

* review changes: const char * -> std::string, size_t -> int, std::to_string() -> MathLib::toString()

* set #line at the beginning to guard against insertions from match compiler

* Bugfix: counting lines can be difficult :-) #line 1 -> #line 2

* added method stripDirectoryPart()

* added method stripDirectoryPart()

* used new method Path::stripDirectoryPart()

* new dependency path.h in lib/valueFlow.cpp

* code cleanup, removing redundant temporary objects and casts
2017-10-05 23:03:13 +02:00
Daniel Marjamäki 13c0b4131b --check-library: improved function name output 2017-10-05 21:50:24 +02:00
Alexey Eryomenko 22483baf72 missed simplification in parsing of std function declaration resulted in (#967)
wrong type detection
2017-10-03 22:10:13 +02:00
Oleksandr Redko 2bee664ec9 Return non-const object to enable move compiler optimization (#966) 2017-10-03 18:24:18 +02:00
Dmitry-Me 4601e40615 Simplify code for finding string format token 2017-10-02 18:03:55 +03:00