[PATCH] MSVC compat: Allow lookup of friend types in enclosing	namespaces
    Richard Smith 
    richard at metafoo.co.uk
       
    Thu Jul 10 17:08:12 PDT 2014
    
    
  
================
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);
----------------
Reid Kleckner wrote:
> 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.
Maybe either make `addFriendTagNNSFixIt` take a `DiagnosticBuilder&` so it doesn't need to care about this, or make it return a `FixItHint`? (A default-constructed `FixItHint` will be ignored by the diagnostic renderer.)
http://reviews.llvm.org/D4443
    
    
More information about the cfe-commits
mailing list