[clang] [NFC] Remove unneeded forward declaration of diagnoseUncapturableValueReferenceOrBinding() (PR #154591)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 20 11:28:48 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Tom Honermann (tahonermann)
<details>
<summary>Changes</summary>
The only (remaining) use of this forward declaration was removed in
commit 127bf44385424891eb04cff8e52d3f157fc2cb7c.
---
Full diff: https://github.com/llvm/llvm-project/pull/154591.diff
1 Files Affected:
- (modified) clang/lib/Sema/SemaExpr.cpp (+3-6)
``````````diff
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
``````````
</details>
https://github.com/llvm/llvm-project/pull/154591
More information about the cfe-commits
mailing list