if (Attr.isSubClassOf("TypeAttr"))
return;
- // This means the attribute is either a statement attribute or a decl
- // attribute, find out which.
+ // This means the attribute is either a statement attribute, a decl
+ // attribute, or both; find out which.
bool CurAttrIsStmtAttr =
Attr.isSubClassOf("StmtAttr") || Attr.isSubClassOf("DeclOrStmtAttr");
+ bool CurAttrIsDeclAttr =
+ !CurAttrIsStmtAttr || Attr.isSubClassOf("DeclOrStmtAttr");
std::vector<std::string> DeclAttrs, StmtAttrs;
if (CurAttrIsStmtAttr)
StmtAttrs.push_back((AttrToExclude->getName() + "Attr").str());
- else
+ if (CurAttrIsDeclAttr)
DeclAttrs.push_back((AttrToExclude->getName() + "Attr").str());
}
}