* Check for functions calls in sizeof calculations
* Use seperate message and id for sizeofFunction
* Check for overloads
* Using decltype with a function should not be an error
* Fix warning
* Fix false positives when running pass the close paren
* Fix test error
* Try to fix more false positives
* Traverse using astOperand2
* Only check first argument
* Update fixes from feedback from PR
* platform.cpp: Fix that platform files on Windows are not found
I suggested this change here:
https://trac.cppcheck.net/ticket/8242#comment:7
* Use fromNativeSeparators() and only search for forwardslash
* Fix#8382 (Syntax error when scanning code with template and attribute)
This commit only addresses #8382. There are issues concerning which
versions of C++ should be supported and also generic C++ 14 attribute
support which can be revisited later.
* Remove all C++ style attributes.
Remove all C++ style attributes when C++ version is 11 or greater.
Rename simplify function to simplifyCPPAttributes.
Handle more cases of roreturn function attribute.
The following snippet triggerd the error:
template<typename DerivedT>
template<typename T>
auto ComposableParserImpl<DerivedT>::operator|( T const &other ) const -> Parser {
return Parser() | static_cast<DerivedT const &>( *this ) | other;
}
Whenever simplifyFunctionParameters was called on a templated class'
templated member function (and probably any nested template), the
tokenizer would recognise it as a syntax error, assuming that return
type *must* come after a template<> token.
There is a potential `nullPointer` dereference in symboldatabase. This PR attempts to fix this. Additionally, this could be detected by Cppcheck as well.
Here is a reduced and compilable testcase, where Cppcheck fails to detect a potential `nullPointer` dereference:
```
class Scope
{
public:
bool bar();
int *definedType;
};
int f(Scope *new_scope)
{
int ret = 1;
if (new_scope)
{
if (new_scope->bar())
{
if (!new_scope->definedType) {} // check for null
ret = *new_scope->definedType; // dereference
}
}
return ret;
}
```
The corresponding ticket on track, addressing the false negative: https://trac.cppcheck.net/ticket/8375