<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 9, 2015, at 2:49 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk" class="">richard@metafoo.co.uk</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote">On Wed, Dec 9, 2015 at 2:00 PM, Ben Langmuir<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:blangmuir@apple.com" target="_blank" class="">blangmuir@apple.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><br class=""><div class=""><span class=""><blockquote type="cite" class=""><div class="">On Dec 9, 2015, at 1:36 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk" target="_blank" class="">richard@metafoo.co.uk</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">On Wed, Dec 9, 2015 at 11:55 AM, Ben Langmuir via cfe-commits<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank" class="">cfe-commits@lists.llvm.org</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><span class="">> On Dec 9, 2015, at 11:07 AM, Ben Langmuir <<a href="mailto:blangmuir@apple.com" target="_blank" class="">blangmuir@apple.com</a>> wrote:<br class="">><br class="">> Hey Richard,<br class="">><br class="">> This caused a new error for the following code:<br class="">><br class="">>    @import Foo.X; // declaration of ‘struct foo’ from Foo.Y is not visible yet, but the pcm is loaded.<br class="">>    struct foo *bar; // declares ‘struct foo’<br class="">>    @import Foo.Y; // also declares ‘struct foo’<br class="">><br class="">>    void useFoo(struct foo *x);  // error: reference to ‘foo’ is ambiguous<br class="">><br class="">> This seems to be specific to declaring the tag with an elaborated type specifier that is not just ‘struct foo;’.  Any idea what went wrong?  I’m trying to track this down and fix it.<br class=""><br class=""></span>It’s also specific to non-C++ language modes.  In C++ we seem to cheat and make a second lookup that has ForRedeclaration set (SemaDecl.cpp:12122) which then turns this into a use of the hidden declaration rather than creating a new declaration or redeclaration.  I call this “cheating” because the comments imply this second lookup is for diagnostic purposes, but it clearly has a semantic affect in this case.<br class=""></blockquote><div class=""><br class=""></div><div class="">Well, this comes back to our handling of C structs and modules being a little incoherent. Suppose Foo.Y defines one 'struct foo', and we define a completely different 'struct foo':</div><div class=""><br class=""></div><div class="">// Foo.Y</div><div class="">struct foo { int n; };</div><div class=""><br class=""></div><div class="">// my.c</div><div class="">@import Foo.X;</div><div class="">struct foo *bar;</div><div class="">struct foo { double d; };</div><div class="">// Don't import Foo.Y</div><div class=""><br class=""></div><div class="">If this is not an error, then our declaration of 'struct foo' cannot be the same type as Foo.Y. The usual C rule for structs is that you can have multiple conflicting definitions in different TUs. Such declarations declare different types, but they're compatible types (and thus can be used interchangeably) if they're structurally equivalent.</div><div class=""><br class=""></div><div class="">I think implementing that rule for C is the right way to go here. Either that, or we extend C++'s ODR semantics to C modules, but given that the C standard gives us a completely reasonable rule here, it seems more appropriate to follow it.</div></div></div></div></div></blockquote><div class=""><br class=""></div></span><div class="">+ Doug</div><div class=""><br class=""></div><div class="">To make sure I understand: if we followed the C rules then in my original example we would get a fresh declaration here:</div><div class="">struct foo *x;</div><div class=""><br class=""></div><div class="">and then when we import</div><div class="">@import Foo.Y;</div><div class=""><br class=""></div><div class="">we would try to merge the types, and if we had more than one definition we would diagnose if they aren’t structurally equivalent.</div></div></div></blockquote><div class=""><br class=""></div><div class="">No. At the point of import, the name 'foo' would name two different structs. If at some later point we look up 'foo' in the tag name space, name lookup would fold together the lookup results if they refer to compatible types (and if they're not compatible, you'd get an ambiguity error at the point of use). Likewise, ASTContext::typesAreCompatible would be extended to treat such types as compatible in the cases where the C standard says they are compatible (presumably with a cache so we don't repeatedly check for the same pair of types).</div></div></div></div></div></blockquote><div><br class=""></div><div>Ah, thanks for explaining.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><div class=""><div class="">Whereas if we used the ODR we could use the hidden declaration directly like we do in C++,</div></div></div></blockquote><div class=""><br class=""></div><div class="">That would cause my example above to silently do the wrong thing. You'd get a struct foo with a single member 'n', despite no such member being visible. In C++, the code would already be ill-formed (NDR) due to violating the ODR, so that's less terrible (but still pretty bad). In C, where the corresponding code not using modules is valid, such behavior is pretty hard to defend.</div><div class=""><br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><div class="">although perhaps looking it up with a for-redeclaration lookup wouldn’t be sufficient if we fixed the linkage of the structs as you mention below.</div><div class=""><br class=""></div><div class="">Switching to structural equivalence checking seems like a big change to make just to fix this regression.  Even if that’s what we want I’m not sure I could sign up for it right now.  Is there a more tactical way we could fix this in the interim?</div></div></blockquote><div class=""><br class=""></div><div class="">Adding the for-redeclaration lookup to C seems fine to me as a short-term workaround. (This will break again if/when we fix the linkage of C types, but I don't think we have a reason to do that until we have the type compatibility rules implemented.)</div></div></div></div></div></blockquote><div><br class=""></div><div><div style="margin: 0px 0px 0px 6px; line-height: normal; font-family: 'Helvetica Neue';" class="">Okay, I did this in r255267.</div></div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><span class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">I guess the reason this started failing after r252960 is because of this change:<br class=""><span class="">> This also removes the prior special case for tag lookup, which made some cases<br class="">> of this work, but also led to bizarre, bogus "must use 'struct' to refer to type<br class="">> 'Foo' in this scope" diagnostics in C++.<br class=""><br class=""></span>We could do the for-redeclaration lookup outside of C++ too, which will fix this case,</blockquote><div class=""><br class=""></div><div class="">I don't think so: structs in C don't have linkage, so the for-redeclaration lookup won't find unimported structs (though it's possible that we get the linkage calculation for C structs wrong).</div></div></div></div></blockquote><div class=""><br class=""></div></span><div class="">It does find the struct and the hidden decl is considered “externally visible” so I guess that’s incorrect then?  Indeed doing this extra lookup does fix my test case (and doesn’t break any other regression tests we have).</div></div></blockquote><div class=""><br class=""></div><div class="">Yes, that seems like a bug. (It would presumably break code such as my example above...)</div><div class=""> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><div class=""><div class=""><span style="color: rgb(80, 0, 80);" class=""> </span></div><div class=""><div class="h5"><blockquote type="cite" class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">but I’m not sure if this is the correct fix.<br class=""><br class="">Thoughts?<br class=""><br class="">Ben<br class=""><div class=""><div class=""><br class="">><br class="">> Ben<br class="">><br class="">>> On Nov 12, 2015, at 2:19 PM, Richard Smith via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank" class="">cfe-commits@lists.llvm.org</a>> wrote:<br class="">>><br class="">>> Author: rsmith<br class="">>> Date: Thu Nov 12 16:19:45 2015<br class="">>> New Revision: 252960<br class="">>><br class="">>> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=252960&view=rev" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=252960&view=rev</a><br class="">>> Log:<br class="">>> [modules] Simplify and generalize the existing rule for finding hidden<br class="">>> declarations in redeclaration lookup. A declaration is now visible to<br class="">>> lookup if:<br class="">>><br class="">>> * It is visible (not in a module, or in an imported module), or<br class="">>> * We're doing redeclaration lookup and it's externally-visible, or<br class="">>> * We're doing typo correction and looking for unimported decls.<br class="">>><br class="">>> We now support multiple modules having different internal-linkage or no-linkage<br class="">>> definitions of the same name for all entities, not just for functions,<br class="">>> variables, and some typedefs. As previously, if multiple such entities are<br class="">>> visible, any attempt to use them will result in an ambiguity error.<br class="">>><br class="">>> This patch fixes the linkage calculation for a number of entities where we<br class="">>> previously didn't need to get it right (using-declarations, namespace aliases,<br class="">>> and so on).  It also classifies enumerators as always having no linkage, which<br class="">>> is a slight deviation from the C++ standard's definition, but not an observable<br class="">>> change outside modules (this change is being discussed on the -core reflector<br class="">>> currently).<br class="">>><br class="">>> This also removes the prior special case for tag lookup, which made some cases<br class="">>> of this work, but also led to bizarre, bogus "must use 'struct' to refer to type<br class="">>> 'Foo' in this scope" diagnostics in C++.<br class="">>><br class="">>> Added:<br class="">>>   cfe/trunk/test/Modules/Inputs/no-linkage/<br class="">>>   cfe/trunk/test/Modules/Inputs/no-linkage/decls.h<br class="">>>   cfe/trunk/test/Modules/Inputs/no-linkage/empty.h<br class="">>>   cfe/trunk/test/Modules/Inputs/no-linkage/module.modulemap<br class="">>>   cfe/trunk/test/Modules/no-linkage.cpp<br class="">>> Modified:<br class="">>>   cfe/trunk/include/clang/Sema/Lookup.h<br class="">>>   cfe/trunk/lib/AST/Decl.cpp<br class="">>>   cfe/trunk/lib/Sema/SemaDecl.cpp<br class="">>>   cfe/trunk/lib/Sema/SemaDeclCXX.cpp<br class="">>>   cfe/trunk/test/Index/linkage.c<br class="">>>   cfe/trunk/test/Index/usrs.m<br class="">>>   cfe/trunk/test/Modules/decldef.m<br class="">>>   cfe/trunk/test/Modules/merge-enumerators.cpp<br class="">>>   cfe/trunk/test/Modules/module-private.cpp<br class="">>>   cfe/trunk/test/Modules/submodule-visibility-cycles.cpp<br class="">>>   cfe/trunk/test/Modules/submodules-merge-defs.cpp<br class="">>><br class="">>> Modified: cfe/trunk/include/clang/Sema/Lookup.h<br class="">>> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Lookup.h?rev=252960&r1=252959&r2=252960&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Lookup.h?rev=252960&r1=252959&r2=252960&view=diff</a><br class="">>> ==============================================================================<br class="">>> --- cfe/trunk/include/clang/Sema/Lookup.h (original)<br class="">>> +++ cfe/trunk/include/clang/Sema/Lookup.h Thu Nov 12 16:19:45 2015<br class="">>> @@ -139,8 +139,7 @@ public:<br class="">>>      Redecl(Redecl != Sema::NotForRedeclaration),<br class="">>>      HideTags(true),<br class="">>>      Diagnose(Redecl == Sema::NotForRedeclaration),<br class="">>> -      AllowHidden(Redecl == Sema::ForRedeclaration),<br class="">>> -      AllowHiddenInternal(AllowHidden),<br class="">>> +      AllowHidden(false),<br class="">>>      Shadowed(false)<br class="">>>  {<br class="">>>    configure();<br class="">>> @@ -162,8 +161,7 @@ public:<br class="">>>      Redecl(Redecl != Sema::NotForRedeclaration),<br class="">>>      HideTags(true),<br class="">>>      Diagnose(Redecl == Sema::NotForRedeclaration),<br class="">>> -      AllowHidden(Redecl == Sema::ForRedeclaration),<br class="">>> -      AllowHiddenInternal(AllowHidden),<br class="">>> +      AllowHidden(false),<br class="">>>      Shadowed(false)<br class="">>>  {<br class="">>>    configure();<br class="">>> @@ -184,7 +182,6 @@ public:<br class="">>>      HideTags(Other.HideTags),<br class="">>>      Diagnose(false),<br class="">>>      AllowHidden(Other.AllowHidden),<br class="">>> -      AllowHiddenInternal(Other.AllowHiddenInternal),<br class="">>>      Shadowed(false)<br class="">>>  {}<br class="">>><br class="">>> @@ -226,27 +223,16 @@ public:<br class="">>>  /// \brief Specify whether hidden declarations are visible, e.g.,<br class="">>>  /// for recovery reasons.<br class="">>>  void setAllowHidden(bool AH) {<br class="">>> -    AllowHiddenInternal = AllowHidden = AH;<br class="">>> -  }<br class="">>> -<br class="">>> -  /// \brief Specify whether hidden internal declarations are visible.<br class="">>> -  void setAllowHiddenInternal(bool AHI) {<br class="">>> -    AllowHiddenInternal = AHI;<br class="">>> +    AllowHidden = AH;<br class="">>>  }<br class="">>><br class="">>>  /// \brief Determine whether this lookup is permitted to see hidden<br class="">>>  /// declarations, such as those in modules that have not yet been imported.<br class="">>>  bool isHiddenDeclarationVisible(NamedDecl *ND) const {<br class="">>> -    // If a using-shadow declaration is hidden, it's never visible, not<br class="">>> -    // even to redeclaration lookup.<br class="">>> -    // FIXME: Should this apply to typedefs and namespace aliases too?<br class="">>> -    if (isa<UsingShadowDecl>(ND) && LookupKind != Sema::LookupUsingDeclName)<br class="">>> -      return false;<br class="">>> -    return (AllowHidden &&<br class="">>> -            (AllowHiddenInternal || ND->isExternallyVisible())) ||<br class="">>> -           LookupKind == Sema::LookupTagName;<br class="">>> +    return AllowHidden ||<br class="">>> +           (isForRedeclaration() && ND->isExternallyVisible());<br class="">>>  }<br class="">>> -<br class="">>> +<br class="">>>  /// Sets whether tag declarations should be hidden by non-tag<br class="">>>  /// declarations during resolution.  The default is true.<br class="">>>  void setHideTags(bool Hide) {<br class="">>> @@ -317,7 +303,8 @@ public:<br class="">>>    if (!D->isInIdentifierNamespace(IDNS))<br class="">>>      return nullptr;<br class="">>><br class="">>> -    if (isHiddenDeclarationVisible(D) || isVisible(getSema(), D))<br class="">>> +    if (!D->isHidden() || isHiddenDeclarationVisible(D) ||<br class="">>> +        isVisibleSlow(getSema(), D))<br class="">>>      return D;<br class="">>><br class="">>>    return getAcceptableDeclSlow(D);<br class="">>> @@ -526,7 +513,6 @@ public:<br class="">>>  /// \brief Change this lookup's redeclaration kind.<br class="">>>  void setRedeclarationKind(Sema::RedeclarationKind RK) {<br class="">>>    Redecl = RK;<br class="">>> -    AllowHiddenInternal = AllowHidden = (RK == Sema::ForRedeclaration);<br class="">>>    configure();<br class="">>>  }<br class="">>><br class="">>> @@ -698,9 +684,6 @@ private:<br class="">>>  /// \brief True if we should allow hidden declarations to be 'visible'.<br class="">>>  bool AllowHidden;<br class="">>><br class="">>> -  /// \brief True if we should allow hidden internal declarations to be visible.<br class="">>> -  bool AllowHiddenInternal;<br class="">>> -<br class="">>>  /// \brief True if the found declarations were shadowed by some other<br class="">>>  /// declaration that we skipped. This only happens when \c LookupKind<br class="">>>  /// is \c LookupRedeclarationWithLinkage.<br class="">>><br class="">>> Modified: cfe/trunk/lib/AST/Decl.cpp<br class="">>> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=252960&r1=252959&r2=252960&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=252960&r1=252959&r2=252960&view=diff</a><br class="">>> ==============================================================================<br class="">>> --- cfe/trunk/lib/AST/Decl.cpp (original)<br class="">>> +++ cfe/trunk/lib/AST/Decl.cpp Thu Nov 12 16:19:45 2015<br class="">>> @@ -635,6 +635,8 @@ static LinkageInfo getLVForNamespaceScop<br class="">>>  if (D->isInAnonymousNamespace()) {<br class="">>>    const auto *Var = dyn_cast<VarDecl>(D);<br class="">>>    const auto *Func = dyn_cast<FunctionDecl>(D);<br class="">>> +    // FIXME: In C++11 onwards, anonymous namespaces should give decls<br class="">>> +    // within them internal linkage, not unique external linkage.<br class="">>>    if ((!Var || !isFirstInExternCContext(Var)) &&<br class="">>>        (!Func || !isFirstInExternCContext(Func)))<br class="">>>      return LinkageInfo::uniqueExternal();<br class="">>> @@ -821,10 +823,14 @@ static LinkageInfo getLVForNamespaceScop<br class="">>>  } else if (isa<ObjCInterfaceDecl>(D)) {<br class="">>>    // fallout<br class="">>><br class="">>> +  } else if (auto *TD = dyn_cast<TypedefNameDecl>(D)) {<br class="">>> +    // A typedef declaration has linkage if it gives a type a name for<br class="">>> +    // linkage purposes.<br class="">>> +    if (!TD->getAnonDeclWithTypedefName(/*AnyRedecl*/true))<br class="">>> +      return LinkageInfo::none();<br class="">>> +<br class="">>>  // Everything not covered here has no linkage.<br class="">>>  } else {<br class="">>> -    // FIXME: A typedef declaration has linkage if it gives a type a name for<br class="">>> -    // linkage purposes.<br class="">>>    return LinkageInfo::none();<br class="">>>  }<br class="">>><br class="">>> @@ -1226,8 +1232,32 @@ static LinkageInfo computeLVForDecl(cons<br class="">>>  switch (D->getKind()) {<br class="">>>    default:<br class="">>>      break;<br class="">>> +<br class="">>> +    // Per C++ [basic.link]p2, only the names of objects, references,<br class="">>> +    // functions, types, templates, namespaces, and values ever have linkage.<br class="">>> +    //<br class="">>> +    // Note that the name of a typedef, namespace alias, using declaration,<br class="">>> +    // and so on are not the name of the corresponding type, namespace, or<br class="">>> +    // declaration, so they do *not* have linkage.<br class="">>> +    case Decl::EnumConstant: // FIXME: This has linkage, but that's dumb.<br class="">>> +    case Decl::ImplicitParam:<br class="">>> +    case Decl::Label:<br class="">>> +    case Decl::NamespaceAlias:<br class="">>>    case Decl::ParmVar:<br class="">>> +    case Decl::Using:<br class="">>> +    case Decl::UsingShadow:<br class="">>> +    case Decl::UsingDirective:<br class="">>>      return LinkageInfo::none();<br class="">>> +<br class="">>> +    case Decl::Typedef:<br class="">>> +    case Decl::TypeAlias:<br class="">>> +      // A typedef declaration has linkage if it gives a type a name for<br class="">>> +      // linkage purposes.<br class="">>> +      if (!cast<TypedefNameDecl>(D)<br class="">>> +               ->getAnonDeclWithTypedefName(/*AnyRedecl*/true))<br class="">>> +        return LinkageInfo::none();<br class="">>> +      break;<br class="">>> +<br class="">>>    case Decl::TemplateTemplateParm: // count these as external<br class="">>>    case Decl::NonTypeTemplateParm:<br class="">>>    case Decl::ObjCAtDefsField:<br class="">>><br class="">>> Modified: cfe/trunk/lib/Sema/SemaDecl.cpp<br class="">>> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=252960&r1=252959&r2=252960&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=252960&r1=252959&r2=252960&view=diff</a><br class="">>> ==============================================================================<br class="">>> --- cfe/trunk/lib/Sema/SemaDecl.cpp (original)<br class="">>> +++ cfe/trunk/lib/Sema/SemaDecl.cpp Thu Nov 12 16:19:45 2015<br class="">>> @@ -4819,12 +4819,6 @@ NamedDecl *Sema::HandleDeclarator(Scope<br class="">>>  LookupResult Previous(*this, NameInfo, LookupOrdinaryName,<br class="">>>                        ForRedeclaration);<br class="">>><br class="">>> -  // If we're hiding internal-linkage symbols in modules from redeclaration<br class="">>> -  // lookup, let name lookup know.<br class="">>> -  if ((getLangOpts().Modules || getLangOpts().ModulesLocalVisibility) &&<br class="">>> -      D.getDeclSpec().getStorageClassSpec() != DeclSpec::SCS_typedef)<br class="">>> -    Previous.setAllowHiddenInternal(false);<br class="">>> -<br class="">>>  // See if this is a redefinition of a variable in the same scope.<br class="">>>  if (!D.getCXXScopeSpec().isSet()) {<br class="">>>    bool IsLinkageLookup = false;<br class="">>><br class="">>> Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp<br class="">>> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=252960&r1=252959&r2=252960&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=252960&r1=252959&r2=252960&view=diff</a><br class="">>> ==============================================================================<br class="">>> --- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)<br class="">>> +++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Thu Nov 12 16:19:45 2015<br class="">>> @@ -7206,23 +7206,13 @@ Decl *Sema::ActOnStartNamespaceDef(Scope<br class="">>>    //   treated as an original-namespace-name.<br class="">>>    //<br class="">>>    // Since namespace names are unique in their scope, and we don't<br class="">>> -    // look through using directives, just look for any ordinary names.<br class="">>> -<br class="">>> -    const unsigned IDNS = Decl::IDNS_Ordinary | Decl::IDNS_Member |<br class="">>> -    Decl::IDNS_Type | Decl::IDNS_Using | Decl::IDNS_Tag |<br class="">>> -    Decl::IDNS_Namespace;<br class="">>> -    NamedDecl *PrevDecl = nullptr;<br class="">>> -    DeclContext::lookup_result R = CurContext->getRedeclContext()->lookup(II);<br class="">>> -    for (DeclContext::lookup_iterator I = R.begin(), E = R.end(); I != E;<br class="">>> -         ++I) {<br class="">>> -      if ((*I)->getIdentifierNamespace() & IDNS) {<br class="">>> -        PrevDecl = *I;<br class="">>> -        break;<br class="">>> -      }<br class="">>> -    }<br class="">>> -<br class="">>> +    // look through using directives, just look for any ordinary names<br class="">>> +    // as if by qualified name lookup.<br class="">>> +    LookupResult R(*this, II, IdentLoc, LookupOrdinaryName, ForRedeclaration);<br class="">>> +    LookupQualifiedName(R, CurContext->getRedeclContext());<br class="">>> +    NamedDecl *PrevDecl = R.getAsSingle<NamedDecl>();<br class="">>>    PrevNS = dyn_cast_or_null<NamespaceDecl>(PrevDecl);<br class="">>> -<br class="">>> +<br class="">>>    if (PrevNS) {<br class="">>>      // This is an extended namespace definition.<br class="">>>      if (IsInline != PrevNS->isInline())<br class="">>><br class="">>> Modified: cfe/trunk/test/Index/linkage.c<br class="">>> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/linkage.c?rev=252960&r1=252959&r2=252960&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/linkage.c?rev=252960&r1=252959&r2=252960&view=diff</a><br class="">>> ==============================================================================<br class="">>> --- cfe/trunk/test/Index/linkage.c (original)<br class="">>> +++ cfe/trunk/test/Index/linkage.c Thu Nov 12 16:19:45 2015<br class="">>> @@ -20,7 +20,7 @@ void f16(void) {<br class="">>><br class="">>><br class="">>> // CHECK: EnumDecl=Baz:3:6 (Definition)linkage=External<br class="">>> -// CHECK: EnumConstantDecl=Qux:3:12 (Definition)linkage=External<br class="">>> +// CHECK: EnumConstantDecl=Qux:3:12 (Definition)linkage=NoLinkage<br class="">>> // CHECK: VarDecl=x:4:5linkage=External<br class="">>> // CHECK: FunctionDecl=foo:5:6linkage=External<br class="">>> // CHECK: VarDecl=w:6:12linkage=Internal<br class="">>><br class="">>> Modified: cfe/trunk/test/Index/usrs.m<br class="">>> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/usrs.m?rev=252960&r1=252959&r2=252960&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/usrs.m?rev=252960&r1=252959&r2=252960&view=diff</a><br class="">>> ==============================================================================<br class="">>> --- cfe/trunk/test/Index/usrs.m (original)<br class="">>> +++ cfe/trunk/test/Index/usrs.m Thu Nov 12 16:19:45 2015<br class="">>> @@ -119,7 +119,7 @@ int test_multi_declaration(void) {<br class="">>> // CHECK: usrs.m c:@SA@MyStruct Extent=[15:9 - 18:2]<br class="">>> // CHECK: usrs.m c:@SA@MyStruct@FI@wa Extent=[16:3 - 16:9]<br class="">>> // CHECK: usrs.m c:@SA@MyStruct@FI@moo Extent=[17:3 - 17:10]<br class="">>> -// CHECK: usrs.m c:usrs.m@T@MyStruct Extent=[15:1 - 18:11]<br class="">>> +// CHECK: usrs.m c:@T@MyStruct Extent=[15:1 - 18:11]<br class="">>> // CHECK: usrs.m c:@E@Pizza Extent=[20:1 - 23:2]<br class="">>> // CHECK: usrs.m c:@E@Pizza@CHEESE Extent=[21:3 - 21:9]<br class="">>> // CHECK: usrs.m c:@E@Pizza@MUSHROOMS Extent=[22:3 - 22:12]<br class="">>><br class="">>> Added: cfe/trunk/test/Modules/Inputs/no-linkage/decls.h<br class="">>> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/no-linkage/decls.h?rev=252960&view=auto" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/no-linkage/decls.h?rev=252960&view=auto</a><br class="">>> ==============================================================================<br class="">>> --- cfe/trunk/test/Modules/Inputs/no-linkage/decls.h (added)<br class="">>> +++ cfe/trunk/test/Modules/Inputs/no-linkage/decls.h Thu Nov 12 16:19:45 2015<br class="">>> @@ -0,0 +1,6 @@<br class="">>> +namespace RealNS { int UsingDecl; }<br class="">>> +namespace NS = RealNS;<br class="">>> +typedef int Typedef;<br class="">>> +using AliasDecl = int;<br class="">>> +enum Enum { Enumerator };<br class="">>> +using RealNS::UsingDecl;<br class="">>><br class="">>> Added: cfe/trunk/test/Modules/Inputs/no-linkage/empty.h<br class="">>> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/no-linkage/empty.h?rev=252960&view=auto" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/no-linkage/empty.h?rev=252960&view=auto</a><br class="">>> ==============================================================================<br class="">>>   (empty)<br class="">>><br class="">>> Added: cfe/trunk/test/Modules/Inputs/no-linkage/module.modulemap<br class="">>> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/no-linkage/module.modulemap?rev=252960&view=auto" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/no-linkage/module.modulemap?rev=252960&view=auto</a><br class="">>> ==============================================================================<br class="">>> --- cfe/trunk/test/Modules/Inputs/no-linkage/module.modulemap (added)<br class="">>> +++ cfe/trunk/test/Modules/Inputs/no-linkage/module.modulemap Thu Nov 12 16:19:45 2015<br class="">>> @@ -0,0 +1 @@<br class="">>> +module M { module E { header "empty.h" } module D { header "decls.h" } }<br class="">>><br class="">>> Modified: cfe/trunk/test/Modules/decldef.m<br class="">>> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/decldef.m?rev=252960&r1=252959&r2=252960&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/decldef.m?rev=252960&r1=252959&r2=252960&view=diff</a><br class="">>> ==============================================================================<br class="">>> --- cfe/trunk/test/Modules/decldef.m (original)<br class="">>> +++ cfe/trunk/test/Modules/decldef.m Thu Nov 12 16:19:45 2015<br class="">>> @@ -11,7 +11,13 @@ Def *def;<br class="">>> #ifdef USE_EARLY<br class="">>> A *a1; // expected-error{{declaration of 'A' must be imported from module 'decldef.Def' before it is required}}<br class="">>> #endif<br class="">>> -B *b1; // expected-error{{must use 'struct' tag to refer to type 'B'}}<br class="">>> +B *b1;<br class="">>> +#ifdef USE_EARLY<br class="">>> +// expected-error@-2{{must use 'struct' tag to refer to type 'B'}}<br class="">>> +#else<br class="">>> +// expected-error@-4{{declaration of 'B' must be imported from module 'decldef.Decl' before it is required}}<br class="">>> +// expected-note@Inputs/decl.h:2 {{previous}}<br class="">>> +#endif<br class="">>> @import decldef.Decl;<br class="">>><br class="">>> A *a2;<br class="">>><br class="">>> Modified: cfe/trunk/test/Modules/merge-enumerators.cpp<br class="">>> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/merge-enumerators.cpp?rev=252960&r1=252959&r2=252960&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/merge-enumerators.cpp?rev=252960&r1=252959&r2=252960&view=diff</a><br class="">>> ==============================================================================<br class="">>> --- cfe/trunk/test/Modules/merge-enumerators.cpp (original)<br class="">>> +++ cfe/trunk/test/Modules/merge-enumerators.cpp Thu Nov 12 16:19:45 2015<br class="">>> @@ -16,11 +16,13 @@<br class="">>><br class="">>> #ifdef MERGE_LATE<br class="">>> namespace N {<br class="">>> -  // FIXME: Should we accept this and reject the usage below due to ambiguity instead?<br class="">>> -  enum { A } a; // expected-error {{redefinition of enumerator 'A'}}<br class="">>> -  //<span class="Apple-converted-space"> </span><a href="mailto:expected-note@a.h" target="_blank" class="">expected-note@a.h</a>:1 {{here}} (from module B.b)<br class="">>> +  enum { A } a; // expected-note {{candidate}}<br class="">>> +  //<span class="Apple-converted-space"> </span><a href="mailto:expected-note@a.h" target="_blank" class="">expected-note@a.h</a>:1 {{candidate}} (from module B.b)<br class="">>> }<br class="">>> #include "a.h"<br class="">>> #endif<br class="">>><br class="">>> N::E e = N::A;<br class="">>> +#ifdef MERGE_LATE<br class="">>> +// expected-error@-2 {{ambiguous}}<br class="">>> +#endif<br class="">>><br class="">>> Modified: cfe/trunk/test/Modules/module-private.cpp<br class="">>> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/module-private.cpp?rev=252960&r1=252959&r2=252960&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/module-private.cpp?rev=252960&r1=252959&r2=252960&view=diff</a><br class="">>> ==============================================================================<br class="">>> --- cfe/trunk/test/Modules/module-private.cpp (original)<br class="">>> +++ cfe/trunk/test/Modules/module-private.cpp Thu Nov 12 16:19:45 2015<br class="">>> @@ -12,11 +12,7 @@ void test() {<br class="">>> }<br class="">>><br class="">>> int test_broken() {<br class="">>> -  HiddenStruct hidden; // \<br class="">>> -  // expected-error{{must use 'struct' tag to refer to type 'HiddenStruct' in this scope}} \<br class="">>> -  // expected-error{{definition of 'HiddenStruct' must be imported}}<br class="">>> -  // expected-note@Inputs/module_private_left.h:3 {{previous definition is here}}<br class="">>> -<br class="">>> +  HiddenStruct hidden; // expected-error{{unknown type name 'HiddenStruct'}}<br class="">>>  Integer i; // expected-error{{unknown type name 'Integer'}}<br class="">>><br class="">>>  int *ip = 0;<br class="">>><br class="">>> Added: cfe/trunk/test/Modules/no-linkage.cpp<br class="">>> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/no-linkage.cpp?rev=252960&view=auto" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/no-linkage.cpp?rev=252960&view=auto</a><br class="">>> ==============================================================================<br class="">>> --- cfe/trunk/test/Modules/no-linkage.cpp (added)<br class="">>> +++ cfe/trunk/test/Modules/no-linkage.cpp Thu Nov 12 16:19:45 2015<br class="">>> @@ -0,0 +1,35 @@<br class="">>> +// RUN: rm -rf %t<br class="">>> +// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fmodules-local-submodule-visibility -I%S/Inputs/no-linkage -fmodule-map-file=%S/Inputs/no-linkage/module.modulemap %s -verify<br class="">>> +<br class="">>> +#include "empty.h"<br class="">>> +<br class="">>> +namespace NS { int n; } // expected-note {{candidate}}<br class="">>> +struct Typedef { int n; }; // expected-note {{candidate}}<br class="">>> +int AliasDecl; // expected-note {{candidate}}<br class="">>> +enum AlsoAnEnum { Enumerator }; // expected-note {{candidate}}<br class="">>> +int UsingDecl; // expected-note {{candidate}}<br class="">>> +<br class="">>> +//<span class="Apple-converted-space"> </span><a href="mailto:expected-note@decls.h" target="_blank" class="">expected-note@decls.h</a>:2 {{candidate}}<br class="">>> +//<span class="Apple-converted-space"> </span><a href="mailto:expected-note@decls.h" target="_blank" class="">expected-note@decls.h</a>:3 {{candidate}}<br class="">>> +//<span class="Apple-converted-space"> </span><a href="mailto:expected-note@decls.h" target="_blank" class="">expected-note@decls.h</a>:4 {{candidate}}<br class="">>> +//<span class="Apple-converted-space"> </span><a href="mailto:expected-note@decls.h" target="_blank" class="">expected-note@decls.h</a>:5 {{candidate}}<br class="">>> +//<span class="Apple-converted-space"> </span><a href="mailto:expected-note@decls.h" target="_blank" class="">expected-note@decls.h</a>:6 {{candidate}}<br class="">>> +<br class="">>> +void use(int);<br class="">>> +void use_things() {<br class="">>> +  use(Typedef().n);<br class="">>> +  use(NS::n);<br class="">>> +  use(AliasDecl);<br class="">>> +  use(Enumerator);<br class="">>> +  use(UsingDecl);<br class="">>> +}<br class="">>> +<br class="">>> +#include "decls.h"<br class="">>> +<br class="">>> +void use_things_again() {<br class="">>> +  use(Typedef().n); // expected-error {{ambiguous}}<br class="">>> +  use(NS::n); // expected-error {{ambiguous}} expected-error{{'NS' is not a class, namespace, or enumeration}}<br class="">>> +  use(AliasDecl); // expected-error {{ambiguous}}<br class="">>> +  use(Enumerator); // expected-error {{ambiguous}}<br class="">>> +  use(UsingDecl); // expected-error {{ambiguous}}<br class="">>> +}<br class="">>><br class="">>> Modified: cfe/trunk/test/Modules/submodule-visibility-cycles.cpp<br class="">>> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/submodule-visibility-cycles.cpp?rev=252960&r1=252959&r2=252960&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/submodule-visibility-cycles.cpp?rev=252960&r1=252959&r2=252960&view=diff</a><br class="">>> ==============================================================================<br class="">>> --- cfe/trunk/test/Modules/submodule-visibility-cycles.cpp (original)<br class="">>> +++ cfe/trunk/test/Modules/submodule-visibility-cycles.cpp Thu Nov 12 16:19:45 2015<br class="">>> @@ -3,7 +3,7 @@<br class="">>><br class="">>> #include "cycle1.h"<br class="">>> C1 c1;<br class="">>> -C2 c2; // expected-error {{must be imported}} expected-error {{}}<br class="">>> +C2 c2; // expected-error {{must be imported}}<br class="">>> //<span class="Apple-converted-space"> </span><a href="mailto:expected-note@cycle2.h" target="_blank" class="">expected-note@cycle2.h</a>:6 {{here}}<br class="">>><br class="">>> #include "cycle2.h"<br class="">>><br class="">>> Modified: cfe/trunk/test/Modules/submodules-merge-defs.cpp<br class="">>> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/submodules-merge-defs.cpp?rev=252960&r1=252959&r2=252960&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/submodules-merge-defs.cpp?rev=252960&r1=252959&r2=252960&view=diff</a><br class="">>> ==============================================================================<br class="">>> --- cfe/trunk/test/Modules/submodules-merge-defs.cpp (original)<br class="">>> +++ cfe/trunk/test/Modules/submodules-merge-defs.cpp Thu Nov 12 16:19:45 2015<br class="">>> @@ -12,7 +12,7 @@<br class="">>> #include "indirect.h"<br class="">>> #endif<br class="">>><br class="">>> -A pre_a; // expected-error {{must use 'struct'}}<br class="">>> +A pre_a;<br class="">>> #ifdef IMPORT_USE_2<br class="">>> // expected-error-re@-2 {{must be imported from one of {{.*}}stuff.use{{.*}}stuff.use-2}}<br class="">>> #elif EARLY_INDIRECT_INCLUDE<br class="">>> @@ -21,29 +21,28 @@ A pre_a; // expected-error {{must use 's<br class="">>> // expected-error@-6 {{must be imported from module 'stuff.use'}}<br class="">>> #endif<br class="">>> //<span class="Apple-converted-space"> </span><a href="mailto:expected-note@defs.h" target="_blank" class="">expected-note@defs.h</a>:1 +{{here}}<br class="">>> +extern class A pre_a2;<br class="">>> +int pre_use_a = use_a(pre_a2); // expected-error {{'A' must be imported}} expected-error {{'use_a' must be imported}}<br class="">>> //<span class="Apple-converted-space"> </span><a href="mailto:expected-note@defs.h" target="_blank" class="">expected-note@defs.h</a>:2 +{{here}}<br class="">>> -int pre_use_a = use_a(pre_a); // expected-error {{'A' must be imported}} expected-error {{'use_a' must be imported}}<br class="">>><br class="">>> B::Inner2 pre_bi; // expected-error +{{must be imported}}<br class="">>> //<span class="Apple-converted-space"> </span><a href="mailto:expected-note@defs.h" target="_blank" class="">expected-note@defs.h</a>:4 +{{here}}<br class="">>> //<span class="Apple-converted-space"> </span><a href="mailto:expected-note@defs.h" target="_blank" class="">expected-note@defs.h</a>:17 +{{here}}<br class="">>> -void pre_bfi(B b) { // expected-error {{must use 'class'}} expected-error +{{must be imported}}<br class="">>> -  b.f<int>(); // expected-error +{{must be imported}} expected-error +{{}}<br class="">>> -  //<span class="Apple-converted-space"> </span><a href="mailto:expected-note@defs.h" target="_blank" class="">expected-note@defs.h</a>:19 +{{here}}<br class="">>> +void pre_bfi(B b) { // expected-error +{{must be imported}}<br class="">>> +  b.f<int>(); // expected-error +{{}}<br class="">>> }<br class="">>><br class="">>> C_Base<1> pre_cb1; // expected-error +{{must be imported}}<br class="">>> //<span class="Apple-converted-space"> </span><a href="mailto:expected-note@defs.h" target="_blank" class="">expected-note@defs.h</a>:23 +{{here}}<br class="">>> -C1 pre_c1; // expected-error +{{must be imported}} expected-error {{must use 'struct'}}<br class="">>> +C1 pre_c1; // expected-error +{{must be imported}}<br class="">>> //<span class="Apple-converted-space"> </span><a href="mailto:expected-note@defs.h" target="_blank" class="">expected-note@defs.h</a>:25 +{{here}}<br class="">>> -C2 pre_c2; // expected-error +{{must be imported}} expected-error {{must use 'struct'}}<br class="">>> +C2 pre_c2; // expected-error +{{must be imported}}<br class="">>> //<span class="Apple-converted-space"> </span><a href="mailto:expected-note@defs.h" target="_blank" class="">expected-note@defs.h</a>:26 +{{here}}<br class="">>><br class="">>> D::X pre_dx; // expected-error +{{must be imported}}<br class="">>> //<span class="Apple-converted-space"> </span><a href="mailto:expected-note@defs.h" target="_blank" class="">expected-note@defs.h</a>:28 +{{here}}<br class="">>> //<span class="Apple-converted-space"> </span><a href="mailto:expected-note@defs.h" target="_blank" class="">expected-note@defs.h</a>:29 +{{here}}<br class="">>> -// FIXME: We should warn that use_dx is being used without being imported.<br class="">>> -int pre_use_dx = use_dx(pre_dx);<br class="">>> +int pre_use_dx = use_dx(pre_dx); // ignored; pre_dx is invalid<br class="">>><br class="">>> int pre_e = E(0); // expected-error {{must be imported}}<br class="">>> //<span class="Apple-converted-space"> </span><a href="mailto:expected-note@defs.h" target="_blank" class="">expected-note@defs.h</a>:32 +{{here}}<br class="">>> @@ -69,8 +68,9 @@ J<> pre_j; // expected-error {{declarati<br class="">>> #endif<br class="">>> //<span class="Apple-converted-space"> </span><a href="mailto:expected-note@defs.h" target="_blank" class="">expected-note@defs.h</a>:58 +{{here}}<br class="">>><br class="">>> -ScopedEnum pre_scopedenum; // expected-error {{must be imported}} expected-error {{must use 'enum'}}<br class="">>> -//<span class="Apple-converted-space"> </span><a href="mailto:expected-note@defs.h" target="_blank" class="">expected-note@defs.h</a>:106 {{here}}<br class="">>> +ScopedEnum pre_scopedenum; // expected-error {{must be imported}}<br class="">>> +//<span class="Apple-converted-space"> </span><a href="mailto:expected-note@defs.h" target="_blank" class="">expected-note@defs.h</a>:105 0-1{{here}}<br class="">>> +//<span class="Apple-converted-space"> </span><a href="mailto:expected-note@defs.h" target="_blank" class="">expected-note@defs.h</a>:106 0-1{{here}}<br class="">>> enum ScopedEnum : int;<br class="">>> ScopedEnum pre_scopedenum_declared; // ok<br class="">>><br class="">>><br class="">>><br class="">>> _______________________________________________<br class="">>> cfe-commits mailing list<br class="">>><span class="Apple-converted-space"> </span><a href="mailto:cfe-commits@lists.llvm.org" target="_blank" class="">cfe-commits@lists.llvm.org</a><br class="">>><span class="Apple-converted-space"> </span><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br class="">><br class=""><br class="">_______________________________________________<br class="">cfe-commits mailing list<br class=""><a href="mailto:cfe-commits@lists.llvm.org" target="_blank" class="">cfe-commits@lists.llvm.org</a><br class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a></div></div></blockquote></div></div></div></blockquote></div></div></div></div></blockquote></div></div></div></div></blockquote></div><br class=""></body></html>