[PATCH] D152632: [Clang] Add warnings for CWG2521

Vlad Serebrennikov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 13 08:14:42 PDT 2023


Endill added a comment.

Thank you for taking care of other tests under `dr25xx.cpp`!

In D152632#4412075 <https://reviews.llvm.org/D152632#4412075>, @rZhBoYao wrote:

> Overhaul for `dr25xx.cpp`.
>
> For each test case, tried to support as many language modes as possible.
> Not sure what those `-triple x86_64-unknown-unknown` are for? I leave them there nonetheless.

They are usually used for codegen tests, so no need to specify the triple if you don't need to.

> `-Wdeprecated-literal-operator` is under `-Wdeprecated` which is not under `-Wpedantic` so is not triggered by `-pedantic-errors`. Does this need change? I imagine it would be pretty disruptive.  On the other hand, pedantic users might care about deprecation 🤔️.

I don't think we need to change status quo. In general I don't expect diagnostics grouping to care about DR tests, and I don't think it should.



================
Comment at: clang/test/CXX/drs/dr25xx.cpp:71
+// expected-warning at +2 {{identifier '_π___' preceded by space(s) in the literal operator declaration is deprecated}}
+// expected-warning at +1 {{user-defined literal suffixes containing '__' or not starting with '_' are reserved}}
+long double operator""      _\u03C0___(long double);
----------------
Is it possible to put expected directive after the code, like we do in majority of existing tests? This means using only negative line offsets after `@`


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

https://reviews.llvm.org/D152632



More information about the cfe-commits mailing list