[clang] 72efe15 - Reapply 44c0719e77b37374c89b7fc1320664ebb404323d with fix; NFC (#125100)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 30 12:24:47 PST 2025
Author: Aaron Ballman
Date: 2025-01-30T15:24:43-05:00
New Revision: 72efe15c2bf262607420f81ab3b3b52f82698b4b
URL: https://github.com/llvm/llvm-project/commit/72efe15c2bf262607420f81ab3b3b52f82698b4b
DIFF: https://github.com/llvm/llvm-project/commit/72efe15c2bf262607420f81ab3b3b52f82698b4b.diff
LOG: Reapply 44c0719e77b37374c89b7fc1320664ebb404323d with fix; NFC (#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.
Added:
Modified:
clang/include/clang/AST/DynamicRecursiveASTVisitor.h
Removed:
################################################################################
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"
More information about the cfe-commits
mailing list