[PATCH] D116775: [clang][#47272] Avoid suggesting deprecated version of a declaration over another in typo correction
Arthur O'Dwyer via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 11 06:55:26 PST 2022
Quuxplusone added a comment.
LGTM % comments, but I'll take one more look.
================
Comment at: clang/test/SemaCXX/typo-correction.cpp:772-782
+namespace B {
+int pr47272(); // expected-note{{'B::pr47272' declared here}}
+}
+
+namespace [[deprecated]] A {
+using B::pr47272;
+}
----------------
I'd like `B` to be declared second.
```
namespace [[deprecated]] A { int pr47272; }
namespace B { using A::pr47272; } // expected-note{{'B::pr47272' declared here}}
namespace [[deprecated]] C { using A::pr47272; }
~~~
int y = ::pr47272; // expected-error{{no member named 'pr47272' in the global namespace; did you mean 'B::pr47272'?}}
```
I also changed it from a function to a variable, just to get a little more coverage (since `Take()` was already covering functions).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116775/new/
https://reviews.llvm.org/D116775
More information about the cfe-commits
mailing list