Daniel Marjamäki
c5e9da2984
xml dump: add more token attributes
2014-07-21 12:44:53 +02:00
Daniel Marjamäki
328cc7b8f5
Fixed #5996 (false positive: Clarify calculation precedence for '+' and '?'.)
2014-07-19 18:29:53 +02:00
Daniel Marjamäki
946c139043
Merge pull request #367 from Dmitry-Me/fixVariableCapitalization
...
Fix variable capitalization.
2014-07-18 11:15:17 +02:00
Alexander Mai
55e45add4a
Fix compiler warnings
2014-07-17 20:04:56 +02:00
Dmitry-Me
f995f67a11
Fix variable capitalization.
2014-07-17 12:38:09 +04:00
Daniel Marjamäki
b1e5b015df
xml dump: output some more info in the dump
2014-07-16 15:27:13 +02:00
orbitcowboy
af6f21308f
Tokenizer: Added missing comma in string array initialization (This fixes Coverity-ID: 1226263 Missing comma in a string array initialization).
2014-07-12 12:52:49 +02:00
orbitcowboy
6e5a05104b
Fixed copy and paste error (Coverity-ID: 1226262 Copy-paste error).
2014-07-12 12:48:05 +02:00
Daniel Marjamäki
b6a9c53826
xml dump: fixed some bad xml output in the token list dump
2014-07-14 19:49:31 +02:00
Daniel Marjamäki
8db5836e3f
Fixed #5982 (Add xml dump)
2014-07-14 15:51:45 +02:00
Daniel Marjamäki
954400a382
Add simple xml debug output. When both --xml and --debug is used there will be xml debug output.
2014-07-13 17:21:45 +02:00
Dmitry-Me
ba3757dfd3
Bring variables decalaration to where they are really needed.
2014-07-10 11:23:14 +04:00
Dmitry-Me
d0cbfeb186
Use references instead of deep copying the strings
2014-07-09 11:21:38 +04:00
Daniel Marjamäki
14def42c99
Fixed #5972 (FP: Buffer is accessed out of bounds)
2014-07-08 16:31:08 +02:00
Daniel Marjamäki
d40b77dce2
Removed special 'else if' handling. this is redundant since these are simplified.
2014-07-02 16:16:19 +02:00
Zachary D. Blair
f6523e384b
Fixed 4979 (Doesn't allow any ordering of int modifiers)
2014-07-01 23:59:04 -07:00
Simon Martin
7b942650c2
Ticket #5952 : Simplify redundant parentheses in pointer variable declarations.
2014-06-28 09:36:51 +02:00
PKEuS
b20f87faf2
Optimized Tokenizer::simplifyPlatformTypes() once more: Another 3% improvement on Windows.
...
-> All Token::Match strings are uppercase, so check Token::isUpperCaseName() to avoid comparisons with very slow long Token::Match strings (idea from amai)
Removed duplicate Token::Match call in symboldatabase.cpp
2014-06-25 20:42:59 +02:00
PKEuS
360fd4a565
Speedup Tokenizer::simplifyMathFunctions() and Tokenizer::simplifyPlatformTypes()
...
-> Speedup on entire checking time (TortoiseSVN code) by 3% (MSVC12, x64, not matchcompiled). Probably only measurable when checking code with Windows platform.
2014-06-25 17:00:59 +02:00
Daniel Marjamäki
ae81b09b58
Refactoring: Move isScopeNoReturn implementation to library and reuse it both in ValueFlow and Tokenizer
2014-06-22 19:13:15 +02:00
Alexander Mai
2e3f26ba58
Patch from Dmitry-Me: reorder checks so that cheaper ones go first, reuse previously computed values, return early on edge condition
2014-06-16 21:36:31 +02:00
Simon Martin
efb12f0409
Ticket #5268 : Properly detect function heads when in Tokenizer::simplifyEnum.
2014-06-15 15:52:58 +02:00
Daniel Marjamäki
17f1841fba
Merge pull request #339 from simartin/ticket_5868
...
Ticket #5868 : Ignore variables called like a typedef when substituting typedefs
2014-06-14 12:38:02 +02:00
PKEuS
8b9daadd25
Replaced static variable isCPP in Token (was not threadsafe):
...
- Encapsulate parameters passed through AST compiler functions in a struct
-> Reduces maintenance overhead when changing them
-> Contains parameter indicating if the file is C or C++
- Added eKeyword Token type (at the moment, only true for C++ keyword "delete", but should be set for other keywords as well)
2014-06-14 10:28:12 +02:00
Simon Martin
d588ed49b3
Ticket #5868 : Ignore variables called like a typedef when substituing typedefs.
2014-06-14 00:50:14 +02:00
Daniel Marjamäki
a4a6f3e1be
Tokenizer: Removed Tokenizer::simplifyConditionOperator(). Using the AST and ValueFlow, it should be much easier to parse ?: than before.
2014-06-10 19:30:13 +02:00
Simon Martin
dc12a73987
Ticket #5907 : Properly handle extern declarations in Tokenizer::simplifyVarDecl.
2014-06-08 14:59:58 +02:00
Daniel Marjamäki
a41f6077e1
Tokenizer: Use 'podtype' info from library. Partial fix for #5623
2014-06-08 13:28:15 +02:00
Dmitry-Me
7692a306cd
Cleanup code - reorder checks and make variable declaration scope narrower.
2014-06-06 18:58:20 +04:00
PKEuS
f6c9320aee
Fixed incorrect usage of startOfExecutableScope() (Checking time reduced by ~60% (nonlinear) for #5876 )
2014-06-05 10:45:26 +02:00
PKEuS
39b64ea5fb
Simplify rValue reference arguments without name (&& -> & &)
2014-06-04 18:45:56 +02:00
PKEuS
8db0790407
Tokenizer::tokenize() can now be called without AST being created
2014-06-04 18:45:28 +02:00
PKEuS
d93d7401c6
Moved getSourceFilePath(), isC() and isCPP() from Tokenizer to TokenList
...
Conflicts:
lib/tokenize.cpp
2014-06-04 18:36:25 +02:00
orbitcowboy
60e80b6fb1
Fixed #5885 - fsanitize=undefined: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int' in lib/tokenize.cpp.
2014-05-29 18:25:01 +02:00
Simon Martin
c027c526a9
Remove unnecessary declaration (one line before the actual definition...
2014-05-25 22:04:51 +02:00
PKEuS
38aaa46804
Stabilized AST:
...
- Fixed broken simplification causing crashs when cast was followed by unary minus (real world examples from arch/parisc/math-emu/ (linux-kernel))
- Stabilized determination of unary and binary operators
2014-05-24 19:05:04 +02:00
Simon Martin
fcff8d39d9
Ticket #5816 : Properly handle template'd template parameters in enum initializers.
2014-05-23 21:25:42 +02:00
orbitcowboy
6183f21070
Fixed CID 1037088 Dereference after null check in Tokenizer::simplifyLabelsCaseDefault.
2014-05-23 21:38:56 +02:00
orbitcowboy
d19f676547
Fixed travis build warning (Check Internal).
2014-05-22 18:00:06 +02:00
orbitcowboy
031020ae4a
#Fixed 5485: Wrong simplification of numbers like 1e+007 to 1e+007.0
2014-05-22 17:40:15 +02:00
PKEuS
d19eabde42
New Check: Compare pointer with '\0' ( #4070 )
2014-05-21 19:12:07 +02:00
PKEuS
7b1eca700b
Fixed bug in setVarId: VarIds for member functions defined inline in class were not properly set
2014-05-21 17:30:58 +02:00
orbitcowboy
e3009bdd0b
Tokenizer:simplifyKeyword(): Improved matching when the static keyword is removed.
2014-05-13 16:47:55 +02:00
orbitcowboy
90c1016c74
Fixed #5842 : remove C99 static keyword between [] in tokenizer.
2014-05-13 16:28:28 +02:00
Alexander Mai
be9a566d48
Refactoring/small corrections to fix warnings from clang -fsanitize=undefined 'member call on null pointer'
2014-05-20 21:55:08 +02:00
PKEuS
8cb1f09fc2
Silenced travis errors (avoid false positive)
2014-05-19 20:56:05 +02:00
PKEuS
5fbd58d98d
Fixed messages of CheckInternal, fixed a false positive.
2014-05-18 20:39:52 +02:00
PKEuS
b162560755
Refactorizations:
...
- Removed some duplicate nullpointer checks
- Simplified tok->link() on '<' usage.
2014-05-18 17:07:21 +02:00
Simon Martin
69d294c6c4
Ticket #5816 : Skip typename in template arguments for enum initializers.
2014-05-17 08:50:12 +02:00
Simon Martin
92cc17110d
Ticket #5814 : Handle A::B as template parameter for enum initializers.
2014-05-15 21:52:57 +02:00