[PATCH] D136533: [clang] Fix missing diagnostic of declaration use when accessing TypeDecls through typename access
Matheus Izvekov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 28 07:31:59 PDT 2022
mizvekov added a comment.
In D136533#3891905 <https://reviews.llvm.org/D136533#3891905>, @ldionne wrote:
> Is it possible that it would be one of those two bugs? https://github.com/llvm/llvm-project/issues?q=is%3Aopen+is%3Aissue+author%3Aldionne+availability+
I don't think so.
It does look like libc++ makes some uses within itself of types which were marked unavailable.
It's just that we missed diagnosing those cases before, which is what this patch is fixing.
Ie if you see the included test case:
struct A {
using ta [[deprecated]] = int;
};
using t1 = typename A::ta; // expected-warning {{'ta' is deprecated}}
We missed diagnosing that before, when performing a 'typename' member access.
The `availability` attribute is supposed to work on the same principles as `deprecated` does.
This is diagnosed by GCC as well, and I thought libc++ was also tested with it. Is that maybe not the case for those old Apple systems?
In any case, let me know if you think otherwise, or if we will need to implement some kind of workaround...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136533/new/
https://reviews.llvm.org/D136533
More information about the cfe-commits
mailing list