Daniel Marjamäki
30a942af0b
VS: Attempt to fix build problem with VS
2015-10-04 22:58:00 +02:00
Daniel Marjamäki
399cd0c07b
SymbolDatabase: Refactoring AST type information
2015-10-04 20:32:16 +02:00
Daniel Marjamäki
9b253612ca
SymbolDatabase: Add type information in AST
2015-10-04 19:42:58 +02:00
Dmitry-Me
e9cb3d8c97
Consistent variable name
2015-09-04 17:00:44 +03:00
orbitcowboy
c1120c1df4
Merge pull request #672 from Dmitry-Me/fixSpelling
...
Fix spelling
2015-09-04 15:39:03 +02:00
Dmitry-Me
e377a2e9b2
Fix spelling
2015-09-04 16:12:40 +03:00
Dmitry-Me
31014fe334
Omit unneded action
2015-09-04 16:06:20 +03:00
Dmitry-Me
a87990901a
Better variable name
2015-09-04 11:38:46 +03:00
Martin Ettl
08413f0112
test/cfg: Improved testing of std.cfg.
2015-08-29 00:09:33 +02:00
Simon Martin
101cebbde1
Ticket #6957 : Properly handle arrays of pointers in CheckClass::constructors.
2015-08-28 23:06:39 +02:00
PKEuS
39dd71e49b
Merge pull request #653 from Dmitry-Me/reduceVariableScope
...
Reduce variable scope
2015-08-26 14:08:10 +02:00
Dmitry-Me
346f04098c
Reduce variable scope
2015-08-26 14:48:19 +03:00
Simon Martin
6fb19b02d0
Properly differentiate arrays of pointers and pointers to arrays.
2015-08-25 21:19:19 +02:00
PKEuS
a720153e1e
Refactorization: Removed redundant code for syntax error handling in templatesimplifier.cpp and symboldatabase.cpp
2015-08-19 19:29:48 +02:00
Daniel Marjamäki
13cf6be40b
dump: use toxml for function names to handle operator& etc
2015-08-18 15:39:15 +02:00
PKEuS
ab8afec3eb
Refactorizations:
...
- Avoid unnecessary loop iterations
- Avoid unnecessary condition checking
- Reduced code duplication in symboldatabase.cpp
2015-08-16 14:23:07 +02:00
PKEuS
1627b19dd6
Refactorizations:
...
- Call std::string::find() with char instead of char* where possible
- Avoid string copying
- Optimized several Token::tokAt/strAt calls
2015-08-16 10:33:51 +02:00
PKEuS
4d80df2f4a
Added pointer to Type to Token (similar to Token::Variable() and Token::function()):
...
- Accessible via Token::type()
- Renamed former Token::type() to Token::tokType()
- Removed SymbolDatabase::isClassOrStruct()
2015-08-15 11:19:21 +02:00
Daniel Marjamäki
0e82730ee4
addons/naming.py: fixed error report for function name
2015-07-28 14:34:37 +02:00
Daniel Marjamäki
5a57e4030a
dump: Add Function name attribute
2015-07-28 14:18:58 +02:00
PKEuS
258e3b9dc3
Refactorization: Renamed Token::isOperator() to Token::isOperatorKeyword() to avoid confusion with Token::isOp(), use Token::isOperatorKeyword() in setVarId().
2015-07-22 13:57:51 +02:00
Robert Reif
4e693f1620
Fixed #6827
2015-07-22 13:57:51 +02:00
amai2012
4a1695c879
#6807 segmentation fault (invalid code) in Tokenizer::simplifyTypedef. #6808 segmentation fault (invalid code) in Tokenizer::simplifyTypedef. Throw InternalError on garbage code
2015-07-01 16:31:49 +02:00
Alexander Mai
6e03e7dca2
Remove some code checking for invalid class hierarchy which got obsolete since 480a5672b0
. Run astyle
2015-07-01 07:50:13 +02:00
amai2012
480a5672b0
#6298 stack overflow in Scope::findFunctionInBase (endless recursion). Fix handling of circular class hierarchy
2015-07-01 00:04:01 +02:00
amai2012
0849deed01
#6801 C: FN variable scope, FP unused value?. Fix typo from d7aa65c1fc
2015-06-30 08:46:30 +02:00
Alexander Mai
d7aa65c1fc
#6800 segmentation fault (invalid code) in SymbolDatabase::SymbolDatabase. Fix null pointer access for invalid C code
2015-06-29 19:56:02 +02:00
amai2012
4a47b8b3ae
Refactoring: Better distinguish between C and C++ in a few checks.
2015-06-28 16:49:16 +02:00
Alexander Mai
60f5bd97df
Refactoring: missing include added, (potential) multi-threading issue fixed, expose static method to allow unit testing
2015-06-18 19:07:51 +02:00
Alexander Mai
a5a835b1e0
#6771 segmentation fault (invalid code) in SymbolDatabase::SymbolDatabase
2015-06-14 22:18:28 +02:00
Alexander Mai
454d4573b4
#6742 segmentation fault (invalid code) in SymbolDatabase::SymbolDatabase. Fix in Type::initBaseInfo()
2015-06-02 20:15:21 +02:00
amai2012
7895f1c2bb
#6737 Avoid segfault on garbage code inside Type::initBaseInfo. Disable test TestGarbage::garbageCode58() for #6732 since it triggers memory corruption still
2015-06-02 18:28:43 +02:00
Simon Martin
50e5595845
Ticket #6708 : Check that a function name is not a reserved keyword in SymbolDatabase::isFunction instead of later.
2015-05-26 00:28:08 +02:00
Simon Martin
898ba783bf
Ticket #6703 : Rewrite pattern in SymbolDatabase to avoid crash upon garbage code.
2015-05-23 23:18:59 +02:00
Alexander Mai
7416d6add9
Another fix for handling of final/override specifiers in Tokenizer::simplifyKeyword() including a testcase. Ran astyle
2015-05-23 20:51:15 +02:00
amai2012
7c23f4e611
Merge pull request #596 from simartin/ticket_6620-6685
...
Ticket #6620 , #6685 : Reserved keywords cannot be function names.
2015-05-23 13:47:07 +02:00
Alexander Mai
e8d84bc6b4
#6700 const vs non-const inside assert() statement. Function matching in symboldatabase did not honor const'ness of a class instance variable
2015-05-23 11:56:11 +02:00
Simon Martin
67eab0cd7c
Ticket #6620 , #6685 : Reserved keywords cannot be function names.
2015-05-23 11:29:58 +02:00
Simon Martin
25aff001e0
Ticket #6675 : Fixed pattern detecting C++ 11 delegated constructors.
2015-05-10 11:27:47 +02:00
Matthias Krüger
42f0955e3f
Move more setting checks out of loops and use const bools instead. Reorder a few related checks.
...
Follow up to eedcb6abcb
.
2015-04-10 14:31:19 +02:00
Robert Reif
4ceb24630d
Fixed #6568 : Scope for template class member function missing in symboldatabase
2015-04-09 21:01:47 +02:00
PKEuS
d5ad1def40
Removed two unused functions
2015-04-09 20:54:07 +02:00
Frank Zingsheim
1f5265c1bd
Fixed #6253 ([False Positive] Variable not initialized in the constructor)
2015-04-06 19:47:21 +02:00
Robert Reif
c02acea5bf
Fixed #6614 (false positive: (style) The class 'A' does not have a constructor.)
2015-04-04 11:33:25 +02:00
PKEuS
e8161aeda6
Refactorized Scope::getVariableList(): Removed scope depth counter, simplified patterns
2015-03-15 12:37:50 +01:00
Robert Reif
27388c3696
Fixed #6546 (False positive uselessAssignmentPtrArg - triggered by throw?)
2015-02-28 16:07:43 +01:00
Robert Reif
130ffc5752
Fixed #6538 (Symboldatabase: improve isFunction)
2015-02-24 06:11:31 +01:00
Daniel Marjamäki
830d1eb3fd
Revert "Fixed #6538 (Symboldatabase: improve isFunction)"
...
This reverts commit d7ef89bbe6
.
There was crashes in a Travis job.
2015-02-23 08:07:19 +01:00
Robert Reif
d7ef89bbe6
Fixed #6538 (Symboldatabase: improve isFunction)
2015-02-23 06:49:50 +01:00
Dmitry-Me
158a2acc41
Resolve CID 1037075
2015-02-19 17:16:38 +03:00
Robert Reif
323475393b
Symboldatabase: improved debug output
2015-02-04 06:08:41 +01:00
PKEuS
27924d4ae2
Improved detection of array dimensions ( #6430 )
2015-01-31 13:12:06 +01:00
PKEuS
b2835051df
Refactorization: Renamed Token::Match pattern %var% to %name%, implement new pattern %var% which is true if varId > 0.
2015-01-31 12:32:04 +01:00
PKEuS
3a1bd4a5ad
Fixed gcc shadowing warnings
2015-01-30 22:04:26 +01:00
PKEuS
dcc1362890
SymbolDatabase: Support std::array ( fixes #6401 )
2015-01-30 21:56:27 +01:00
PKEuS
5f36c7c914
Improved detection of Type::needInitialization:
...
- Implement shortcut for C code - all types need initialization there
- Break out of loop faster if we encounter a type that needs initialization (it is sufficient if one member needs initialization)
2015-01-21 10:34:58 +01:00
Robert Reif
56dc0b02ef
Fixed #6432 (cppcheck fails to detect ctor - partial template specialization)
2015-01-19 16:15:11 +01:00
Robert Reif
3b8540fdc0
Fixed #6424 (false negative: Use of 'class Ns::C' silence Cppcheck)
2015-01-19 06:38:54 +01:00
Thomas Jarosch
fd01cafb1b
Clean up redundant pointer operations
2015-01-17 16:29:50 +01:00
Robert Reif
68bb197bcb
Destructor detected as constructor resulting in false variable not initialized warnings
2015-01-12 06:11:22 +01:00
PKEuS
d110d715ba
Refactorization: Use Token::link() when stringifying template argument list in symboldatabase.cpp
2015-01-09 22:03:43 +01:00
PKEuS
4da314b2e4
Declared recently added helper functions as static
2015-01-09 21:40:50 +01:00
PKEuS
25cd3794ac
Refactorization: Simplified and unified SymbolDatabase printing
2015-01-09 21:35:16 +01:00
PKEuS
7452613479
Refactorization:
...
- Merged messages exceptThrowInNoexecptFunction, exceptThrowInNoThrowFunction, exceptThrowInAttributeNoThrowFunction and exceptThrowInDeclspecNoThrowFunction into a single message.
- Merged Token::fIsDeclspecNothrow into Token::fIsAttributeNothrow
2015-01-09 20:18:09 +01:00
PKEuS
4d5bf28b33
Refactorization: Removed code for copying attributes from function declaration to implementation in symboldatabase as it is neither tested nor necessary
2015-01-09 19:46:04 +01:00
Robert Reif
6998c55680
Symboldatabase: function return token ( #6244 )
2015-01-09 16:08:34 +01:00
Thomas Jarosch
374af15bd4
Fix parsing linkage specifier from global function declaration
...
Our very own "tools/dmake.cpp" had a function declaration
featuring "static void foobar()" while the function implementation
did not have the 'static' keyword (which is perfectly legal code).
2015-01-09 00:38:25 +01:00
Robert Reif
ba1c24ee65
Fixed #6422 (symbol database: put function flags into a single flag variable)
2015-01-08 05:45:31 +01:00
Daniel Marjamäki
ff11ba9847
Updated copyright year to 2015
2015-01-03 12:14:58 +01:00
Robert Reif
1aa3adbb46
Refactorization: Speedup function lookup in symboldatabase ( #6277 ) (Part 2)
2015-01-02 21:41:01 +01:00
Robert Reif
9a679d1720
Refactorization: Speedup function lookup in symboldatabase ( #6277 )
2015-01-02 16:11:21 +01:00
Thomas Jarosch
69b31a0743
Fix up extra whitespaces in match patterns
...
Detected by new internal check.
2014-12-30 14:53:43 +01:00
Daniel Marjamäki
fb3f5a159d
Token: Added flag for attribute noreturn ( #6328 )
2014-12-24 12:50:51 +01:00
PKEuS
ff5ede342b
Fixed #6266 : Support noexcept(false)
2014-12-09 23:53:50 +01:00
PKEuS
e9bc3b7acf
Fixed #6308 : Properly associate Function with Scope for destructors in SymbolDatabase
2014-12-09 21:36:09 +01:00
Dmitry-Me
7d259c073a
Cache and reuse value
2014-12-02 16:19:52 +03:00
Dmitry-Me
6482fefe3e
Cache and reuse previously computed value
2014-11-30 13:00:27 +01:00
Robert Reif
d12f14844a
Fixed #6279 (False Positive: Member variable 'Fred::i' is not initialized in the constructor)
2014-11-20 06:18:29 +01:00
Alexander Mai
8bcf833bb7
Cure null pointer access within Scope::findFunction introduced by recent cs
2014-11-17 23:10:00 +01:00
Robert Reif
c5e15950df
Fixed #6230 (SymbolDatabase: Wrong function() is set for token)
2014-11-17 16:04:44 +01:00
Robert Reif
67385cfc4b
Symboldatabase: improved look up of delegate constructors
2014-11-13 06:29:51 +01:00
Daniel Marjamäki
189dfd64f7
Revert "Fixed #6230 (SymbolDatabase: Wrong function() is set for token)"
...
This reverts commit 685fce6b91
.
2014-11-11 07:29:16 +01:00
Daniel Marjamäki
685fce6b91
Fixed #6230 (SymbolDatabase: Wrong function() is set for token)
2014-11-07 11:10:20 +01:00
Robert Reif
df6855c216
SymbolDatabase: reintroduce test, move symboldatabase cleanup code to SymbolDatabase destructor
2014-11-02 10:36:52 +01:00
Robert Reif
4eb33e7479
SymbolDatabase: Refactoring of findFunction
2014-11-01 14:36:17 +01:00
Robert Reif
f75aca1921
SymbolDatabase: change symboldatabase::findFunction to only check function arguments for function calls
2014-10-30 13:47:20 +01:00
Frank Zingsheim
41a54fceba
Fixed false positives about uninitialized member variables if variable has a default value ( #5500 )
2014-10-16 21:57:43 +02:00
Frank Zingsheim
9dd3bce98b
Fixed #6214 : non-static member initializer causes false positive
2014-10-16 09:11:09 +02:00
Daniel Marjamäki
82972b7b0d
SymbolDatabase: fix debug output
2014-10-14 19:39:08 +02:00
Daniel Marjamäki
77cffcde38
Fixed #6190 (SymbolDatabase: variable info not set properly when reinterpret_cast is used)
2014-10-12 16:06:50 +02:00
Frank Zingsheim
11867e3210
Fixed #6214 (non-static member initializer causes false positive (function call; initializer))
2014-10-12 15:06:07 +02:00
Dmitry-Me
23bfd21bbc
Don't proceed to outer scope once match is found
2014-10-02 12:24:19 +04:00
PKEuS
0ae09c0029
SymbolDatabase: A token with a varId cannot be a function declaration
2014-09-29 13:05:51 +02:00
Robert Reif
194e4a71a4
Symbol database: handle anonymous namespace
2014-09-24 06:09:08 +02:00
Dmitry-Me
ebf1764bcc
Move variable declarations, remove unneeded assignments, remove comparison duplication
2014-09-19 11:29:31 +04:00
Daniel Marjamäki
29a49d0641
removed some redundant null pointer checks before calling Token::Match
2014-09-14 11:35:04 +02:00
Simon Martin
53b58f0ed9
Refactoring. Use Token::Match instead of hardcoded patterns to increase readability.
2014-09-14 11:26:16 +02:00
PKEuS
605fb9039a
Merge pull request #391 from Dmitry-Me/resolveIssue1037098
...
Resolve CID 1037098
2014-09-06 23:17:52 +02:00
PKEuS
e8f7279039
Refactorization: Moved detection of STL strings to SymbolDatabase
2014-09-05 12:03:08 +02:00
PKEuS
6d27ca6c9a
Fixed SymbolDatabase if unnamed struct is casted and returned ( #6125 )
2014-09-03 11:15:05 +02:00