http://llvm.org/bugs/show_bug.cgi?id=16032
Richard Smith <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |[email protected] Resolution|--- |FIXED --- Comment #1 from Richard Smith <[email protected]> --- Obligatory standard quotes: 7.3.1.2/3: "If the name in a friend declaration is neither qualified nor a template-id and the declaration is a function or an elaborated-type-specifier, the lookup to determine whether the entity has been previously declared shall not consider any scopes outside the innermost enclosing namespace." So the friend declaration does not find views::Widget, and the elaborated-type-specifier is instead the first declaration of an entity. Then (same paragraph): "If a friend declaration in a non-local class first declares a class [...] the friend is a member of the innermost enclosing namespace. The friend declaration does not by itself make the name visible to unqualified lookup (3.4.1) or qualified lookup (3.4.3)." So the friend declares views::internal::Widget, but does not make it visible to name lookup. The problem here was that under -fms-extensions, we'd make the injected friend name visible. The actual MS behavior seems to be more subtle than that; our new behavior is that we make the injected friend visible unless friend lookup would find something outside the innermost enclosing namespace. FWIW, this is still broken in a couple of ways: * our -fms-extensions behavior here is not a conforming extension * presumably with the MS compatibility hack enabled, we should befriend views::Widget, not views::internal::Widget Anyway, the original bug here is fixed. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ LLVMbugs mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs
