[PATCH] D78404: [clang] Implement P0692R1 from C++20 (access checking on specializations)

2020-04-18 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D78404#1990461 , @broadwaylamb wrote: > In D78404#1990192 , @rsmith wrote: > > > ... please also test ... > > > > template class TemplateClass3 > > varTemplate3{}; > > > > > > ...

[PATCH] D78404: [clang] Implement P0692R1 from C++20 (access checking on specializations)

2020-04-18 Thread Sergej Jaskiewicz via Phabricator via cfe-commits
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::f() {}

[PATCH] D78404: [clang] Implement P0692R1 from C++20 (access checking on specializations)

2020-04-18 Thread Sergej Jaskiewicz via Phabricator via cfe-commits
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 { ///

[PATCH] D78404: [clang] Implement P0692R1 from C++20 (access checking on specializations)

2020-04-18 Thread Sergej Jaskiewicz via Phabricator via cfe-commits
broadwaylamb updated this revision to Diff 258555. broadwaylamb added a comment. - Add more tests - Allow class template member explicit specializations - Inherit TypeAliasDecl from DeclContext (this is needed so that we could perform access checks when parsing 'using' declaration templates)

[PATCH] D78404: [clang] Implement P0692R1 from C++20 (access checking on specializations)

2020-04-18 Thread Sergej Jaskiewicz via Phabricator via cfe-commits
broadwaylamb added a comment. In D78404#1990192 , @rsmith wrote: > ... please also test ... > > template class TemplateClass3 > varTemplate3{}; > > > ... which we should diagnose, because that's a primary variable template > definition, not a partial

[PATCH] D78404: [clang] Implement P0692R1 from C++20 (access checking on specializations)

2020-04-17 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Thanks! Is this really the only case we were getting wrong? If so, great! We should make sure we have test coverage for all the cases affected by P0692R1. Please add some complementary tests for the cases where diagnostics should still be produced. For example, in

[PATCH] D78404: [clang] Implement P0692R1 from C++20 (access checking on specializations)

2020-04-17 Thread Sergej Jaskiewicz via Phabricator via cfe-commits
broadwaylamb created this revision. broadwaylamb added reviewers: asl, rsmith, doug.gregor, rjmccall, triton. broadwaylamb added a project: clang. Herald added subscribers: cfe-commits, dexonsmith. This patch implements paper P0692R1