[clang] 20d3cab - [clang][NFC] Take const pointers in Sema::DiagnoseAutoDeductionFailure
Timm Bäder via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 18 03:49:05 PDT 2024
Author: Timm Bäder
Date: 2024-06-18T12:48:38+02:00
New Revision: 20d3cab85258198d262eea05fae6292a2666d6ae
URL: https://github.com/llvm/llvm-project/commit/20d3cab85258198d262eea05fae6292a2666d6ae
DIFF: https://github.com/llvm/llvm-project/commit/20d3cab85258198d262eea05fae6292a2666d6ae.diff
LOG: [clang][NFC] Take const pointers in Sema::DiagnoseAutoDeductionFailure
Added:
Modified:
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaTemplateDeduction.cpp
Removed:
################################################################################
diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h
index 4d4579fcfd456..a47aeaa7e6c7f 100644
--- a/clang/include/clang/Sema/Sema.h
+++ b/clang/include/clang/Sema/Sema.h
@@ -9695,7 +9695,7 @@ class Sema final : public SemaBase {
bool DependentDeduction = false,
bool IgnoreConstraints = false,
TemplateSpecCandidateSet *FailedTSC = nullptr);
- void DiagnoseAutoDeductionFailure(VarDecl *VDecl, Expr *Init);
+ void DiagnoseAutoDeductionFailure(const VarDecl *VDecl, const Expr *Init);
bool DeduceReturnType(FunctionDecl *FD, SourceLocation Loc,
bool Diagnose = true);
diff --git a/clang/lib/Sema/SemaTemplateDeduction.cpp b/clang/lib/Sema/SemaTemplateDeduction.cpp
index befeb38e1fe5b..a432918cbf5e2 100644
--- a/clang/lib/Sema/SemaTemplateDeduction.cpp
+++ b/clang/lib/Sema/SemaTemplateDeduction.cpp
@@ -5418,7 +5418,8 @@ TypeSourceInfo *Sema::ReplaceAutoTypeSourceInfo(TypeSourceInfo *TypeWithAuto,
.TransformType(TypeWithAuto);
}
-void Sema::DiagnoseAutoDeductionFailure(VarDecl *VDecl, Expr *Init) {
+void Sema::DiagnoseAutoDeductionFailure(const VarDecl *VDecl,
+ const Expr *Init) {
if (isa<InitListExpr>(Init))
Diag(VDecl->getLocation(),
VDecl->isInitCapture()
More information about the cfe-commits
mailing list