ken-matsui added a comment.

Thank you so much for your review!



================
Comment at: clang/include/clang/Basic/DiagnosticLexKinds.td:696-698
+def ext_c2x_pp_directive : Extension<
+  "%select{#elifdef|#elifndef}0 is a C2x extension">,
+  InGroup<CPre2xCompatPedantic>;
----------------
aaron.ballman wrote:
> I think we need two diagnostics, one for C2x and one for C++2b 
> (https://wg21.link/p2334 was adopted for C++23). Each of these diagnostics 
> should come in a pair:
> ```
> def warn_cxx20_compat_pp_directive : Warning<
>   "use of a '#%select{elifdef|elifndef}0' directive is incompatible with C++ 
> standards before C++2b",
>   InGroup<CXXPre2bCompat>, DefaultIgnore;
> def ext_cxx20_pp_directive : ExtWarn<
>   "use of a '#%select{elifdef|elifndef}0' directive is a C++2b extension",
>   InGroup<CXX2b>;
> ```
> and similar for C, except with wording about C standards and in the C warning 
> groups.
I thought I had to use `Extension` here, but what is the difference between 
`Warning`, `ExtWarn`, and `Extension`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125178/new/

https://reviews.llvm.org/D125178

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to