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
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:
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
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
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
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
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.
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())
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
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
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())
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
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
13 matches
Mail list logo