Commit Graph

1186 Commits

Author SHA1 Message Date
Daniel Marjamäki c18fe8262b Fixed #7934 (Wrong AST for 'for (i=0;cond;({min(x,10);}))') 2017-03-19 07:26:11 +01:00
Daniel Marjamäki ecc59859e1 Don't simplify _Bool in TokenList 2017-03-04 11:13:28 +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
Matthias Krüger f80e888b7e run astyle
[ci-skip]
2017-01-31 16:22:31 +01:00
Simon Martin 5262ed018e Ticket #7440: Function calls should not abort pointer alias analysis for local variables. 2017-01-27 22:56:28 +01:00
Simon Martin bd92ddd386 Ticket #7850: Properly handle C functions called "class". 2017-01-06 21:16:28 +01:00
Robert Reif 4123b457d7 Fixed #7441 (SymbolDatabase: No scope when function return type not specified) 2017-01-06 11:53:17 +01:00
Robert Reif 4c25e798b1 Fixed #7865 (Tokenizer::createLinks2(): does does set links for <> in struct template) 2016-12-31 22:05:29 +01:00
Daniel Marjamäki 1b21767954 Fixed #5666 (False positive when modifiying std::string by pointer) 2016-12-26 17:13:35 +01:00
Daniel Marjamäki 426d1b4196 Merge pull request #846 from simartin/ticket_7805
Ticket #7805: Ignore enumerators when simplifying known variables.
2016-12-21 17:58:48 +01:00
Simon Martin 5119ae84b8 Ticket #7805: Ignore enumerators when simplifying known variables. 2016-12-17 14:05:26 +01:00
Daniel Marjamäki d4f2512421 Tokenizer::simplifyKnownVariables: Added bailout when pointer alias is simplified and loop is encountered 2016-12-11 19:12:23 +01:00
orbitcowboy 8a45c3192b There is not need to clear a string directly after its creation. 2016-11-30 10:39:14 +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 74fa69fe5e Fixed #7821 (syntax error, first token is &) 2016-11-20 17:59:50 +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 9cea2d6dfa Tokenizer: Removed simplifications of standard functions that should be handled through configuration. 2016-10-18 19:25:58 +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
Daniel Marjamäki bcbc8ef017 Fixed #7747 (Syntax error when setting the bitcount of an enum defined inside a struct) 2016-10-04 15:57:43 +02:00
Robert Reif 62ac40fc5e Fixed #7706 ((debug) Executable scope 'foo' with unknown function.) 2016-08-20 22:43:27 +02:00
Daniel Marjamäki 7d6c587580 Fixed #6113 (Tokenizer::simplifyFunctionPointer: wrong simplification of usage 'return (*f)();') 2016-08-04 19:10:08 +02:00
Daniel Marjamäki 864cef2fd2 astyle formatting
[ci skip]
2016-08-02 09:03:03 +02:00
Daniel Marjamäki 31484133c0 Fixed #7158 (Tokenizer::createLinks2(): does not set links for < > in 'enum { value = boost::mpl::at_c<B,C> };') 2016-08-01 22:26:11 +02:00
Daniel Marjamäki 71f62950ed Tokenizer::findGarbageCode: Make it less picky about 'UNKNOWN_MACRO if ..' 2016-07-26 14:35:11 +02:00
Daniel Marjamäki 7ff9545b10 Fixed #7637 (FP syntax error assignment in switch) 2016-07-26 12:15:55 +02:00
Daniel Marjamäki fd19ab4ed1 fix garbage code handling 2016-07-26 08:50:00 +02:00
Daniel Marjamäki adf16fae8b Remove handling of ##, __FILE__, __LINE__ from tokenizer 2016-07-25 07:58:03 +02:00
Daniel Marjamäki ed4a47de45 Tokenizer: Improve syntax checking of switch,if,while 2016-07-22 16:54:24 +02:00
Daniel Marjamäki 3eef225b36 Revert preprocessor fix for struct tag macros. There are performance problems. 2016-07-19 18:59:58 +02:00
Daniel Marjamäki 4cc4ebd5cd Travis: run slow unit test on travis that is too slow to run on development machines 2016-07-19 17:10:49 +02:00
Daniel Marjamäki 72ead10d93 cleanup tests 2016-07-18 10:52:38 +02:00
Daniel Marjamäki 45ee29d5dc Fixed #7604 (simplifyCalculation: expression '0 && x[2]' is not simplified properly) 2016-07-17 15:52:53 +02:00
Daniel Marjamäki 6e3d5dc0d1 Fixed #7580 (False positive when using logical operator keywords 'and', 'or') 2016-07-16 20:21:31 +02:00
Daniel Marjamäki be755af762 Removed todo testcase for #5783 2016-05-26 18:47:36 +02:00
Daniel Marjamäki 06a594a9e0 Fixed #6207 ('not' misinterpreted as alternative C token) 2016-05-24 13:33:21 +02:00
Daniel Marjamäki 06d5e73e88 Fixed #7471 (Tokenizer::prepareTernaryOpForAST: typedef with comma inside ?:) 2016-05-22 11:33:21 +02:00
Alexander Mai 303a85a930 #4195 segmentation fault of cppcheck (invalid code). Fix segfault which turned up after refactoring the enum handling code. 2016-05-17 22:19:23 +02:00
Alexander Mai 9d1302d523 #7490 sizeof('a') should be sizeof(int) in C mode. Previous fix was hardcoding 4 for C. 2016-05-14 22:52:43 +02:00
Daniel Marjamäki 2cb03b3fd0 Fixed #7409 (Tokenizer: Links not set properly 'Data<T&&>') 2016-05-14 20:40:30 +02:00
Alexander Mai 251fc022fa #7490 sizeof('a') should be 4 in C mode 2016-05-14 13:05:44 +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
PKEuS f0fb7a8245 Simplify __attribute__ earlier (#7462) 2016-05-04 13:51:34 +02:00
PKEuS b65cacf4b1 Tokenizer::simplifyStaticConst(): Support "struct" and operator:: (#7403) 2016-05-04 12:33:19 +02:00
Daniel Marjamäki dc2a92263a Fixed #7426 (RFC: time to replace simplifyEnum?) 2016-04-22 06:02:54 +02:00
amai2012 9f4d4bdde7 #6167 Refactoring: rename test functions. Rename TestTokenizer::removeCast*. TestTokenizer::varid* doesn't exist (anymore?). 2016-03-27 17:36:07 +02:00
Daniel Marjamäki ac8341e3de keep type suffixes after constant folding using bit operations 2016-03-21 21:20:02 +01:00
Daniel Marjamäki 253bfe432c Fixed #7410 (Tokenizer: function pointer with throw()) 2016-02-29 08:02:02 +01:00
Daniel Marjamäki c0056d2455 Fixed #7347 (AST: wrong ast when template variable is declared and initiailized in if 'if (A::B<C> abc = 123)') 2016-01-26 10:40:44 +01:00
Daniel Marjamäki 7663b6ee75 Fixed #7348 (AST: wrong ast for cast that starts with :: '(::X*)x;') 2016-01-25 10:29:24 +01:00