Commit Graph

2159 Commits

Author SHA1 Message Date
Daniel Marjamäki 8a08cc0796 Fixed #8029 (Tokenizer::simplifyCAlternativeTokens: dont simplify 'eb.and + 1') 2017-04-30 14:40:41 +02:00
Simon Martin 28960a8bba Remove bailout and fix varid for template class member initialized in out-of-line constructor (#8031) 2017-04-30 08:59:47 +02:00
Daniel Marjamäki bdf16b1157 Tokenizer::simplifyComma: dont simplify comma in '=(struct s){...}' 2017-04-26 20:48:08 +02:00
Daniel Marjamäki 1a95dc9bd6 Fixed #7979 (Tokenizer: Detect and reject c++ code in .c file) 2017-04-17 22:15:29 +02:00
Daniel Marjamäki 1045ece946 dump: refactor valueType dump 2017-04-16 09:11:20 +02:00
Daniel Marjamäki f90d8c9987 dump: fix xml format 2017-04-15 14:03:49 +02:00
Daniel Marjamäki e71b428740 dump: Add platform info and valueType info 2017-04-15 12:25:44 +02:00
PKEuS b1f4bd7504 Refactorization: Reimplemented Settings::_enabled as a bitfeld instead of std::set (#7995) 2017-04-11 11:49:26 +02:00
Daniel Marjamäki 8ffed6862d Tokenizer: Add --check-config warning for macro with semicolon in argument 2017-04-07 19:19:10 +02:00
Daniel Marjamäki 50da7d4919 Tokenizer: Write syntax error if there is C++ code in C file. 2017-04-06 08:50:35 +02:00
Daniel Marjamäki 9c5a136f04 Fixed #7975 (crash: Tokenizer::createLinks2 problem with enable_if<x&&y,C*>) 2017-04-03 21:48:22 +02:00
Daniel Marjamäki 1faca91c1d Added 'endsWith' utility function. This will make compiling the democlient easier. 2017-04-01 18:14:18 +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
Robert Reif f099c6a110 Refactor symbol database value type support by making setValueTypeInTokenList and setValueType member functions of SymbolDatabase. Class variables are no longer passed around as parameters but accessed directly which simplifies the code. There should be no functional change. 2017-03-21 21:55:22 -04:00
Daniel Marjamäki 8c707876ed Tokenizer: Don't simplify '({..})' wrongly 2017-03-08 11:41:18 +01:00
Daniel Marjamäki 2f2ac46243 Replaced hardcoding for char16_t and char32_t with configuration 2017-03-04 16:30:42 +01:00
Daniel Marjamäki ecc59859e1 Don't simplify _Bool in TokenList 2017-03-04 11:13:28 +01:00
Matthias Krüger 35e7697474 switch some functions from const to static, as cppcheck suggests. 2017-02-27 13:51:33 +01:00
Daniel Marjamäki 2e91858640 Fixed #7877 (Tokenizer: Does not clear ValueFlow after first pass) 2017-02-25 17:57:39 +01:00
Simon Martin 487f76cdd1 Ticket #7916: Don't incorrectly simplify return statements involving template instantiations. 2017-02-18 21:14:50 +01:00
Matthias Krüger 6f1e7e897d simplify if(tok && Token::{simple,}Match) to if(Token::{simple,}Match). 2017-02-06 15:37:12 +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
Daniel Marjamäki b7321e8dde Tokenizer: Rename struct 2017-01-09 22:40:30 +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 2ce4811998 astyle formatting
[ci skip]
2016-12-22 09:40:39 +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
Daniel Marjamäki 4558701c08 varid: don't generate varid and symboldatabase variable for function call parameter 2016-12-18 20:16:38 +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
Daniel Marjamäki 2ca85a1c40 dump: add isUnsigned/isSigned 2016-12-09 22:31:47 +01:00
PKEuS cfac3b457d Several small refactorizations 2016-12-06 22:12:02 +01:00
PKEuS 2f6350a0d0 Refactorized Library 2016-12-06 14:09:28 +01:00
amai2012 f66e7fb379 #7833 UB: member call on null pointer when --dumping configuration with unknown value 2016-11-28 18:19:19 +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 21364b4401 Refactoring fix for #7816 2016-11-21 13:54:59 +01:00
amai2012 933815ee54 #7816 Segmentation fault at Tokenizer::simplifyAttribute() for stand-alone void. Throw syntax error on incomplete code 2016-11-21 12:19:47 +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 483fd8682a cleanup redundant info in comment. ticket numbers can be looked up with git blame. if the code says there is a syntax error then a comment that says 'invalid code' isn't much clarification. 2016-11-06 16:49:25 +01:00
orbitcowboy 2f8a24764f tokenize: Improved const correctness. There are no functional changes. 2016-10-31 17:18:27 +01:00
orbitcowboy b3c60bf6b2 tokenize: Improved const correctness. There are no functional changes. 2016-10-31 16:11:11 +01:00
Daniel Marjamäki e76710c906 Revert "Revert "Fix potential uninitialized variable in Tokenizer::simplifyTypedef""
It does not _fix_ any potential uninitialized variable. So I reverted this. However I think that as a refactoring it was ok.

This reverts commit 5b2e4891c4.
2016-10-29 19:04:10 +02:00
Daniel Marjamäki 5b2e4891c4 Revert "Fix potential uninitialized variable in Tokenizer::simplifyTypedef"
This reverts commit bed2f66302.
2016-10-29 18:29:05 +02:00
Frank Zingsheim bed2f66302 Fix potential uninitialized variable in Tokenizer::simplifyTypedef 2016-10-29 17:05:51 +02: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
Harald Scheidl 58eb644003 Improved Check: Warn about number and char literals in boolean expressions (#7750) 2016-10-09 13:21:00 +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