<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Apr 6, 2015 at 4:35 PM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Apr 6, 2015 at 7:30 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>> wrote:<br>
> ================<br>
> Comment at: lib/Sema/SemaDeclAttr.cpp:2866<br>
> @@ -2865,1 +2865,3 @@<br>
><br>
> +  if (E->isTypeDependent() || E->isValueDependent()) {<br>
> +    if (const auto *TND = dyn_cast<TypedefNameDecl>(D)) {<br>
> ----------------<br>
> The 'type dependent' check here is redundant.<br>
><br>
> ================<br>
> Comment at: lib/Sema/SemaDeclAttr.cpp:2869<br>
> @@ +2868,3 @@<br>
> +      QualType T = TND->getUnderlyingType();<br>
> +      if (!T->isDependentType() && !T->isInstantiationDependentType()) {<br>
> +        S.Diag(Attr.getLoc(), diag::err_alignment_dependent_typedef_name)<br>
> ----------------<br>
> I don't think you should check instantiation-dependence here. I think you should reject this, for instance:<br>
><br>
>   template<int N> struct X {<br>
>     typedef __attribute__((aligned(N))) int X[sizeof(N)];<br>
>   };<br>
><br>
<br>
</span>Out of curiosity, why do you think that should be rejected?</blockquote><div><br></div><div>For the same reason we're rejecting anything here: we'd otherwise create a non-dependent type that has a dependent alignment.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888"><br>
~Aaron<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> <a href="http://reviews.llvm.org/D8693" target="_blank">http://reviews.llvm.org/D8693</a><br>
><br>
> EMAIL PREFERENCES<br>
>   <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</div></div></blockquote></div><br></div></div>