PKEuS
0370c66e41
Fixed broken function Token::getCharAt() ( #7073 )
2015-10-26 11:51:05 +01:00
PKEuS
297f2c78bd
Fixed false positives variableHidingTypedef ( #5624 , #6507 )
2015-10-26 10:06:52 +01:00
PKEuS
ee58587706
Fixed false positive unreachableCode when ternary operator is used ( #6664 )
2015-10-26 08:29:43 +01:00
amai2012
116c10c7d6
Merge pull request #700 from simartin/ticket_6998
...
Ticket #6998 : Properly handle "typedef unsigned T;" constructs.
2015-10-24 15:24:27 +02:00
Simon Martin
5d40a3ab66
Ticket #6998 : Properly handle "typedef unsigned T;" constructs.
2015-10-24 12:27:26 +02:00
PKEuS
e989d4b11b
Support C++11 array initialization in CheckUninitVar ( #7010 )
2015-10-24 12:06:40 +02:00
Daniel Marjamäki
fc2bf2ef08
Fixed #7065 (AST: More explicit handling of lambda functions, generate ast for ';new Fred;')
2015-10-20 23:55:29 +02:00
Alexander Mai
3b1d849476
Correct template syntax check which got introduced by an attempt fix #6865 . Disable test for #6865 , adjust some modified tests and add new regression tests
2015-10-19 20:03:33 +02:00
Daniel Marjamäki
b856ac51dd
Fixed #7064 (Tokenizer: Wrong simplification of 'a.public:')
2015-10-19 10:01:57 +02:00
Philipp Kloke
06c20252fa
Added dot at end of stringLiteralWrite message
2015-10-19 09:01:21 +02:00
Philipp Kloke
7060c7c87d
Refactorization: Reduced code duplication in testlibrary.cpp
2015-10-19 09:01:20 +02:00
Philipp Kloke
a837cc48e0
Refactorization: Simplified code in tokenlist.cpp, token.cpp and testthreadexecutor.cpp
2015-10-19 09:01:20 +02:00
Alexander Mai
8667184f12
#7062 Remove unnecessaryQualification check
2015-10-18 17:00:09 +02:00
Daniel Marjamäki
9be284e80f
AST: proper operator precedence for c++11 initializer {} and ::
2015-10-18 16:58:15 +02:00
PKEuS
52be380ef0
Fixed fix for #7042 - support hexadecimal digits
2015-10-18 16:37:33 +02:00
Alexander Mai
21efa992e3
#6865 TemplateSimplifier::expandTemplate doesn't terminate on invalid code. Add some another syntax check on templates to avoid problems later on.
2015-10-18 15:47:37 +02:00
Daniel Marjamäki
9bb2af1893
Fixed #7059 (AST: handle C++ initialization with {} better)
2015-10-18 13:43:39 +02:00
Alexander Mai
8f07b2e440
#6922 valueFlowForward does not terminate: xorg/driver/xf86-video-neomagic : src/neo_driver.c (invalid code). Add regression test for previously fixed bug.
2015-10-18 11:52:25 +02:00
Daniel Marjamäki
fe4fac7eb2
Fixed #7058 (Tokenizer::simplifyTypedef: wrong simplification of enum constant 'AB::A' if AB is a struct typedef)
2015-10-18 04:55:04 +02:00
Daniel Marjamäki
ec87b09d89
Fixed #7056 (iscast does not handle '(ulong)~0' properly, Tokenizer::simplifyCalculations wrongly simplifies '(ulong)~0' to 'ulong~0')
2015-10-17 18:58:13 +02:00
Daniel Marjamäki
30af2fcd73
iscast: handle '(ulong)~0' better
2015-10-17 18:25:27 +02:00
Daniel Marjamäki
c88297c971
Fixed #7054 (AST: handle C++ initialization with {} better)
2015-10-17 17:03:24 +02:00
Alexander Mai
8e3e981323
#7050 segmentation fault (invalid code) in isVariableChanged
2015-10-15 21:27:55 +02:00
Daniel Marjamäki
6cf25825de
Fixed #7030 (Tokenizer::simplifyTypedef: Label)
2015-10-15 16:56:22 +02:00
PKEuS
46bfa62aad
Execute prepareTernaryOpForAST earlier ( #7048 )
2015-10-15 10:31:54 +02:00
Alexander Mai
600641c4c5
#7043 segmentation fault (invalid code) in Tokenizer::simplifyVarDecl
2015-10-14 20:34:55 +02:00
PKEuS
d0cc97a4cf
Fixed wrong syntax error ( #7045 )
2015-10-14 16:01:48 +02:00
PKEuS
a97f6f973f
Support C++14 digit separators ( #7042 )
2015-10-14 12:00:54 +02:00
Daniel Marjamäki
60f8982999
Fixed #7039 (ValueFlow: bitand calculation '16&15')
2015-10-14 10:44:04 +02:00
Daniel Marjamäki
a04e072976
Fixed #7040 (False positive syntaxError False positive syntaxError)
2015-10-13 20:31:17 +02:00
PKEuS
3971f8625f
Fixed false positive seekOnAppendedFile if FILE* is reused ( #6566 )
2015-10-13 15:32:13 +02:00
PKEuS
05b5275110
Improved AST:
...
- Fixed TODO for ternary operator. Add parantheses between ? and : where necessary as a preparation for createAst()
- Improved AST validation:
-- Better message for binary operator with only one operand
-- Ensure ? has : as second operand (#7035 )
2015-10-12 19:21:48 +02:00
Daniel Marjamäki
97326fce13
Fixed #6992 (argument name of function typedef conflicts with local variable name)
2015-10-12 10:15:02 +02:00
Daniel Marjamäki
ac9cb87e04
ValueType: Handle bit operations, sizeof better. Use ValueType in astIsFloat().
2015-10-11 12:20:40 +02:00
Daniel Marjamäki
5b082aa799
ValueType: struct member
2015-10-11 10:48:08 +02:00
Daniel Marjamäki
9738cc66eb
ValueType: function return type
2015-10-11 08:42:31 +02:00
Daniel Marjamäki
cf179f82b6
ValueType: Better handling of wide strings
2015-10-11 08:13:30 +02:00
Daniel Marjamäki
0849ad4707
ValueType: Better handling of const
2015-10-10 08:32:45 +02:00
PKEuS
2eb8492993
Fixed crash on garbage code #7034
2015-10-09 13:49:17 +02:00
PKEuS
7d624f2e21
Fixed crash on garbage code #7033
2015-10-09 13:06:52 +02:00
PKEuS
70dce7701a
Refactorization: Reduced code duplication in testpreprocessor.cpp
2015-10-09 12:27:39 +02:00
Daniel Marjamäki
a500f6f703
Improved handling of 'long double' and address-of in ValueType. Removed Tokenizer::simplifyFloatCasts() to handle float casts better.
2015-10-08 19:50:10 +02:00
PKEuS
856e4c414d
Refactorization: Reduced code duplication in testsymboldatabase.cpp
2015-10-08 12:53:56 +02:00
PKEuS
3645e3c16b
Fixed two TODO unit tests by delaying arraySize simpification until createLink2 is executed
2015-10-08 12:52:28 +02:00
PKEuS
0a34b206e8
Refactorization: Reduced code duplication in test suite
2015-10-08 11:35:51 +02:00
Philipp Kloke
4ac6623875
Moved a few tests out of testtokenize.cpp; refactorized them
2015-10-07 22:45:38 +02:00
Daniel Marjamäki
2fd27ff729
ValueType: Test promotions
2015-10-07 19:50:33 +02:00
PKEuS
0fa3b8806c
Refactorization: Use '\x..' syntax to avoid cast and "#pragma warning".
2015-10-07 19:41:54 +02:00
Daniel Marjamäki
604a9acb48
ValueType: Handling constness
2015-10-07 19:08:26 +02:00
PKEuS
b7f2f826a4
Refactorization: Removed some redundant code
2015-10-07 18:40:04 +02:00
PKEuS
3a5cef8a7e
Refactorization: Improved usage of Settings instances in test suite
2015-10-07 18:40:03 +02:00
Daniel Marjamäki
db31e22316
ValueType: Improved signedness
2015-10-07 18:10:48 +02:00
PKEuS
f1bbcfe32d
Refactorization: Avoid loading std.cfg multiple times in testautovariables.cpp
2015-10-07 14:40:09 +02:00
PKEuS
93dbfb72d1
Improved REGISTER_TEST() macro to support several occurrences within a single file
2015-10-07 14:30:01 +02:00
PKEuS
07b661ef62
Refactorization: Improved handling of preprocessor in test suite
...
- Set Preprocessor::macroChar to '$' once in the beginning to avoid problems when changing the order of tests
- Removed Preprocessor usage from where it is not required
- Fixed a TODO in testuninitvar.cpp
2015-10-07 14:18:57 +02:00
PKEuS
50ed47c725
Fixed crash on garbage code ( #7022 )
2015-10-07 13:52:06 +02:00
Daniel Marjamäki
f5d9ba9cf3
Rewrote the charvar checker. It now uses valueflow also to limit false negatives.
2015-10-06 17:30:51 +02:00
amai2012
88b3d90505
#7023 segmentation fault (invalid code) in astIsIntegral. Avoid crash, unfortunately there is no syntax error yet detected.
2015-10-06 11:21:31 +02:00
Daniel Marjamäki
b77203a277
CheckIO: Handle AST pointer type better
2015-10-05 19:59:15 +02:00
Daniel Marjamäki
b9036c2ca8
AST types: Fix for 'long long' handling
2015-10-05 19:20:42 +02:00
Daniel Marjamäki
8f6bd7fd0d
Fixed #7014 (False positive for printf("%c", "hello"[0]))
2015-10-05 10:12:30 +02:00
Daniel Marjamäki
f35c24d4af
SymbolDatabase: Better handling of valuetypes in AST
2015-10-04 23:27:58 +02:00
Daniel Marjamäki
9b253612ca
SymbolDatabase: Add type information in AST
2015-10-04 19:42:58 +02:00
Frank Zingsheim
3bc21b8138
Fixed #6996 (ValueFlow: known and possible values)
2015-10-04 10:33:43 +02:00
Daniel Marjamäki
f5bd00f153
Library: return true from Library::isnullargbad() for format string arguments. Related with #7012 .
2015-10-03 20:51:45 +02:00
Daniel Marjamäki
a574fda8a9
Fixed #6935 (Wrong duplicate expression)
2015-10-03 14:56:24 +02:00
Alexander Mai
27f72d7ae0
#7020 segmentation fault (invalid code) in Tokenizer::simplifyTypedef. #7021 segmentation fault (invalid code) in Tokenizer::simplifyEnum
2015-10-03 10:47:23 +02:00
Simon Martin
0f7e20c11d
Ticket #7017 : Properly interpret operator= return type for template classes in CheckClass::operatorEq.
2015-10-02 23:23:44 +02:00
amai2012
fde59242bb
#7018 segmentation fault (invalid code) in Tokenizer::simplifyEnum
2015-10-02 15:33:23 +02:00
Martin Ettl
2fbb25e9bc
test/std.cfg: Added more test cases and comments.
2015-10-01 20:18:06 +02:00
Martin Ettl
dc051f077d
#6667 : Added a regression test to testgarbage.
2015-09-30 21:55:32 +02:00
Martin Ettl
12b4bf75e0
std.cfg: Fixed false negatives regarding uninitialized variable usage and added test cases.
2015-09-30 13:10:31 +02:00
Martin Ettl
0b782853fe
Imroved std.cfg and added more test cases.
2015-09-30 12:45:40 +02:00
Martin Ettl
4fcd324ccd
Improved testing of std.cfg regarding <arg nr=any> configured functions and added more test cases.
2015-09-30 12:18:56 +02:00
Martin Ettl
c64f9cf9b1
#7012 : Fixed FP in std.cfg by explicitly definining the first parameter of snprintf.
2015-09-29 21:33:39 +02:00
Martin Ettl
69b1e21560
Improved testing of std.cfg and added more test cases for snprintf(). There is a FP (according to #7012 ).
2015-09-29 21:14:22 +02:00
PKEuS
e6467703b2
Support cast to ** in Tokenizer::simplifyCasts() ( #7005 )
2015-09-28 16:08:14 +02:00
PKEuS
590f1f1d66
Fixed handling of __asm...__endasm ( #6970 )
2015-09-28 15:43:48 +02:00
Thomas Otto
7ba69cfd0a
sizeofCalculation: skip if void-casted inside a macro ( #6888 )
2015-09-28 14:33:29 +02:00
Daniel Marjamäki
bd243a4748
Fixed #6903 (ValueFlow: Fix FP in ?:)
2015-09-27 13:29:28 +02:00
Dmitry-Me
6304a4dddb
Fix FP for members of temporaries
2015-09-25 13:57:11 +03:00
Dmitry-Me
da15efb3f6
Fix FN for distinct structs with identical members
2015-09-24 18:29:08 +02:00
Martin Ettl
7476f0d1c2
std.cfg: Added support for wmemcmp() and corresponding test cases.
2015-09-23 22:46:36 +02:00
Alexander Mai
c27fc31fcf
#6997 segmentation fault (invalid code) in CheckUninitVar::checkIfForWhileHead. Detect invalid syntax.
2015-09-23 10:33:55 +02:00
orbitcowboy
3bc4ea4e51
Merge pull request #687 from Dmitry-Me/tellIfItsStructOrUnion
...
Tell if it's struct or union
2015-09-22 21:14:30 +02:00
Martin Ettl
34dcf1182c
test/cfg: Deactivated a test case in std.cpp, which tests std::string::find (three parameter version). It cases the travis build to be failing.
2015-09-22 20:54:25 +02:00
Dmitry-Me
0b991f5560
Tell if it's struct or union
2015-09-22 17:38:23 +03:00
Martin Ettl
10da5d6d2f
std.cfg: Added configuration for std::string:find.
2015-09-21 23:01:51 +02:00
Martin Ettl
f2fae9836b
test/cfg: Another attempt to fix travis build.
2015-09-21 21:51:19 +02:00
Martin Ettl
55ccaea4a5
std.cfg: Added more functions from <cuchar> and corresponding test cases.
2015-09-21 13:40:56 +02:00
Martin Ettl
39622417b1
Improved std.cfg and added coressponding test cases to test/cfg.
2015-09-18 23:57:20 +02:00
Martin Ettl
841ad5462d
test/cfg: Improved std.cfg and added corresponding test cases.
2015-09-18 23:02:51 +02:00
Martin Ettl
fc4b9d320d
test/cfg: Improved testing of std.cfg about std::stod().
2015-09-18 16:25:05 +02:00
Daniel Marjamäki
305760f143
Uninitialized variables: Fix FP for struct array
2015-09-16 14:42:55 +02:00
Daniel Marjamäki
af233efcce
Uninitialized variables: tweaked checking of arrays / allocated buffers
2015-09-14 09:03:21 +02:00
Daniel Marjamäki
ad007ca2d7
Uninitialized variables: better checking of arrays
2015-09-13 16:32:16 +02:00
Frank Zingsheim
1fd9ba0cc4
Fixed #6988 (incorrect nullPointer error for string)
2015-09-13 10:53:05 +02:00
orbitcowboy
fd81ee9804
test/cfg: Improved testing of std.cfg regarding uninitialized and nullPointer checks.
2015-09-11 16:50:59 +02:00
orbitcowboy
3187a2b972
test/cfg: Improved testing of std.cfg regarding null pointer dereferences.
2015-09-11 16:29:39 +02:00
orbitcowboy
7ae7cdd17b
test/cfg: Added test cases for std::string find, that demonstrate false negatives in case of uninitialized variable ( #6991 ).
2015-09-10 17:03:50 +02:00