Skip to content

Commit 20d3cab

Browse files
committed
[clang][NFC] Take const pointers in Sema::DiagnoseAutoDeductionFailure
1 parent 612fdf3 commit 20d3cab

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

clang/include/clang/Sema/Sema.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9695,7 +9695,7 @@ class Sema final : public SemaBase {
96959695
bool DependentDeduction = false,
96969696
bool IgnoreConstraints = false,
96979697
TemplateSpecCandidateSet *FailedTSC = nullptr);
9698-
void DiagnoseAutoDeductionFailure(VarDecl *VDecl, Expr *Init);
9698+
void DiagnoseAutoDeductionFailure(const VarDecl *VDecl, const Expr *Init);
96999699
bool DeduceReturnType(FunctionDecl *FD, SourceLocation Loc,
97009700
bool Diagnose = true);
97019701

clang/lib/Sema/SemaTemplateDeduction.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5418,7 +5418,8 @@ TypeSourceInfo *Sema::ReplaceAutoTypeSourceInfo(TypeSourceInfo *TypeWithAuto,
54185418
.TransformType(TypeWithAuto);
54195419
}
54205420

5421-
void Sema::DiagnoseAutoDeductionFailure(VarDecl *VDecl, Expr *Init) {
5421+
void Sema::DiagnoseAutoDeductionFailure(const VarDecl *VDecl,
5422+
const Expr *Init) {
54225423
if (isa<InitListExpr>(Init))
54235424
Diag(VDecl->getLocation(),
54245425
VDecl->isInitCapture()

0 commit comments

Comments
 (0)