diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-02-14 22:58:16 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-02-14 22:58:16 +0000 |
commit | 1ed482ba6848703ff9507ee2e336f80e62470344 (patch) | |
tree | 250d9404e2860d80b4abca1b9abf13377330392e /lib/Checker/LLVMConventionsChecker.cpp | |
parent | a6b8793ea88cb7094c2d59e2ef71f921682c1f5a (diff) |
clang::Attr objects should be treated as AST nodes as well by
the LLVMConventionsChecker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96202 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/LLVMConventionsChecker.cpp')
-rw-r--r-- | lib/Checker/LLVMConventionsChecker.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Checker/LLVMConventionsChecker.cpp b/lib/Checker/LLVMConventionsChecker.cpp index 242f4de2b6..14f0fc1280 100644 --- a/lib/Checker/LLVMConventionsChecker.cpp +++ b/lib/Checker/LLVMConventionsChecker.cpp @@ -98,6 +98,10 @@ static bool IsClangStmt(const RecordDecl *RD) { return RD->getName() == "Stmt" && InClangNamespace(RD); } +static bool isClangAttr(const RecordDecl *RD) { + return RD->getName() == "Attr" && InClangNamespace(RD); +} + static bool IsStdVector(QualType T) { const TemplateSpecializationType *TS = T->getAs<TemplateSpecializationType>(); if (!TS) @@ -210,7 +214,7 @@ static bool AllocatesMemory(QualType T) { // This type checking could be sped up via dynamic programming. static bool IsPartOfAST(const CXXRecordDecl *R) { - if (IsClangStmt(R) || IsClangType(R) || IsClangDecl(R)) + if (IsClangStmt(R) || IsClangType(R) || IsClangDecl(R) || isClangAttr(R)) return true; for (CXXRecordDecl::base_class_const_iterator I = R->bases_begin(), |