Author: Aaron Ballman
Date: 2025-01-30T12:10:48-05:00
New Revision: 44c0719e77b37374c89b7fc1320664ebb404323d

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

LOG: Silence MSVC warnings; NFC

After the changes to DynamicRecursiveASTVisitor, we started getting
several warnings from MSVC like:

warning C4661: 'bool 
clang::DynamicRecursiveASTVisitorBase<false>::WalkUpFromNamedDecl(clang::NamedDecl
 *)':
no suitable definition provided for explicit template instantiation request

These changes silence the warnings by providing a definition for those
functions.

Added: 
    

Modified: 
    clang/include/clang/AST/DynamicRecursiveASTVisitor.h
    clang/lib/AST/DynamicRecursiveASTVisitor.cpp

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/AST/DynamicRecursiveASTVisitor.h 
b/clang/include/clang/AST/DynamicRecursiveASTVisitor.h
index 4e0ba568263bf3..0efb9ca8ee8c5a 100644
--- a/clang/include/clang/AST/DynamicRecursiveASTVisitor.h
+++ b/clang/include/clang/AST/DynamicRecursiveASTVisitor.h
@@ -254,6 +254,7 @@ template <bool IsConst> class 
DynamicRecursiveASTVisitorBase {
   virtual bool Traverse##CLASS##Decl(MaybeConst<CLASS##Decl> *D);
 #include "clang/AST/DeclNodes.inc"
 
+#define ABSTRACT_DECL(DECL)
 #define DECL(CLASS, BASE)                                                      
\
   bool WalkUpFrom##CLASS##Decl(MaybeConst<CLASS##Decl> *D);                    
\
   virtual bool Visit##CLASS##Decl(MaybeConst<CLASS##Decl> *D) { return true; }
@@ -275,6 +276,7 @@ template <bool IsConst> class 
DynamicRecursiveASTVisitorBase {
   virtual bool Traverse##CLASS##Type(MaybeConst<CLASS##Type> *T);
 #include "clang/AST/TypeNodes.inc"
 
+#define ABSTRACT_TYPE(CLASS, BASE)
 #define TYPE(CLASS, BASE)                                                      
\
   bool WalkUpFrom##CLASS##Type(MaybeConst<CLASS##Type> *T);                    
\
   virtual bool Visit##CLASS##Type(MaybeConst<CLASS##Type> *T) { return true; }

diff  --git a/clang/lib/AST/DynamicRecursiveASTVisitor.cpp 
b/clang/lib/AST/DynamicRecursiveASTVisitor.cpp
index b478e7a39ea186..75d49f6eca76cf 100644
--- a/clang/lib/AST/DynamicRecursiveASTVisitor.cpp
+++ b/clang/lib/AST/DynamicRecursiveASTVisitor.cpp
@@ -221,7 +221,7 @@ template <bool Const> struct Impl : 
RecursiveASTVisitor<Impl<Const>> {
     return Visitor.Traverse##CLASS##Decl(D);                                   
\
   }
 #include "clang/AST/DeclNodes.inc"
-
+#define ABSTRACT_DECL(DECL)
 #define DECL(CLASS, BASE)                                                      
\
   bool Visit##CLASS##Decl(CLASS##Decl *D) {                                    
\
     return Visitor.Visit##CLASS##Decl(D);                                      
\
@@ -246,6 +246,7 @@ template <bool Const> struct Impl : 
RecursiveASTVisitor<Impl<Const>> {
   }
 #include "clang/AST/TypeNodes.inc"
 
+#define ABSTRACT_TYPE(CLASS, BASE)
 #define TYPE(CLASS, BASE)                                                      
\
   bool Visit##CLASS##Type(CLASS##Type *T) {                                    
\
     return Visitor.Visit##CLASS##Type(T);                                      
\


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to