to268 added a comment. I need thoughts about this.
================ Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:4805-4806 if (!getLangOpts().CPlusPlus && InitList) { - Diag(Init->getBeginLoc(), diag::err_auto_init_list_from_c); + Diag(Init->getBeginLoc(), diag::err_auto_init_list_from_c) + << (int)AT->getKeyword() << getLangOpts().C23; return TDK_AlreadyDiagnosed; ---------------- It feels wrong to check if it's not C++ and changing the diagnostic if we are in C, I only emit the fixed diagnostic in C23 mode for now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133289/new/ https://reviews.llvm.org/D133289 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits