broadwaylamb marked 3 inline comments as done.
broadwaylamb added inline comments.
================
Comment at: clang/include/clang/AST/Decl.h:3198
/// alias-declaration.
-class TypeAliasDecl : public TypedefNameDecl {
+class TypeAliasDecl : public TypedefNameDecl, public DeclContext {
/// The template for which this is the pattern, if any.
----------------
I'm not sure about inheriting `TypeAliasDecl` from `DeclContext`, but (see
below)
================
Comment at: clang/lib/Parse/ParseTemplate.cpp:211
+ Decl *Decl = usingDeclPtr.get().getSingleDecl();
+ ParsingDeclRAII.complete(Decl);
+ return Decl;
----------------
…but otherwise I couldn't make it print access level diagnostics for a
particular kind of `using` declaration template (see in the next inline
comment).
Why? Because of [this
line](https://github.com/llvm/llvm-project/blob/8e0c9e21bf5f3e7a427b07e3eaf3bc80d2c74cb6/clang/lib/Sema/SemaAccess.cpp#L1479)
— we need to be able to cast the `TypeAliasDecl` to `DeclContext` in order for
delayed access check to be actually performed.
================
Comment at: clang/test/CXX/temp/temp.decls/temp.class.spec/p10.cpp:58
+template <typename T>
+using alias3_1 = TemplateClass3<T, &TestClass::func>;
+
----------------
I'm talking about declarations like this.
Previously, we didn't reject it (which I believe was incorrect), and now we do.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78404/new/
https://reviews.llvm.org/D78404
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits