Commit Graph

294 Commits

Author SHA1 Message Date
Daniel Marjamäki e62b9bdc77 Fixed #8348 (ValueFlow: wrong Uninit value with abort() in else-branch) 2018-02-11 22:14:44 +01:00
Daniel Marjamäki c4caee6b18 Updated copyright year 2018-01-14 15:37:52 +01:00
Daniel Marjamäki 1b13490ac1 Move code 2018-01-11 14:27:41 +01:00
Daniel Marjamäki 6fd157e93b ValueFlow: Template arguments have 'possible' values 2018-01-11 14:22:27 +01:00
Daniel Marjamäki 9191e6f112 Fixed #8246 (ValueFlow: known value, function pointer argument) 2017-11-17 23:04:54 +01:00
Daniel Marjamäki 4a9984d73b Fixed #8233 (FP uninitvar found in bash:lib/readline/display.c) 2017-11-06 10:28:07 +01:00
Daniel Marjamäki 1d5e3e4f0c Fixed #8247 (False positive knownConditionTrueFalse) 2017-10-20 17:31:58 +02:00
Daniel Marjamäki ad1749738e Fixed #6153 (ValueFlowBeforeCondition: Handle global variables) 2017-10-17 16:55:37 +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
Dmitry-Me 2a6f63d995 Resolve C4305 - double constant truncated to float 2017-10-11 23:36:51 +03: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 5f4b06c0f4 isVariableChangedByFunctionCall: Fix FN when constructor argument is const reference 2017-09-20 14:03:56 +02:00
Daniel Marjamäki 4318521fc1 Fixed #8187 (isVariableChangedByFunctionCall: Constructor reference argument) 2017-09-20 12:53:25 +02:00
Daniel Marjamäki 1dbcba4dd6 Fixed #8221 (ValueFlow: value for static variable that is not written) 2017-09-15 15:58:19 +02:00
Daniel Marjamäki ef1f3fbee6 Fixed #8173 (ValueFlow: use AST when setting values in assignment RHS ((n=42) && n=='A')) 2017-09-14 22:49:47 +02:00
Daniel Marjamäki a02fd54a69 ValueFlow: Avoid FPs for aliased variables 2017-09-03 23:24:55 +02:00
Daniel Marjamäki 30f04a5a96 Fixed #8195 (False positive uninitvar (regression) - valueflow misses variable initialization via istringstream >>) 2017-09-02 21:53:51 +02:00
Daniel Marjamäki 9c99bc43c2 ValueFlow: Skip wrong handling of lambda functions. TODO: handle lambda functions properly. 2017-08-28 22:39:12 +02:00
Daniel Marjamäki 02a1b7cd2d Fixed #7965 (valueFlowForward: Improved handling of correlated variables) 2017-08-27 19:50:44 +02:00
Daniel Marjamäki 529b255e99 ValueFlow: Better errorpath for increment/decrement 2017-08-25 23:07:26 +02:00
Daniel Marjamäki b1b8e5270a ValueFlow: Better errorpath for increment/decrement 2017-08-25 22:15:52 +02:00
Daniel Marjamäki 50636f75ba ValueFlow: Improved error path for compound assignments 2017-08-24 22:02:49 +02:00
Daniel Marjamäki f10634c021 ValueFlow: Dont try to evaluate '/=0;' 2017-08-23 17:53:05 +02:00
Daniel Marjamäki 167cfb1ac5 valueFlowForward: improve handling of compound assignments 2017-08-23 11:13:47 +02:00
Daniel Marjamäki 3abb62a6d1 Fixed #8036 (valueFlowUninit: strcpy(buf, e = str), free(e);) 2017-08-20 19:47:26 +02:00
Daniel Marjamäki e58344c2c9 Fixed compiler warning 2017-07-22 16:23:33 +02:00
Daniel Marjamäki bf5040e3d6 Fixed #7701 (ValueFlow: handle 64-bit unsigned values ) 2017-07-22 12:19:46 +02:00
Daniel Marjamäki 32fe0aba41 Fixed #8037 (ValueFlow: global variable might be modified by function call) 2017-07-09 12:50:17 +02:00
Daniel Marjamäki bce0776417 Fixed #7795 (ValueFlow: Value is not known after conditional increment ) 2017-06-01 15:16:07 +02:00
Ayaz Salikhov 28aa939d69 iwyu - include what you use 2017-05-27 04:33:47 +02:00
Daniel Marjamäki 82a372a380 Try to clarify ErrorPath texts 2017-05-20 08:47:35 +02:00
Daniel Marjamäki f92b16706c ValueFlow: Add ErrorPath info after for loop 2017-05-19 16:32:58 +02:00
Daniel Marjamäki 2bb54fef69 ValueFlow: Test ErrorPath handling 2017-05-19 14:34:59 +02:00
Daniel Marjamäki 040d2f0012 Use simplecpp lexer in test cases 2017-05-18 21:52:31 +02:00
Daniel Marjamäki 980ca39fe2 valueFlowForward: better handling of sizeof() in rhs in assignments 2017-04-29 08:25:55 +02:00
Daniel Marjamäki 89532cf8b9 Fixed #7968 (valueFlowBeforeCondition: better handling of compound assignments) 2017-04-25 20:45:02 +02:00
Daniel Marjamäki 37fd60e879 Fixed #7293 (Use of uninitialized pointer not detected (worked in 1.71)) 2017-04-24 18:27:16 +02:00
Daniel Marjamäki 8a738eefab fixed #7998 (uninitialized variable is not found when used with switch/case) 2017-04-23 18:05:14 +02:00
Daniel Marjamäki 8fe7ee1012 Fixed #7886 (ValueFlow: endless forloop 'for (i = 0, j = 0; i < sz && j < 9; i++)') 2017-03-30 22:02:36 +02:00
PKEuS 3c8f5b85ae Refactorization: Allocate Token::_values (ValueFlow information) dynamically, reducing size of each token by around 10% 2017-03-27 18:48:34 +02:00
PKEuS 97fa9e9d1b ValueFlow: Stop on inline assembly 2017-03-23 20:01:16 +01:00
Daniel Marjamäki d1c66edb03 ValueFlow: Known values in conditional code 2017-03-03 01:29:34 +01:00
Daniel Marjamäki 47d39d0a14 Revert "Fixed #7888 (1.77 false positive from knownConditionTrueFalse with sizeof(int) == sizeof(long))"
This reverts commit a762511067.
2017-01-10 13:22:48 +01:00
Daniel Marjamäki a762511067 Fixed #7888 (1.77 false positive from knownConditionTrueFalse with sizeof(int) == sizeof(long)) 2017-01-09 22:28:55 +01:00
Daniel Marjamäki b1f7e46491 Fixed #7323 (valueflow: global variables) 2017-01-09 15:53:08 +01:00
Daniel Marjamäki f40bdddbab ValueFlow: Better handling when casting calculation result 2016-12-20 23:09:50 +01:00
Daniel Marjamäki 44ccbdedec ValueFlow: Improved value for cast 2016-12-20 21:37:25 +01:00
Daniel Marjamäki 606bb78297 ValueFlow: Better handling of casts 2016-12-20 19:32:21 +01:00
Daniel Marjamäki e14e86c103 ValueFlow: only set values in conditional code in subfunctions when sure 2016-12-20 11:06:20 +01:00