[cfe-commits] r96202 - /cfe/trunk/lib/Checker/LLVMConventionsChecker.cpp

Ted Kremenek kremenek at apple.com
Sun Feb 14 14:58:16 PST 2010


Author: kremenek
Date: Sun Feb 14 16:58:16 2010
New Revision: 96202

URL: http://llvm.org/viewvc/llvm-project?rev=96202&view=rev
Log:
clang::Attr objects should be treated as AST nodes as well by
the LLVMConventionsChecker.

Modified:
    cfe/trunk/lib/Checker/LLVMConventionsChecker.cpp

Modified: cfe/trunk/lib/Checker/LLVMConventionsChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/LLVMConventionsChecker.cpp?rev=96202&r1=96201&r2=96202&view=diff

==============================================================================
--- cfe/trunk/lib/Checker/LLVMConventionsChecker.cpp (original)
+++ cfe/trunk/lib/Checker/LLVMConventionsChecker.cpp Sun Feb 14 16:58:16 2010
@@ -98,6 +98,10 @@
   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 @@
 
 // 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(),





More information about the cfe-commits mailing list