Commit Graph

790 Commits

Author SHA1 Message Date
Daniel Marjamäki f85e43d21f Fixed #8059 (Tokenizer::simplifyWhile0: for loop that modifies local variable) 2017-07-09 22:44:10 +02:00
Daniel Marjamäki 18adb97873 astyle formatting
[ci skip]
2017-05-28 15:56:26 +02:00
Daniel Marjamäki be6e0cbf85 Tokenizer: I dont think its safe to calculate floating point equality comparisons, changing TODO assertion to normal assertion. 2017-05-28 12:34:29 +02:00
Frank Zingsheim aa937e426d Fixed #7849 (Tokenizer: Wrong simplification of floating point equality comparison) 2017-05-28 10:53:50 +02:00
Ayaz Salikhov 28aa939d69 iwyu - include what you use 2017-05-27 04:33:47 +02:00
Daniel Marjamäki 040d2f0012 Use simplecpp lexer in test cases 2017-05-18 21:52:31 +02:00
Daniel Marjamäki bdf16b1157 Tokenizer::simplifyComma: dont simplify comma in '=(struct s){...}' 2017-04-26 20:48:08 +02:00
Simon Martin 487f76cdd1 Ticket #7916: Don't incorrectly simplify return statements involving template instantiations. 2017-02-18 21:14:50 +01:00
Simon Martin 326d152aa2 Ticket #7914: Properly recognize template parameters that contains operators. (#870) 2017-02-11 10:13:41 +01:00
Simon Martin 0943b2145b Ticket #7891: Do not remove spaces in the internal representation for template instantiations. 2017-02-05 17:35:29 +01:00
Stefan Weil 57b57428c2 Fix some typos in comments (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-11-27 11:40:42 +01:00
Daniel Marjamäki 5b377ea2e4 Fixed #7821 (segmentation fault, invalid last token) 2016-11-20 14:15:51 +01:00
Daniel Marjamäki efa3aba32a Remove Tokenizer::simplifyNull() 2016-10-18 21:44:02 +02:00
Daniel Marjamäki d09a8dde57 Improved char literal handling. In the 'normal' tokenlist these should not be simplified to integer literals. 2016-10-12 10:20:24 +02:00
Robert Reif f1b5ac30a7 Fixed 7698 (FP syntaxError with enum (1.75 regression)) 2016-08-19 19:09:52 +02:00
PKEuS 0afecd8fee Do not simplify name "CALLBACK" away on non-windows platforms (#7554) 2016-07-16 10:43:28 +02:00
PKEuS a808549af0 Support lambdas in simplifyCompoundAssignment (#7571) 2016-07-08 20:10:33 +02:00
Daniel Marjamäki 1caa79c45f Tokenizer::simplifyPointerConst: Remove simplification. Its purpose was to avoid crash for garbage code (#6900). This fixes #7485. 2016-05-08 21:32:34 +02:00
Daniel Marjamäki dc2a92263a Fixed #7426 (RFC: time to replace simplifyEnum?) 2016-04-22 06:02:54 +02:00
Daniel Marjamäki 5fef7cc050 Fixed #4973 (wrong enum simplification of shadow struct variable) 2016-02-07 15:15:20 +01:00
Daniel Marjamäki 6c1012a8d6 Fixed #4625 (wrong enum simplification in shadowed enum declaration) 2016-02-07 13:51:03 +01:00
Daniel Marjamäki f781f13997 Fixed #6806 (wrong enum simplification in initialization list) 2016-02-07 13:34:03 +01:00
PKEuS f8bf2b5776 Removed rest of variableHidingTypedef and variableHidingEnum checking 2016-02-06 20:55:41 +01:00
amai2012 d25258359a #7251 Remove checks variableHidingTypedef and variableHidingEnum 2016-02-06 15:37:58 +01:00
PKEuS cc8c498ebb Moved a few tests to testgarbage.cpp 2016-02-04 09:10:20 +01:00
Daniel Marjamäki 414bdc30a9 Fixed #7276 (VarId: Missing varId in template class constructor initialization lists) 2016-01-10 22:10:49 +01:00
Daniel Marjamäki b3208fb4b3 Fixed #7211 (False positive: Finding the same expression on both sides of an operator (enumconstant == 0)) 2016-01-10 11:21:43 +01:00
Daniel Marjamäki cd89e68f60 Fixed #6931 (noexcept and override qualifiers plus less than operator results in a syntax error) 2016-01-03 12:22:07 +01:00
Daniel Marjamäki 95009a4630 Merge pull request #745 from lanurmi/2016_ad
Update copyright year to 2007-2016.
2016-01-01 22:57:19 +01:00
Daniel Marjamäki f5715c1496 Rename Unspecified platform type to Native 2016-01-01 16:39:41 +01:00
Lauri Nurmi 996c9244d8 Update copyright year to 2007-2016. 2016-01-01 15:34:45 +02:00
Daniel Marjamäki 8171154e12 Fixed #7230 (Confusing code snippet in error message) 2015-12-31 01:15:49 +01:00
Daniel Marjamäki 15ecb26a6c Tokenizer: Moved simplifyAssignmentInFunctionCall from simplifyTokenList1 to simplifyTokenList2 2015-12-28 13:58:41 +01:00
Daniel Marjamäki 5fabe66ff7 simplifyCalculations: better handling of && and || in conditions (#4931) 2015-11-28 15:00:41 +01:00
Daniel Marjamäki c0da6c1541 simplifyCalculations: handle '(4%1<<1&4!=1)' better. must combine '!' '=' before constant folding. fixed the operator precedence for comparison operators. (#4931) 2015-11-28 09:04:22 +01:00
Daniel Marjamäki 1bf547c716 Fixed #4931 (Wrong calculation for '2|0*0&2>>1+0%2*1') 2015-11-27 15:02:49 +01:00
Daniel Marjamäki 1977a18a1e simplifyNumericCalculations: Don't fold negative constants in shift/bitmask calculation. Behaviour is not well defined. 2015-11-27 14:16:49 +01:00
Daniel Marjamäki 2737f63f71 Wrong calculation of constants (simplifying: +,<<,% operations) 2015-11-25 16:46:39 +01:00
Daniel Marjamäki 4abc0b7c1f Partial fix for #4931 (Wrong calculation of constants (simplifying: +,<<,% operations)) 2015-11-20 16:09:47 +01:00
Daniel Marjamäki 0f9d90d2be Changed Copyrights. Removed my name. 2015-11-18 20:04:50 +01:00
PKEuS 3f255e7685 Use Library information in Tokenizer::sizeOfType() 2015-11-15 14:37:02 +01:00
Daniel Marjamäki f7a7a8a95c Fixed #6934 (False positive returnLocalVariable - assigning local array to function argument) 2015-11-07 15:07:26 +01:00
PKEuS 0370c66e41 Fixed broken function Token::getCharAt() (#7073) 2015-10-26 11:51:05 +01:00
Alexander Mai 8667184f12 #7062 Remove unnecessaryQualification check 2015-10-18 17:00:09 +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
PKEuS 0a34b206e8 Refactorization: Reduced code duplication in test suite 2015-10-08 11:35:51 +02:00
PKEuS 3a5cef8a7e Refactorization: Improved usage of Settings instances in test suite 2015-10-07 18:40:03 +02:00
PKEuS e6467703b2 Support cast to ** in Tokenizer::simplifyCasts() (#7005) 2015-09-28 16:08:14 +02:00
Daniel Marjamäki d88dc3ed3e Reverted 00c54df07c (don't remove enum declarations) because it caused unexpected false positives 2015-09-06 18:37:22 +02:00
Daniel Marjamäki 00c54df07c Tokenizer: Don't remove enum declarations 2015-09-06 17:44:49 +02:00