356 Commits

Author SHA1 Message Date
IOBYTE
3159d151d3 Fix symbol database crash on template type aliases by ignoring them. (#1045) 2018-01-21 21:22:26 +01:00
Daniel Marjamäki
c4caee6b18 Updated copyright year 2018-01-14 15:37:52 +01:00
IOBYTE
03603c85cf Fixed #8331 (stack overflow: daca: firefox-58.0b14) (#1027) 2018-01-12 08:19:21 +01:00
IOBYTE
cefb2131c7 Add support for simple c++ 11 type ailases like: using INT = int; (#1024)
* Add support for simple c++ 11 type ailases like: using INT = int;

Only types supported by ValueType are supported. Complex types like
function pointers are not supported. Template type aliases are not
supported.

* Fix crash when type in using type alias is simplified away.

This fixes a crash when size_t is replaced with unsigned long in: using
size_t = unsigned long; by the tokenizer.

This does not fix the problem where Tokenizer::simplifyPlatformTypes()
simplifies away size_t in other cases.  This is only a problem when the
new type is different from the platform type.
2018-01-10 22:16:18 +01:00
Iván Matellanes
cfeea3d35c Fixed #7331: Detect copy and move constructors with default parameters (#1018) 2018-01-07 14:20:19 +01:00
Martin Ettl
53fbfc9fdb test: Various micro optimizations: Replaced std::string() with std::string(). Use std::string::clear() instead of s = and prefer std::string::empty() instead of (s == ) for checking a string is empty. 2018-01-05 22:03:49 +01:00
Robert Reif
69b75c43b4 SymbolDatabase: fix wrong type in union test. 2017-10-15 09:45:02 -04:00
IOBYTE
352fd7a381 SymbolDatabase: Add support for functions in unions. (#973) 2017-10-15 11:49:36 +02:00
Dmitry-Me
cad30446e4 Resolve C4800 2017-10-14 22:50:56 +03:00
Ayaz Salikhov
be2c65eb58 Simplify int vs bool 2017-10-08 07:54:39 +02:00
Daniel Marjamäki
fe0a514a7c Fix testrunner 2017-09-16 02:13:48 +02:00
Dmitry-Me
6303437163 Resolve C4800 2017-08-15 17:42:56 +03:00
Robert Reif
354a773bfe Fix #8020 (ValueType: no value type for iterator + constant) 2017-07-16 11:27:32 -04:00
Daniel Marjamäki
fabe07ffd6 Merge pull request #924 from IOBYTE/master
Fixed #6985 (SymbolDatabase: Function pointer not set when calling bas…
2017-07-16 14:04:25 +02:00
Robert Reif
b0aec042a6 Fixed #6985(SymbolDatabase: Function pointer not set when calling base class function)
Use using namespace when looking up types.
2017-07-15 19:14:15 -04:00
Ayaz Salikhov
28aa939d69 iwyu - include what you use 2017-05-27 04:33:47 +02:00
PKEuS
68d77b73da SymbolDatabase: Fixed parsing of unnamed arguments, properly detect pointers (#8052) 2017-05-07 09:03:58 +02:00
Robert Reif
e2bfe1c0ec Fixed #8044: Crash below SymbolDatabase::setValueType 2017-05-01 14:12:50 -04:00
IOBYTE
8a668aa860 Add missing else that could cause an extra try scope to be added to the scope list (#8025)
Add an optional extended description…
2017-04-30 08:58:41 +02:00
Robert Reif
78ad9825af Add support for auto variables in regular for loop. 2017-04-21 15:25:02 -04:00
Robert Reif
0ff8e49b69 Add support for auto variable initialized from function return type. 2017-04-20 15:22:57 -04:00
Robert Reif
69d18d9c29 Fix #7963: crash; Variable::setFlag ; gecko-dev , dom/canvas/WebGLTransformFeedback.cpp 2017-04-20 10:03:29 -04:00
Matthias Krüger
494f64cb88 tests: fix some self-check findings about functions that can be static.
Was:
[test/testtype.cpp:223]: (performance, inconclusive) Technically the member function 'TestType::removeFloat' can be static.
[test/testsymboldatabase.cpp:61]: (performance, inconclusive) Technically the member function 'TestSymbolDatabase::getSymbolDB_inner' can be static.
[test/teststl.cpp:1437]: (performance, inconclusive) Technically the member function 'TestStl::getArraylength' can be static.
2017-04-09 17:28:00 +02:00
Daniel Marjamäki
fd2651909c Fixed #7978 (ValueType: container type not set properly) 2017-04-06 07:07:20 +02:00
Daniel Marjamäki
fee86b9684 ValueType: Better handling of 'new Container' 2017-04-05 22:05:29 +02:00
Daniel Marjamäki
92fe210217 tweaked TestSymbolDatabase test case for unknown type. 2017-04-02 15:38:06 +02:00
Daniel Marjamäki
b7dcdc00d0 Fixed #7970 (ValueType: no types set below 'new std::string') 2017-04-01 22:22:37 +02:00
PKEuS
ea215c3b7b Fixed false positives in CheckClass::checkConst() due to unmatched function overloads
Fixed function matching if constness mismatches
2017-04-01 10:19:32 +02:00
Daniel Marjamäki
164df2aa7b Fixed #7966 (ValueType: wrong type for gcc initialization {[1]=..}) 2017-03-31 09:41:38 +02:00
Daniel Marjamäki
2da3123db2 Fix ValueType. The '[' in variable declaration is not a dereference. 2017-03-30 11:01:29 +02:00
IOBYTE
7cae057615 Add missing varid or variable for member variables.
Add an optional extended description…
2017-03-30 10:07:58 +02:00
Robert Reif
c96e8daebc Don't change varid of member variables. 2017-03-25 10:59:35 -04:00
PKEuS
f4c0ab5dd5 SymbolDatabase: Match function overloads by using ValueType information by running a second pass of the function pointer assignment routine. 2017-03-24 12:19:29 +01:00
Robert Reif
bc87e874e9 Add variable and type information for auto and auto variables in range based for loops of containers. 2017-03-23 20:14:49 -04:00
Robert Reif
7adfb6e0e4 Add variable and type information to tokens for C array range based for loops. 2017-03-23 19:48:20 -04:00
Robert Reif
f8dd6ee014 Fix test code so it compiles. 2017-03-23 19:16:15 -04:00
Robert Reif
662bc6f846 Add variable or type information to auto and auto variable tokens. Changing the auto variable type requires rerunning the variable pointer pass to correct the symbol database for the new type. 2017-03-22 22:09:40 -04:00
PKEuS
8a3fb4dd6c SymbolDatabase: Fixed return type token detection for template member functions (#7945) 2017-03-16 20:47:24 +01:00
PKEuS
bcba27fbb9 SymbolDatabase: Removed unnecessary bailout in function matching for pointers in function overload matching 2017-03-15 18:45:33 +01:00
PKEuS
b27ba72fdd SymbolDatabase: Support function overload matching for member variables (#7932) 2017-03-15 18:37:22 +01:00
Daniel Marjamäki
f3c0461001 ValueType: handling scoped types in 'new ...' 2017-03-05 10:24:51 +01:00
Daniel Marjamäki
e0dd0a82ed ValueType: refactor and improve handling of 'new ...' 2017-03-05 10:02:47 +01:00
Robert Reif
e02b2c4483 ValueType: handle new nothrow 2017-03-05 02:13:00 +01:00
Daniel Marjamäki
920398615d ValueType: handle scoped types in parsedecl 2017-03-05 01:21:02 +01:00
Daniel Marjamäki
12fe4a8b3e Fixed #7885 (ValueType: Wrong type for large hexvalue (platform=win32A)) 2017-03-04 14:19:14 +01:00
Daniel Marjamäki
45c5860ca4 Fixed #7926 (Memory Leak with auto not detected) 2017-03-02 22:24:26 +01:00
Daniel Marjamäki
51b5f1c286 Fixed #7931 (crash: SymbolDatabase: Variable::setFlag) 2017-03-01 17:13:22 +01:00
PKEuS
85768f1829 SymbolDatabase: Overload matching with boolean literals as argument and with arbitrary null-pointers 2017-02-28 22:43:47 +01:00
PKEuS
942644fde6 SymbolDatabase: Overload matching with character literals as argument 2017-02-28 22:08:41 +01:00
Daniel Marjamäki
beaf29c158 SymbolDatabase: Update some properties for auto variables 2017-02-27 23:04:25 +01:00