Commit Graph

56 Commits

Author SHA1 Message Date
Oliver Stöneberg 1b4141cbe5
added more missing `sstream` includes () 2022-08-19 18:23:15 +02:00
chrchr-github bb3f490edd
Fix Infinite recursion in findTypeInBase() () 2022-06-08 09:20:16 +02:00
Oliver Stöneberg f32583e097
removed OVERRIDE and FINAL defines and use the keywords directly () 2022-02-10 23:02:24 +01:00
Daniel Marjamäki 3989408738 Update copyright year 2022-02-05 11:45:17 +01:00
Oliver Stöneberg 171da2e6f9
avoid dependency on transitive includes - based on include-what-you-use () 2022-01-27 19:03:20 +01:00
Oliver Stöneberg ba402f3e50
cleaned up includes based on include-what-you-use () 2021-12-15 19:47:27 +01:00
chrchr-github ca311ebcdf
ASSERT() on calls to Tokenizer::tokenize() in test code () 2021-11-29 07:34:39 +01:00
Daniel Marjamäki e4f0096255 TestSimplifyUsing; code cleanup 2021-08-21 10:39:53 +02:00
Daniel Marjamäki ca50dea97d Fix in Tokenizer::simplifyUsing for non-scopes 2021-08-21 10:10:40 +02:00
Daniel Marjamäki d73ab0ad96 Tokenizer::simplifyUsing; Fixed bug when enum class is used 2021-08-20 16:08:01 +02:00
Paul Fultz II 7f358b2bed
Format with uncrustify () 2021-08-07 20:51:18 +02:00
Robert Reif 68898e2be0
fix (Type alias remains unknown with using) ()
Co-authored-by: Robert Reif <reif@FX6840>
2021-07-02 06:19:26 +02:00
Robert Reif e1e822275d
fix daca2 paraview crash from uninstantiated recursive template () 2021-04-29 11:09:51 +02:00
IOBYTE 5568ac95e7
fix simplifyUsing debug warning for: using value_type = const ValueFlow::Value; () 2021-04-17 14:20:16 +02:00
Daniel Marjamäki 42437277dc Update Copyright year 2021-03-21 20:58:32 +01:00
PKEuS 141d2ac215 Refactorization: Improved internal implementation of severity and certainty levels
Backported from LCppC.
2021-02-24 22:00:06 +01:00
IOBYTE fc1cfba5e0
fix simplifyUsing hang parsing class initializer list using {} ()
Co-authored-by: Robert Reif <reif@FX6840>
2021-02-23 20:35:20 +01:00
IOBYTE a07f93f819
fix simplifyUsing crash and hang () 2021-02-23 09:48:15 +01:00
Robert Reif 3c6fae37e4 minor simplifyUsing optimizations
The using type aliases are a C++ 11 feature so only check for them in C++ 11 or later.

Don't try to simplify a type alias when it can't be parsed.
2021-02-19 22:48:31 +01:00
IOBYTE 8547ff8cc2
fix some hangs in daca from uninstantiated template classes derived f… ()
* fix some hangs in daca from uninstantiated template classes derived from itself

* remove assertions

* fix another simplifyUsing hang

