[clang] Add warning message for C++17 alias template CTAD (PR #133806)

via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 1 20:32:36 PDT 2025


================
@@ -9920,7 +9920,9 @@ QualType Sema::DeduceTemplateSpecializationFromInitializer(
     if (auto *AliasTemplate = dyn_cast_or_null<TypeAliasTemplateDecl>(
             TemplateName.getAsTemplateDecl())) {
       Diag(Kind.getLocation(),
-           diag::warn_cxx17_compat_ctad_for_alias_templates);
+           getLangOpts().CPlusPlus20
----------------
Sirraide wrote:

Yes we can use `DiagCompat()` here once #132348 is merged (which should happen in a few hours barring unforeseen circumstances). I’ll leave another comment once that has happened.

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


More information about the cfe-commits mailing list