Commit Graph

12392 Commits

Author SHA1 Message Date
IOBYTE 43ce1607c7
fix a large number of valgrind warnings in testrunner (#2920)
Co-authored-by: Robert Reif <reif@FX6840>
2020-11-24 18:21:07 +01:00
IOBYTE 1ea89bcad8
add support for template constructors (#2911) 2020-11-24 07:21:37 +01:00
Daniel Marjamäki b4db52bf61 Fixed #9860 (wrong ast for placement new 'new ( uBAR ? uBAR : sizeof ( T ) ) T') 2020-11-23 22:03:50 +01:00
Daniel Marjamäki 4a2e082d85 Revert "GUI: restore default tab in ProjectFileDialog"
This reverts commit 39564c9e6c.
2020-11-23 20:18:06 +01:00
Daniel Marjamäki 39564c9e6c GUI: restore default tab in ProjectFileDialog 2020-11-23 19:27:14 +01:00
Daniel Marjamäki 208a4a4548 Check unused templates by default 2020-11-23 18:29:08 +01:00
Daniel Marjamäki 2cd8ea83a7 Fixed #9860 (unused template not removed properly by default) 2020-11-22 16:43:36 +01:00
Paul Fultz II 4a8a78a925
Fix issue 10002: False positive: constParameter with reference to pointer (#2918) 2020-11-22 08:47:24 +01:00
Paul Fultz II bf00d521d7
Show which rules are being processed (#2916) 2020-11-22 08:46:50 +01:00
Oliver Stöneberg b7c573bc9b
removed the *_sanitized targets used by fuzz-client from CMake - if you need this to be sanitized use CMAKE_CXX_FLAGS / fixed linking of fuzz-client (#2914) 2020-11-21 07:44:22 +01:00
Paul Fultz II f6399c4cba
Fix issue 9980: FP nullPointerRedundantCheck - condition after while loop (#2912) 2020-11-20 09:36:09 +01:00
Daniel Marjamäki 5e69def679 Code cleanup; Remove unused functions 2020-11-18 20:27:51 +01:00
Daniel Marjamäki 3c207da910 Code cleanup. Fix gcc warning. 2020-11-18 15:43:09 +01:00
Paul Fultz II e8c1c792a5
Fix issue 9987: false positive: danglingTempReference with && variable and assignment (#2907) 2020-11-17 06:52:12 +01:00
IOBYTE c4b3d4cd77
fix #9983 (TemplateSimplifier: template not simplified : f(0,0);) (#2905)
Currently template type deduction for functions only works for single
template argument single function argument functions with a literal
argument.

This patch starts to add support for single template argument multiple
function argument functions.  It correctly handles functions with
multiple arguments of the same type. It also handles a mix of template
and non-template arguments.

It does not add support for overloading non-template arguments.
It does not add support for multiple parameter template functions.
It does not add support for type deduction from variable arguments.

Co-authored-by: Robert Reif <reif@FX6840>
2020-11-17 06:51:32 +01:00
Daniel Marjamäki 22d6160624 Improve handling of decltype 2020-11-16 20:11:26 +01:00
Daniel Marjamäki ad4185428e Run dmake again 2020-11-16 09:14:31 +01:00
Daniel Marjamäki c7cbe7f2d3 rename externals/tinyxml to externals/tinyxml2 2020-11-16 09:11:53 +01:00
Daniel Marjamäki 8b0699cd6a Revert "improved decltype() handling"
This reverts commit 6e8f77c519.
2020-11-15 21:32:05 +01:00
Daniel Marjamäki 6e8f77c519 improved decltype() handling 2020-11-15 20:58:17 +01:00
Daniel Marjamäki 7878eb2512 AST: Do not generate AST for decltype 2020-11-15 16:47:36 +01:00
Daniel Marjamäki 54a93c4374 Fixed #9452 (FP syntaxError - _Pragma before struct with two constructors) 2020-11-15 15:03:47 +01:00
Daniel Marjamäki 6236beeb3f Fixed #9950 (Wrong severity for redundantAssignInSwitch) 2020-11-15 13:09:28 +01:00
Ken-Patrick Lehrmann 7c3afa0b36
9955: Fix ast when throwing a cast (#2900)
```
throw (std::string)"Error: " + strerror(errnum);
```
would result in a broken ast:
```
throw
`-::
  |-std
  `-string
```
instead of
```
throw
`-+ 'signed char *'
  |-( 'container(std :: string|wstring|u16string|u32string)'
  | `-"Error: " 'const char *'
  `-( 'signed char *'
    |-strerror
    `-errnum 'signed int'
```
2020-11-15 10:37:29 +01:00
Daniel Marjamäki ef5d5e84c5 Fixed #8936 (Add PicoJSON Copyright notice) 2020-11-14 21:31:50 +01:00
Daniel Marjamäki b7f812739c astyle formatting 2020-11-13 15:52:57 +01:00
Falital 2e2d4a0055
Added Hash to plist file names (#2898) 2020-11-13 15:52:24 +01:00
Rikard Falkeborn 324e267559
getSizeOf: Handle long double (#2888) 2020-11-11 22:51:17 +01:00
Daniel Marjamäki 4330a43acb Fixed #9933 (FP: uninitvar when reading to struct) 2020-11-11 22:47:23 +01:00
Daniel Marjamäki c95b0d2a51 Fixed #9977 (Template simplifier does not simplify in header) 2020-11-11 09:50:51 +01:00
Daniel Marjamäki 7182da5c8e astyle formatting 2020-11-11 09:17:54 +01:00
Rikard Falkeborn 829c543331
TestCondition: Don't warn when sizeof is involved (#2896) 2020-11-11 08:01:11 +01:00
IOBYTE e785885b4d
fix #9975 (Template method not simplified) (#2894) 2020-11-10 21:19:04 +01:00
fwingerter-Ocient d7473cab8c
Handle static_assert if standard is at least C++11 (#2842)
Previously it was being handled only if the standard was *exactly* C++11.
2020-11-10 18:22:08 +01:00
Paul Fultz II bd7e915c20
Add generic reverse valueflow (#2878) 2020-11-10 16:00:55 +01:00
Ken-Patrick Lehrmann 79bdd64689
Fix false positive memoryleak (#2882)
```
int *f() {
  int *p = static_cast<int *>(realloc(nullptr, 10));
  if (!!(!p)) {
    return nullptr;
  }
  return p;
}

```
would give
```
memleak2.cpp:4:5: error: Memory leak: p [memleak]
    return nullptr;
    ^
```
Because of the additional `!!̀ .
2020-11-10 15:59:51 +01:00
Paul Fultz II ae6f611df0
Fix issue 9973: False positive: mismatching iterator container, reference (#2893) 2020-11-10 09:38:05 +01:00
Daniel Marjamäki bd5fc4b579 Clang import: Fixed variable type for pointers 2020-11-10 09:35:41 +01:00
Daniel Marjamäki 7e8f405c6d Refactoring 2020-11-09 21:14:46 +01:00
Daniel Marjamäki bd5b2133ab Clang import: Variable::isReference() should return true for r-value references also 2020-11-09 21:00:48 +01:00
Daniel Marjamäki 5cfe2e319c Clang import: Fix Variable::isRValueReference 2020-11-09 20:44:46 +01:00
Daniel Marjamäki 970beaa79a Clang import: Fix Variable::isReference 2020-11-09 20:35:00 +01:00
Daniel Marjamäki 0ac4de2a5e Small refactoring 2020-11-09 19:30:05 +01:00
Daniel Marjamäki 8b52ed590e Clang import: Better handling of const methods 2020-11-09 14:50:34 +01:00
Daniel Marjamäki 06909df8f5 Clang import: better handling of ArrayToPointerDecay implicit casts 2020-11-08 19:53:28 +01:00
Daniel Marjamäki 1c742b7995 Clang import: Handle AccessSpecDecl 2020-11-08 17:02:19 +01:00
Daniel Marjamäki 818e1574ad Fix Cppcheck self check warning 2020-11-08 10:57:48 +01:00
Daniel Marjamäki 1078855029 Clang import: Full name for methods 2020-11-08 10:31:48 +01:00
Daniel Marjamäki 87323b33bd Clang import: Fixed problems when handling CXXConstructorDecl 2020-11-08 01:17:34 +01:00
Daniel Marjamäki 565e67d373 Clang import: Ignore VisibilityAttr 2020-11-07 22:27:11 +01:00