[PATCH] D45884: [Sema] Fix parsing of anonymous union in language linkage specification

2018-06-05 Thread Jan Korous via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC334062: [Sema] Fix parsing of anonymous union in language linkage specification (authored by jkorous, committed by ). Changed prior to commit: https://reviews.llvm.org/D45884?vs=143736=150069#toc

[PATCH] D45884: [Sema] Fix parsing of anonymous union in language linkage specification

2018-05-01 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. Comment at: Sema/SemaDecl.cpp:4659-4661 + (isa(OwnerScope) || + (isa(OwnerScope) && +cast(OwnerScope)->getDeclName( { jkorous wrote: > rsmith wrote: > > vsapsai

[PATCH] D45884: [Sema] Fix parsing of anonymous union in language linkage specification

2018-05-01 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In https://reviews.llvm.org/D45884#1084060, @jkorous wrote: > Volodymyr, could you please confirm that the non-anonymous vs non-inline > logic makes sense to you? Looks correct to me that we are checking non-anonymous namespaces. Inline namespaces are somewhat

[PATCH] D45884: [Sema] Fix parsing of anonymous union in language linkage specification

2018-05-01 Thread Jan Korous via Phabricator via cfe-commits
jkorous added inline comments. Comment at: Sema/SemaDecl.cpp:4651-4653 + + DeclContext *OwnerScope = Owner->getRedeclContext(); + vsapsai wrote: > I think the code style favours avoiding excessive vertical whitespace and I > don't feel like this statement

[PATCH] D45884: [Sema] Fix parsing of anonymous union in language linkage specification

2018-05-01 Thread Jan Korous via Phabricator via cfe-commits
jkorous marked an inline comment as done. jkorous added a comment. Volodymyr, could you please confirm that the non-anonymous vs non-inline logic makes sense to you? Comment at: Sema/SemaDecl.cpp:4659-4661 + (isa(OwnerScope) || + (isa(OwnerScope) && +

[PATCH] D45884: [Sema] Fix parsing of anonymous union in language linkage specification

2018-04-26 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai accepted this revision. vsapsai added inline comments. This revision is now accepted and ready to land. Comment at: Sema/SemaDecl.cpp:4651-4653 + + DeclContext *OwnerScope = Owner->getRedeclContext(); + I think the code style favours avoiding

[PATCH] D45884: [Sema] Fix parsing of anonymous union in language linkage specification

2018-04-24 Thread Jan Korous via Phabricator via cfe-commits
jkorous updated this revision to Diff 143736. jkorous added a comment. Addressed comments + proposal for refactoring of the namespace-related logic. https://reviews.llvm.org/D45884 Files: Sema/SemaDecl.cpp SemaCXX/anonymous-union-export.cpp SemaCXX/anonymous-union.cpp Index:

[PATCH] D45884: [Sema] Fix parsing of anonymous union in language linkage specification

2018-04-23 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: Sema/SemaDecl.cpp:4654-4656 + while (OwnerScope->getDeclKind() == Decl::LinkageSpec) { +OwnerScope = OwnerScope->getParent(); + } vsapsai wrote: > Looks like `DeclContext::isTransparentContext()` might

[PATCH] D45884: [Sema] Fix parsing of anonymous union in language linkage specification

2018-04-23 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. For the record, DR154: Anonymous unions in unnamed namespaces is relevant here. Comment at: Sema/SemaDecl.cpp:4654-4656 + while (OwnerScope->getDeclKind() == Decl::LinkageSpec) {

[PATCH] D45884: [Sema] Fix parsing of anonymous union in language linkage specification

2018-04-20 Thread Jan Korous via Phabricator via cfe-commits
jkorous created this revision. jkorous added reviewers: vsapsai, arphaman, rsmith. jkorous added a project: clang. Herald added a subscriber: cfe-commits. C++17 [dcl.link]p4: A linkage specification does not establish a scope. C++17 [class.union.anon]p2: Namespace level anonymous unions shall be