Co-authored-by: Robert Reif <reif@FX6840>
2021-02-17 18:12:49 +01:00
IOBYTE 7ab84bef0c
fix daca crash in intel-compute-runtime () 2021-02-15 08:12:29 +01:00
IOBYTE 1eafed9e75
fix hang in simplifyUsing ()
Co-authored-by: Robert Reif <reif@FX6840>
2021-02-12 16:21:51 +01:00
IOBYTE e57a674458
fix (syntax error from wrong simplifications for using type al… () 2021-02-12 09:47:16 +01:00
IOBYTE b6e93bb575
fix (debug: Executable scope 'x' with unknown function.) () 2021-02-11 08:08:45 +01:00
IOBYTE d3d2e16137
fix hang from f48e195c31 (fix TODO test ()) ()
Co-authored-by: Robert Reif <reif@FX6840>
2021-02-09 14:19:01 +01:00
IOBYTE f48e195c31
fix TODO test () 2021-02-07 21:46:35 +01:00
IOBYTE 1872725ca2
fix (debug: Executable scope 'x' with unknown function.) () 2021-02-07 09:04:57 +01:00
IOBYTE c70fcf8e2b
fix (debug: Executable scope 'x' with unknown function.) () 2021-02-05 15:50:32 +01:00
IOBYTE dd866f2898
fix using type alias with derived class () 2021-01-17 16:10:53 +01:00
IOBYTE 277da763aa
fix (debug: Executable scope 'x' with unknown function.) () 2020-12-30 08:09:34 +01:00
IOBYTE 765c1ace87
fix (false negative: knownEmptyContainer with alias in namespace and "using namespace") () 2020-12-26 13:45:17 +01:00
Daniel Marjamäki 2cd8ea83a7 Fixed (unused template not removed properly by default) 2020-11-22 16:43:36 +01:00
Simon Martin 1705d096f7
Simplify empty anonymous namespaces. () 2020-06-07 13:49:04 +02:00
Ken-Patrick Lehrmann 99ff04f617
9757: skip template parameters when computing scope ()
The template parameter is confusing simplifyUsing: it does not compute
properly the scope, and we end up replace "type" in "to_string" with
"void", then later "void" is removed and we have an internal error.
2020-06-06 17:51:15 +02:00
PKEuS fb1afe2345 Fixed test suite: Do no longer apply simplifyTokenList2 to token lists, except for those tests that test those simplifications, because checks are no longer run on that simplified token list
Changed failing unit test to TODO tests, as they indicate patterns we do no longer understand properly.
2020-05-20 18:54:16 +02:00
Daniel Marjamäki 08ddd84780 Update copyright year 2020-05-10 11:16:32 +02:00
Daniel Marjamäki 3e0218299b Revert "Update copyright year"
This reverts commit 6eec6c4bd5.
2020-05-10 11:13:05 +02:00
Daniel Marjamäki 6eec6c4bd5 Update copyright year 2020-05-10 11:11:34 +02:00
Oliver Stöneberg 2c1e36e63e
cleaned up includes based on include-what-you-use ()
* cleaned up includes based on include-what-you-use

* check.h: trying to work around Visual Studio 2012 bug

* fixed Visual Studio compilation
2020-04-13 13:44:48 +02:00
Daniel Marjamäki 5376ba1701 AST: Throw validation exception if ternary operator is missing operands 2020-03-07 21:46:38 +01:00
IOBYTE 5979eec2c0 Fix 9518 (Syntax error on valid C++) () 2019-12-05 20:51:36 +01:00
IOBYTE c98732dd8b fix using type aliases in out of class destructors () 2019-10-08 19:30:41 +02:00
IOBYTE 46f3f58e5f Fix ("debug: Executable scope 'x' with unknown function." with alias used in initialization list) () 2019-10-05 09:34:37 +02:00
IOBYTE 50d82763fc Fix ("debug: Executable scope 'func' with unknown function" with parameter in member function) () 2019-10-03 21:13:03 +02:00
IOBYTE 4ba00d0694 Fix (alias in namespace not replaced in method declaration) () 2019-10-02 08:11:04 +02:00
IOBYTE 9569fa1374 Partial fix for (simplifyTypedef: Problem when namespace is used) ()
* Partial fix for  (simplifyTypedef: Problem when namespace is used)

This fixes simplifyUsing which has the same problem as simplifyTypedef.

simplifyUsing was designed to support using namespace but it was never
implemented. The changes are minor to add it.

simplifyTypedef requires much more work to support using namespace.

* reduce scope of variable

* make idx const
2019-07-06 20:22:13 +02:00
Scott Furry a195477470 Correct Zero/Null as pointer constant ()
Building with enhanced clang warnings indicated a large number of
instances with the warning:

`warning: zero as null pointer constant`

Recommended practice in C++11 is to use `nullptr` as value for
a NULL or empty pointer value. All instances where this warning
was encountered were corrected in this commit.

Where warning was encountered in dependency code (i.e. external library)
no chnages were made. Patching will be offered upstream.
2019-06-30 21:39:22 +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 d58d4273f9 Cleaning up unsimplified templates 2019-05-11 13:00:03 +02:00
Daniel Marjamäki f6527fcd9b fixed tests, unused templates are removed by default 2019-05-05 19:40:58 +02:00