Daniel Marjamäki
36b6fb9f4d
Fixed #8558 (False portability positive caused by incorrect method resolution)
2019-05-30 19:24:51 +02:00
Daniel Marjamäki
4da50942b0
Fixed #8120 (False positive: Memory pointed to by 'p' is freed twice)
2019-05-30 16:22:41 +02:00
orbitcowboy
55df395a4e
Running astyle [ci skip]
2019-05-30 14:41:14 +02:00
Ken-Patrick
3cdc236e10
Fix false positive with several ! (not) operators ( #1856 )
...
With the following code
int f(int x, int y) {
if (!!(x != 0)) {
return y/x;
}
cppcheck would wrongly warn that there might be a division by zero in
"return y/x;".
2019-05-29 09:45:15 +02:00
IOBYTE
1e7f5010eb
template simplifier: fix expansion of template arguments in default parameter instantiation ( #1857 )
2019-05-28 21:32:37 +02:00
orbitcowboy
66e8ec90de
wxwidgets.cfg: Added support for wxWindow::ClientToScreen().
2019-05-28 08:50:38 +02:00
orbitcowboy
f54c60c13d
Running astyle [ci skip]
2019-05-28 08:49:59 +02:00
IOBYTE
e8692b012f
template simplifier: partial fix for instantiation of templates with type trait parameters ( #1855 )
2019-05-27 20:51:52 +02:00
Paul Fultz II
312fdf157b
Fix issue 9144: Syntax error with type intrinsics ( #1852 )
...
* Fix issue 9144: Syntax error with type intrinsics
* Only run when using cpp
2019-05-27 06:54:21 +02:00
Paul Fultz II
61935802d1
Fix issue 9141: Syntax error ( #1853 )
2019-05-27 06:50:43 +02:00
orbitcowboy
b3c3ecf926
MathLib: Removed condition that is evaluates always to 'false'.
2019-05-26 10:46:12 +02:00
Paul Fultz II
eb1c9ba357
Cache template name position to improve performance
...
This improves the performance of the templatesimplefier by caching the template name position. I am not sure if the works entirely correctly but all the tests do pass with this change. Running this with gtest headers without removing unused template headers the time went from 48s to 5s, almost a 10x improvement.
2019-05-25 10:08:51 +02:00
Paul Fultz II
cb7f925f5e
Fix issue 9109: Syntax error for valid C++ code
2019-05-24 10:44:08 +02:00
IOBYTE
5efb23ffff
template simplifier: fix instantiation of variadic template with no arguments ( #1848 )
...
* template simplifier: fix instantiation of variadic template with no arguments
* fix white space change
* add support for <class...>
* add variadic template flag
2019-05-23 20:53:26 +02:00
Daniel Marjamäki
de4a33167d
astyle formatting
...
[ci skip]
2019-05-21 10:43:33 +02:00
Paul Fultz II
9838bfa79f
Fix false positive in constArgument when passing struct member ( #1845 )
2019-05-21 10:41:16 +02:00
Paul Fultz II
9949ae1b4f
Fix issue 8995: False Positive: Redundant code with initializer-list created object ( #1844 )
2019-05-21 10:40:36 +02:00
Paul Fultz II
9055682fdc
Fix synax error in issue 9057 and 9138 ( #1843 )
2019-05-21 08:47:10 +02:00
Daniel Marjamäki
29e5992e51
Fixed #9045 (FP operatorEqRetRefThis - recent regression)
2019-05-20 21:30:20 +02:00
IOBYTE
592ff56b90
template simplifier: fix single parameter template with default value ( #1842 )
...
* template simplifier: fix single parameter template with default value
* fix derived class with single default argument
2019-05-19 19:19:57 +02:00
Paul Fultz II
ce96ec2773
Fix issue 9136: Syntax error on valid C++14 code: createLinks2() failed
2019-05-19 19:06:12 +02:00
Paul Fultz II
8cbd9b03aa
Fix issue 8890: AST broken calling member function from templated base class ( #1836 )
...
* Fix issue 8890: AST broken calling member function from templated base class
* Format
* Check for double bracket
* Add test to createLinks2
* Remove extra test
* Reduce test case for links
2019-05-19 10:05:34 +02:00
Rikard Falkeborn
ada881ccdf
Fix #9130 (FP memory leak with NULL pointer cast) ( #1839 )
2019-05-18 06:22:25 +02:00
Paul Fultz II
cf3515ee61
Fix issue 7372: False positive uninitMemberVar - on template specialization
...
This fixes the issue by skipping diagnostics when the symbols are incomplete in the constructor.
2019-05-17 20:24:41 +02:00
Carlo Marcelo Arenas Belón
bf5c71bdca
sync ( #1835 )
...
* build: remove -Wabi and add -Wundef
gcc >= 8 throws a warning about -Wabi (without a specific ABI version)
being ignored, while -Wundef seems more useful (as shown by the change
in config.h, which was probably an unfortunate typo)
travis.yaml should probably be updated soon, but was left out from this
change as the current images don't yet need it
* lib: unused function in valueflow
refactored out since 8c03be3212
lib/valueflow.cpp:3124:21: warning: unused function 'endTemplateArgument' [-Wunused-function]
* readme: include picojson
* make: also clean exe
2019-05-17 09:31:41 +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
34cf62452e
Change approach for Tokenizer::createLinks2: assume that <> should be linked
2019-05-16 20:50:56 +02:00
Daniel Marjamäki
0144db2490
Fixed 'Syntax Error' when < link is not set properly
2019-05-15 21:34:56 +02:00
Daniel Marjamäki
21ec78d8a1
Fix typo: %stype% => %type%
2019-05-15 09:06:27 +02:00
Daniel Marjamäki
79bb22f038
Fixed #9131 (Tokenizer::createLinks2; using std::list; list<config_option*> stack;)
2019-05-14 20:30:02 +02:00
Paul Fultz II
4e94c64da8
Fix issue 9099 and 9102: Incorrect valueflow for global variables ( #1832 )
2019-05-14 08:58:27 +02:00
Paul Fultz II
195da2b3d2
Fix issue 8993: False positive duplicateCondition related to auto ( #1831 )
2019-05-14 08:57:36 +02:00
Rikard Falkeborn
dc0e8c214e
Fix #9128 (FP in return non bool with class declared in function) ( #1830 )
...
Also break up the tests to smaller tests.
2019-05-14 08:56:28 +02:00
Daniel Marjamäki
9f00149674
Fixed #9127 (ast: wrong ast after using and template instantiation)
2019-05-12 17:24:42 +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
4d9b1e6c3d
Fixed #9094 (Tokenizer::createLinks2 problem with 'x%x<--a==x>x')
2019-05-11 19:11:40 +02:00
Daniel Marjamäki
1e2f1bac1f
Fixed #8921 (Broken AST - mem = (void*)(new char))
2019-05-11 15:50:30 +02:00
Daniel Marjamäki
d58d4273f9
Cleaning up unsimplified templates
2019-05-11 13:00:03 +02:00
IOBYTE
eade2bb2c2
Add support for simplifying user defined literal operator. ( #1827 )
2019-05-09 09:52:18 +02:00
Daniel Marjamäki
a7478bcb5a
Add missing include
2019-05-09 06:55:36 +02:00
Daniel Marjamäki
66b2b31eb0
Fix a few useStlAlgorithm warnings
2019-05-08 20:23:32 +02:00
adamjrichter
47ce998e6e
lib: Separate statements of the form "assert(a && b)" into "assert(a)" and "assert(b)", for more precise diagnostics. ( #1825 )
2019-05-07 10:28:31 +02:00
IOBYTE
5364c6055f
template simplifier: fix cppcheck warning ( #1824 )
2019-05-07 10:26:41 +02:00
IOBYTE
baeae95bac
template simplifier: fix a template alias TODO test ( #1823 )
2019-05-06 19:06:46 +02:00
Daniel Marjamäki
f6527fcd9b
fixed tests, unused templates are removed by default
2019-05-05 19:40:58 +02:00
Daniel Marjamäki
c997186794
Only check unused templates if that is configured
2019-05-05 14:40:30 +02:00
Daniel Marjamäki
7efcb3cfe3
astyle formatting
...
[ci skip]
2019-05-05 11:41:29 +02:00
Paul Fultz II
8c03be3212
Fix issue 9077: False positive: Returning pointer to local variable ( #1821 )
...
* Avoid implicit conversion for lifetimes
* Fix issue 9077
* Add more tests
* Rename function
* Fix implicit conversion with containers
* Format
* Fix crash
2019-05-05 11:40:59 +02:00
Daniel Marjamäki
fe04c15c9e
CheckStl: Modernize the recommendations. string::starts_with is more intuitive than string::compare
2019-05-05 10:35:44 +02:00
Paul Fultz II
a688df0ea1
Fix issue 9120: crash in valueflow ( #1822 )
2019-05-05 09:51:36 +02:00