Skip to content
Snippets Groups Projects
Commit 8a7feba1 authored by Axel Naumann's avatar Axel Naumann
Browse files

Syntax; ensure it is a named decl.

(cherry picked from commit 123c1b59beead41023c740b9cf954f1aa80c6b9e)
parent 1f9d47b5
No related branches found
No related tags found
No related merge requests found
......@@ -87,13 +87,13 @@ void StoredValueRef::StoredValue::Destruct() {
// `-ImplicitCastExpr 'struct XB *' <LValueToRValue>
// `-DeclRefExpr 'struct XB *' lvalue ParmVar 'obj' 'struct XB *'
if (getClangType.isConst())
if (getClangType().isConstQualified())
return;
const RecordType* RT = dyn_cast<RecordType>(getClangType());
if (!RT)
return;
CXXRecordDecl* CXXRD = dyn_cast<CXXRecordDecl>(RT->getDecl());
if (!CXXRD || CXXRD->hasTrivialDestructor())
if (!CXXRD || CXXRD->hasTrivialDestructor() || !CXXRD->getDeclName())
return;
CXXRD = CXXRD->getCanonicalDecl();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment