[PATCH] D60956: [Sema] Fix the lookup for a declaration conflicting with an enumerator

2019-05-15 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. Ping :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60956/new/ https://reviews.llvm.org/D60956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D60956: [Sema] Fix the lookup for a declaration conflicting with an enumerator

2019-05-08 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 198629. riccibruno marked 4 inline comments as done. riccibruno added a comment. Address Aaron's comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60956/new/ https://reviews.llvm.org/D60956 Files:

[PATCH] D60956: [Sema] Fix the lookup for a declaration conflicting with an enumerator

2019-05-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I found a few nits, but generally think this LG. However, I think @rsmith should sign off on it just in case I've misinterpreted something along the way. Comment at: lib/Sema/SemaDecl.cpp:16537 +// instead would cause us to miss

[PATCH] D60956: [Sema] Fix the lookup for a declaration conflicting with an enumerator

2019-04-29 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked 3 inline comments as done. riccibruno added inline comments. Comment at: test/CXX/dcl.dcl/dcl.enum/p11-enumerator_scope.cpp:107 enum { typedef_type };// expected-error {{redefinition of 'typedef_type'}} }; riccibruno

[PATCH] D60956: [Sema] Fix the lookup for a declaration conflicting with an enumerator

2019-04-29 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 197225. riccibruno retitled this revision from "[Sema] Fix the lookup for a declaration conflicting with an enumerator (bogus use of LookupResult::getAsSingle)" to "[Sema] Fix the lookup for a declaration conflicting with an enumerator". riccibruno edited

[PATCH] D60956: [Sema] Fix the lookup for a declaration conflicting with an enumerator (bogus use of LookupResult::getAsSingle)

2019-04-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked an inline comment as done. riccibruno added inline comments. Comment at: test/CXX/dcl.dcl/dcl.enum/p11-enumerator_scope.cpp:107 enum { typedef_type };// expected-error {{redefinition of 'typedef_type'}} }; Note also that

[PATCH] D60956: [Sema] Fix the lookup for a declaration conflicting with an enumerator (bogus use of LookupResult::getAsSingle)

2019-04-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. > Added a test which exposes a new problem that this patch incidentally solves > (see `N_conflicting_namespace_alias`). Because of the using directive `using > namespace M;`, the namespace alias `i` for the namespace `Q` is found in the > redeclaration lookup.

[PATCH] D60956: [Sema] Fix the lookup for a declaration conflicting with an enumerator (bogus use of LookupResult::getAsSingle)

2019-04-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked an inline comment as done. riccibruno added inline comments. Comment at: lib/Sema/SemaDecl.cpp:16607 + // Check for other kinds of shadowing not already handled. + if (PrevDecl && isa(PrevDecl->getUnderlyingDecl()) && + !TheEnumDecl->isScoped())

[PATCH] D60956: [Sema] Fix the lookup for a declaration conflicting with an enumerator (bogus use of LookupResult::getAsSingle)

2019-04-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 196264. riccibruno added a comment. - Added a test (see `N_shadow)` for the behavior of `Wshadow`. This test showed that I forgot to change `CheckShadow(New, PrevDecl, R);` to `CheckShadow(New, PrevDecl->getUnderlyingDecl(), R);` to match change in the

[PATCH] D60956: [Sema] Fix the lookup for a declaration conflicting with an enumerator (bogus use of LookupResult::getAsSingle)

2019-04-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaDecl.cpp:16607 + // Check for other kinds of shadowing not already handled. + if (PrevDecl && isa(PrevDecl->getUnderlyingDecl()) && + !TheEnumDecl->isScoped()) riccibruno wrote: > aaron.ballman

[PATCH] D60956: [Sema] Fix the lookup for a declaration conflicting with an enumerator (bogus use of LookupResult::getAsSingle)

2019-04-22 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked an inline comment as done. riccibruno added inline comments. Comment at: lib/Sema/SemaDecl.cpp:16607 + // Check for other kinds of shadowing not already handled. + if (PrevDecl && isa(PrevDecl->getUnderlyingDecl()) && + !TheEnumDecl->isScoped())

[PATCH] D60956: [Sema] Fix the lookup for a declaration conflicting with an enumerator (bogus use of LookupResult::getAsSingle)

2019-04-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaDecl.cpp:16607 + // Check for other kinds of shadowing not already handled. + if (PrevDecl && isa(PrevDecl->getUnderlyingDecl()) && + !TheEnumDecl->isScoped()) Is the change to

[PATCH] D60956: [Sema] Fix the lookup for a declaration conflicting with an enumerator (bogus use of LookupResult::getAsSingle)

2019-04-21 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added reviewers: aaron.ballman, rnk, rsmith. riccibruno added a project: clang. Herald added a subscriber: cfe-commits. Currently the lookup for a declaration conflicting with an enumerator is pretty broken, because of the use of