Commit Graph

93 Commits

Author SHA1 Message Date
IOBYTE 78b9fd9bb9 Fix #9383 ("debug: Function::addArguments found argument 'x' with varid 0." with variadic templates) (#2238) 2019-10-06 12:45:42 +02:00
IOBYTE c32a568c1f fix #8965 ("(debug) Executable scope 'x' with unknown function." with rvalue parameter in method) (#2237)
I fixed the AST enough to pass testrunner but I don't believe it is
correct.

This code:

void Foo4(int&&b);

has this AST:

( 'void'
|-Foo4
`-&& 'bool'
  |-int
  `-b 'signed int'

but I don't believe && should have `bool`.
2019-10-04 12:30:11 +02:00
Daniel Marjamäki 742c437953 Fixed #9354 (Unknown macro is not reported and then Cppcheck is silent about issues) 2019-09-13 13:05:48 +02:00
IOBYTE e5220bdf0c make ellipsis ... a single token (#2143)
* make ellipsis ... a single token

Using cppcheck -E to preprocess code with ellipsis produces output that
can't be compiled because ... is split into 3 tokens.

* try to fix addon
2019-09-04 08:07:30 +02:00
IOBYTE bee248b2de token simplifier: fix namespace, token link and syntax error support for template type aliases (#1863) 2019-06-01 10:52:29 +02:00
Daniel Marjamäki 57c6628732 Revert 'Cleaning up unsimplified templates'. This fix caused problems. 2019-05-16 21:11:04 +02:00
Daniel Marjamäki 27fad38e00 Fixed #9084 (Tokenizer::setVarId: Same varid for member variable and argument, unknown template type) 2019-05-12 09:10:37 +02:00
Daniel Marjamäki d58d4273f9 Cleaning up unsimplified templates 2019-05-11 13:00:03 +02:00
IOBYTE 7799ed4243 Fixed #8889 (varid on function when using trailing return type.) (#1800)
* Fixed #8889 (varid on function when using trailing return type.)

Don't set varid for trailing return type.

* Add a test for #9066 (Tokenizer::setVarId: varid set for trailing return type)
2019-04-18 20:22:39 +02:00
Daniel Marjamäki e0f1418228 Fixed #9034 (Tokenizer::setVarId: function call parameter is not variable declaration) 2019-03-24 07:06:21 +01:00
IOBYTE 155e4ce912 Fixed #8971 ("(debug) Unknown type 'x'." using alias in class members) (#1653)
* Fixed #8971 ("(debug) Unknown type 'x'." using alias in class members)

* template simplifier: partial fix for #8972

Add support for multi-token default template parameters.

* template simplifier: fix for #8971

Remove typename outside of templates.
2019-02-09 08:34:59 +01:00
Daniel Marjamäki bd7790fd8c Update copyright year 2019-02-09 07:24:06 +01:00
Daniel Marjamäki ae001d4336 Fixed #8957 (Tokenizer::setVarId: varid not set when lambda function is used) 2019-02-03 08:57:04 +01:00
IOBYTE 98fc6d1d32 Fixed #8959 ("(debug) Unknown type 'x'" with using/alias) (#1635)
* Fixed #8959 ("(debug) Unknown type 'x'" with using/alias)

* fix cppcheck warning
2019-01-31 23:57:37 +01:00
Daniel Marjamäki 022259caf3 Fix Cppcheck warning
[ci skip]
2019-01-12 19:11:18 +01:00
Daniel Marjamäki 8dd641b8be Use OVERRIDE in test 2019-01-12 15:45:25 +01:00
Daniel Marjamäki 8087cfed5d Fixed #8627 (Tokenizer::setVarIdPass2: constructor parameter) 2018-12-02 09:28:05 +01:00
Daniel Marjamäki 69f2e0938a VarId: Improved varids for struct members (#8844) 2018-11-14 19:11:35 +01:00
Daniel Marjamäki 93cde415a7 Fixed #7988 (variable in condition gets wrong varid) 2018-11-11 07:50:25 +01:00
Daniel Marjamäki c3e6e7c338 Fixed #8664 (setVarId: Wrongly set varid for lambda argument) 2018-10-07 20:40:59 +02:00
Daniel Marjamäki 45379a3aa6 Updated copyright year for modified files
[ci skip]
2018-06-10 22:07:21 +02:00
IOBYTE ce50df8047 Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
Daniel Marjamäki c4caee6b18 Updated copyright year 2018-01-14 15:37:52 +01:00
Daniel Marjamäki fc1ac180e6 Fixed #6218 (Template type aliasing misdetection) 2017-12-29 22:47:07 +01:00
Daniel Marjamäki 6b1a2dcc5d Fixed #7788 (Varid missing for member variable in ctor of template class) 2017-11-10 21:03:15 +01:00
Daniel Marjamäki 799f953c00 Fixed #8269 (Tokenizer: wrong varid (using namespace A::B)) 2017-11-09 23:15:16 +01:00
Daniel Marjamäki 2408f01cc0 Fixed #8270 (Tokenizer: wrong varid (using namespace std)) 2017-11-09 22:08:58 +01:00
Daniel Marjamäki b67cf0a475 Improved handling of varid in complex scopes 2017-11-09 15:58:08 +01:00
Daniel Marjamäki 26b9e1528c Fixed #7000 (Invalid varid - matching class with same name from other namespace) 2017-11-08 22:52:27 +01:00
Daniel Marjamäki 8b384f8ee5 Fixed #4988 (Tokenizer::setVarId: Wrong varid for inline function parameter) 2017-11-05 22:25:46 +01:00
Daniel Marjamäki 324257ef52 Fixed #7823 (No varid for member variable of type std::bitset< static_cast<int>(2) >) 2017-11-05 17:59:34 +01:00
Daniel Marjamäki 94c5c3703c astyle formatting
[ci skip]
2017-08-16 18:56:02 +02:00
Martin Güthle 1d491bd332 Treat noexcept correctly
Converts the noexcept to the already correctly handled noexcept(true)
2017-08-16 11:31:19 +02:00
Ayaz Salikhov 28aa939d69 iwyu - include what you use 2017-05-27 04:33:47 +02:00
Robert Reif c96e8daebc Don't change varid of member variables. 2017-03-25 10:59:35 -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
Daniel Marjamäki 8c707876ed Tokenizer: Don't simplify '({..})' wrongly 2017-03-08 11:41:18 +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
Daniel Marjamäki 5b377ea2e4 Fixed #7821 (segmentation fault, invalid last token) 2016-11-20 14:15:51 +01:00
Harald Scheidl ba6cda9c86 Fixed #7740 (Tokenizer::setVarId: Function declaration does not start with 'return') 2016-10-03 10:02:18 +02:00
Daniel Marjamäki 5e78dae143 Use TODO_ASSERT_EQUALS instead of TODO comments 2016-08-02 19:38:36 +02:00
Daniel Marjamäki cc62259103 Tokenizer: don't set varid on c++11 'template using' type. 2016-08-02 15:04:07 +02:00
Daniel Marjamäki ca929f0f1b Try to fix #7608 (Assertion failed in test/testvarid.cpp at line 1988) 2016-07-19 11:59:37 +02:00
Daniel Marjamäki 83b982064d Fixed #7579 (varid not set properly in 'int b[] = { m * a[0] };') 2016-07-18 15:27:08 +02:00
Daniel Marjamäki b9443771fb cleanup tests 2016-07-18 10:42:03 +02:00
Daniel Marjamäki 710e066a9a Fixed #6406 (VarId: struct member initialization) 2016-05-22 21:18:52 +02:00
Daniel Marjamäki b965cf5491 Fixed #7444 (Tokenizer::varId: Wrong varid when there is anonumous union in class) 2016-05-11 20:43:23 +02:00
PKEuS b65cacf4b1 Tokenizer::simplifyStaticConst(): Support "struct" and operator:: (#7403) 2016-05-04 12:33:19 +02:00
Daniel Marjamäki c7f5ca74bd VarId: Set varid for template parameters (#7046) 2016-01-31 11:07:30 +01:00
Daniel Marjamäki 2627aada07 Fixed #7346 (Tokenizer::setVarId: No varId for member in initialization list) 2016-01-23 08:28:04 +01:00