[PATCH] D78404: [clang] Implement P0692R1 from C++20 (access checking on specializations)
Sergej Jaskiewicz via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 18 14:33:14 PDT 2020
broadwaylamb marked an inline comment as done.
broadwaylamb added inline comments.
================
Comment at: clang/lib/Parse/ParseDecl.cpp:5672
+ // initializer.
+ SuppressAccessChecks diagsFromTag(*this);
+
----------------
This is for things like
```
template<> void X<Y::Z>::f() {}
```
not to be rejected (here `Z` is a private member of class `Y`)
I wasn't sure how to suppress it only when we're parsing template parameter list, so we suppress it unconditionally here. All the tests pass though, but I'd appreciate any hints.
Note that testing that `D.getContext() == DeclaratorContext::TemplateParamContext` doesn't work — when we get here, we're actually in a `FileContext`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78404/new/
https://reviews.llvm.org/D78404
More information about the cfe-commits
mailing list