[clang] [NFC] Remove unneeded forward declaration of diagnoseUncapturableValueReferenceOrBinding() (PR #154591)
Tom Honermann via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 20 11:28:06 PDT 2025
https://github.com/tahonermann created https://github.com/llvm/llvm-project/pull/154591
The only (remaining) use of this forward declaration was removed in
commit 127bf44385424891eb04cff8e52d3f157fc2cb7c.
>From a35c111162390074972fe272bc4f0f2a82da5b65 Mon Sep 17 00:00:00 2001
From: Tom Honermann <tom.honermann at intel.com>
Date: Fri, 31 May 2024 13:15:47 -0700
Subject: [PATCH] [NFC] Remove unneeded forward declaration of
diagnoseUncapturableValueReferenceOrBinding().
---
clang/lib/Sema/SemaExpr.cpp | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index dcd70e6769e23..911c80adfd539 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -3255,10 +3255,6 @@ ExprResult Sema::BuildDeclarationNameExpr(const CXXScopeSpec &SS,
return ULE;
}
-static void diagnoseUncapturableValueReferenceOrBinding(Sema &S,
- SourceLocation loc,
- ValueDecl *var);
-
ExprResult Sema::BuildDeclarationNameExpr(
const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, NamedDecl *D,
NamedDecl *FoundD, const TemplateArgumentListInfo *TemplateArgs,
@@ -18659,8 +18655,9 @@ void Sema::MarkCaptureUsedInEnclosingContext(ValueDecl *Capture,
MarkVarDeclODRUsed(Capture, Loc, *this, &CapturingScopeIndex);
}
-void diagnoseUncapturableValueReferenceOrBinding(Sema &S, SourceLocation loc,
- ValueDecl *var) {
+static void diagnoseUncapturableValueReferenceOrBinding(Sema &S,
+ SourceLocation loc,
+ ValueDecl *var) {
DeclContext *VarDC = var->getDeclContext();
// If the parameter still belongs to the translation unit, then
More information about the cfe-commits
mailing list