[PATCH] MSVC compat: Allow lookup of friend types in enclosing namespaces
Reid Kleckner
rnk at google.com
Thu Jul 10 16:59:33 PDT 2014
================
Comment at: lib/Sema/SemaDecl.cpp:10740
@@ +10739,3 @@
+ // This tag should be declared in a namespace, which can only be enclosed by
+ // other namespaces. Bail if something there's an anonymous namespace in
+ // the chain.
----------------
Richard Smith wrote:
> Stray 'something'?
yeah
================
Comment at: lib/Sema/SemaDecl.cpp:10986
@@ +10985,3 @@
+ NamedDecl *ND = Previous.getFoundDecl();
+ Sema::SemaDiagnosticBuilder D =
+ Diag(NameLoc, diag::ext_friend_tag_redecl_outside_namespace);
----------------
Richard Smith wrote:
> `auto`?
It used to be `auto`, but I had to feed it into addFriendTagNNSFixIt, so I made it explicit. I guess I can flip it back.
http://reviews.llvm.org/D4443
More information about the cfe-commits
mailing list