diff --git a/clang/include/clang/Basic/DiagnosticASTKinds.td b/clang/include/clang/Basic/DiagnosticASTKinds.td index 231d597fe36a2..b6262518b81f9 100644 --- a/clang/include/clang/Basic/DiagnosticASTKinds.td +++ b/clang/include/clang/Basic/DiagnosticASTKinds.td @@ -252,7 +252,7 @@ def note_constexpr_destroy_out_of_lifetime : Note< "destroying object '%0' whose lifetime has already ended">; def note_constexpr_unsupported_destruction : Note< "non-trivial destruction of type %0 in a constant expression is not supported">; -def note_constexpr_unsupported_tempoarary_nontrivial_dtor : Note< +def note_constexpr_unsupported_temporary_nontrivial_dtor : Note< "non-trivial destruction of lifetime-extended temporary with type %0 " "used in the result of a constant expression is not yet supported">; def note_constexpr_unsupported_unsized_array : Note< diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index c6fc02a6fe914..b33ce14b3658d 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -2215,7 +2215,7 @@ static bool CheckLValueConstantExpression(EvalInfo &Info, SourceLocation Loc, QualType TempType = getType(Base); if (TempType.isDestructedType()) { Info.FFDiag(MTE->getExprLoc(), - diag::note_constexpr_unsupported_tempoarary_nontrivial_dtor) + diag::note_constexpr_unsupported_temporary_nontrivial_dtor) << TempType; return false; }