We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c14fc7 commit ebaa7ceCopy full SHA for ebaa7ce
1 file changed
lib/checkmemoryleak.cpp
@@ -1052,6 +1052,9 @@ void CheckMemoryLeakNoVarImpl::checkForUnreleasedInputArgument(const Scope *scop
1052
if (alloc == New || alloc == NewArray) {
1053
const Token* typeTok = arg->next();
1054
bool bail = !typeTok->isStandardType() &&
1055
+ (!typeTok->valueType() ||
1056
+ (typeTok->valueType()->type < ValueType::Type::SMART_POINTER &&
1057
+ typeTok->valueType()->type != ValueType::Type::POD)) &&
1058
!mSettings.library.detectContainerOrIterator(typeTok) &&
1059
!mSettings.library.podtype(typeTok->expressionString());
1060
if (bail && typeTok->type() && typeTok->type()->classScope &&
0 commit comments