[PATCH] D79714: [Diagnostics] Restore -Wdeprecated warning when user-declared copy assignment operator is defined as deleted (PR45634)

Arthur O'Dwyer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 13 09:11:02 PDT 2020


Quuxplusone added inline comments.


================
Comment at: clang/test/SemaCXX/deprecated-copy.cpp:7
+#ifdef NO_USER_PROVIDED
+// expected-no-diagnostics
+#endif
----------------
xbolva00 wrote:
> xbolva00 wrote:
> > Quuxplusone wrote:
> > > I'm fairly confident this should just be two different test files. Also, if a test file has an un-ifdeffed `// expected-no-diagnostics` plus an un-ifdeffed `// expected-note ...`, which one wins?
> > ifdef is here
> > 
> > and ifNdef is below :)
> and DEPRECATED_COPY_DTOR is in own "code block"
Ah, you're right, I had missed that line 18 was still controlled by the `#ifdef DEPRECATED_COPY_DTOR` condition.
I still think this should be three(!) different files. Line 2 doesn't even look right to me: shouldn't it be `-Wdeprecated-copy -Wno-deprecated-copy-user-provided`?

I just did a `git grep 'RUN:' | grep '[-]Wno-' | grep -v '[-]W[^n]'` and found a massive number of tests that put `-Wno-foo` on the command line without putting `-Wbar` anywhere on the same line; I suspect many of these are bugs.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79714





More information about the cfe-commits mailing list