[clang] d4ff961 - Add missing #include for ObjCMethodDecl.

Jorge Gorbe Moya via cfe-commits cfe-commits at lists.llvm.org
Thu May 30 15:49:39 PDT 2024


Author: Jorge Gorbe Moya
Date: 2024-05-30T15:42:57-07:00
New Revision: d4ff9615a1531f4a466b7d1fb0f175e3ae489289

URL: https://github.com/llvm/llvm-project/commit/d4ff9615a1531f4a466b7d1fb0f175e3ae489289
DIFF: https://github.com/llvm/llvm-project/commit/d4ff9615a1531f4a466b7d1fb0f175e3ae489289.diff

LOG: Add missing #include for ObjCMethodDecl.

DeclBase.h only contains a forward declaration of ObjCMethodDecl, and
when building clang/Sema/Attr.h with header modules this causes a build
failure because `llvm::isa<ObjCMethodDecl>` requires the full type.

Added: 
    

Modified: 
    clang/include/clang/Sema/Attr.h

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Sema/Attr.h b/clang/include/clang/Sema/Attr.h
index 781170feb34ed..1133862568a6c 100644
--- a/clang/include/clang/Sema/Attr.h
+++ b/clang/include/clang/Sema/Attr.h
@@ -14,7 +14,7 @@
 #define LLVM_CLANG_SEMA_ATTR_H
 
 #include "clang/AST/Decl.h"
-#include "clang/AST/DeclBase.h"
+#include "clang/AST/DeclObjC.h"
 #include "llvm/Support/Casting.h"
 
 namespace clang {


        


More information about the cfe-commits mailing list