[clang] [clang-tools-extra] [clang] fix diagnostic printing of expressions ignoring LangOpts (PR #134693)

Matheus Izvekov via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 7 10:12:44 PDT 2025


================
@@ -493,8 +493,8 @@ DeduceNullPtrTemplateArgument(Sema &S, TemplateParameterList *TemplateParams,
                                                         : CK_NullToPointer)
                     .get();
   return DeduceNonTypeTemplateArgument(
-      S, TemplateParams, NTTP, DeducedTemplateArgument(Value), Value->getType(),
----------------
mizvekov wrote:

Yeah, Value is an expression, but the DeducedTemplateArgument constructor only (implicitly) accepts a TemplateArgument. Instead of `DeducedTemplateArgument(TemplateArgument(Value))`, we go through the implicit path, as it is harmless.

https://github.com/llvm/llvm-project/pull/134693


More information about the cfe-commits mailing list