https://github.com/AaronBallman created 
https://github.com/llvm/llvm-project/pull/125100

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.

>From 731b7395c73753a69be3fbe18e15599089046c2a Mon Sep 17 00:00:00 2001
From: Aaron Ballman <aa...@aaronballman.com>
Date: Thu, 30 Jan 2025 13:07:55 -0500
Subject: [PATCH] Reapply 44c0719e77b37374c89b7fc1320664ebb404323d with fix;
 NFC

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.
---
 clang/include/clang/AST/DynamicRecursiveASTVisitor.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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

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

Reply via email to