[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-commits
Subject:    Re: r292194 - [AST] AttributedType should derive type properties from the EquivalentType
From:       Richard Smith via cfe-commits <cfe-commits () lists ! llvm ! org>
Date:       2017-01-31 19:12:07
Message-ID: CAGL0aWeMF8ftS43DdzHYBC4LjFFwF09kXXvTkb+c4OuLZ7yatg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Sure, let's take this for Clang 4.

On 31 January 2017 at 10:39, Hans Wennborg <hans@chromium.org> wrote:

> Ping?
>
> On Thu, Jan 26, 2017 at 3:42 PM, Hans Wennborg <hans@chromium.org> wrote:
> > Should we merge this to the release branch?
> >
> > On Mon, Jan 16, 2017 at 8:14 PM, David Majnemer via cfe-commits
> > <cfe-commits@lists.llvm.org> wrote:
> >> Author: majnemer
> >> Date: Mon Jan 16 22:14:25 2017
> >> New Revision: 292194
> >>
> >> URL: http://llvm.org/viewvc/llvm-project?rev=292194&view=rev
> >> Log:
> >> [AST] AttributedType should derive type properties from the
> EquivalentType
> >>
> >> Using the canonical type instead of the equivalent type can result in
> >> insufficient template instantiations.
> >>
> >> This fixes PR31656.
> >>
> >> Differential Revision: https://reviews.llvm.org/D28788
> >>
> >> Modified:
> >>     cfe/trunk/include/clang/AST/Type.h
> >>     cfe/trunk/test/CodeGenCXX/microsoft-abi-default-cc.cpp
> >>
> >> Modified: cfe/trunk/include/clang/AST/Type.h
> >> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/
> clang/AST/Type.h?rev=292194&r1=292193&r2=292194&view=diff
> >> ============================================================
> ==================
> >> --- cfe/trunk/include/clang/AST/Type.h (original)
> >> +++ cfe/trunk/include/clang/AST/Type.h Mon Jan 16 22:14:25 2017
> >> @@ -3832,13 +3832,13 @@ private:
> >>
> >>    friend class ASTContext; // creates these
> >>
> >> -  AttributedType(QualType canon, Kind attrKind,
> >> -                 QualType modified, QualType equivalent)
> >> -    : Type(Attributed, canon, canon->isDependentType(),
> >> -           canon->isInstantiationDependentType(),
> >> -           canon->isVariablyModifiedType(),
> >> -           canon->containsUnexpandedParameterPack()),
> >> -      ModifiedType(modified), EquivalentType(equivalent) {
> >> +  AttributedType(QualType canon, Kind attrKind, QualType modified,
> >> +                 QualType equivalent)
> >> +      : Type(Attributed, canon, equivalent->isDependentType(),
> >> +             equivalent->isInstantiationDependentType(),
> >> +             equivalent->isVariablyModifiedType(),
> >> +             equivalent->containsUnexpandedParameterPack()),
> >> +        ModifiedType(modified), EquivalentType(equivalent) {
> >>      AttributedTypeBits.AttrKind = attrKind;
> >>    }
> >>
> >>
> >> Modified: cfe/trunk/test/CodeGenCXX/microsoft-abi-default-cc.cpp
> >> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/
> CodeGenCXX/microsoft-abi-default-cc.cpp?rev=292194&r1=
> 292193&r2=292194&view=diff
> >> ============================================================
> ==================
> >> --- cfe/trunk/test/CodeGenCXX/microsoft-abi-default-cc.cpp (original)
> >> +++ cfe/trunk/test/CodeGenCXX/microsoft-abi-default-cc.cpp Mon Jan 16
> 22:14:25 2017
> >> @@ -45,3 +45,12 @@ void __cdecl static_baz() {}
> >>  void static_qux() {}
> >>  // GCABI-LABEL: define void @_Z10static_quxv
> >>  // MSABI: define void @"\01?static_qux@@YAXXZ"
> >> +
> >> +namespace PR31656 {
> >> +template <int I>
> >> +void __cdecl callee(int args[I]);
> >> +// GCABI-LABEL: declare void @_ZN7PR316566calleeILi1EEEvPi(
> >> +// MSABI: declare void @"\01??$callee@$00@PR31656@@YAXQAH@Z"(
> >> +
> >> +void caller() { callee<1>(0); }
> >> +}
> >>
> >>
> >> _______________________________________________
> >> cfe-commits mailing list
> >> cfe-commits@lists.llvm.org
> >> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>

[Attachment #5 (text/html)]

<div dir="ltr">Sure, let&#39;s take this for Clang 4.</div><div \
class="gmail_extra"><br><div class="gmail_quote">On 31 January 2017 at 10:39, Hans \
Wennborg <span dir="ltr">&lt;<a href="mailto:hans@chromium.org" \
target="_blank">hans@chromium.org</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Ping?<br> <br>
On Thu, Jan 26, 2017 at 3:42 PM, Hans Wennborg &lt;<a \
href="mailto:hans@chromium.org">hans@chromium.org</a>&gt; wrote:<br> &gt; Should we \
merge this to the release branch?<br> &gt;<br>
&gt; On Mon, Jan 16, 2017 at 8:14 PM, David Majnemer via cfe-commits<br>
&gt; &lt;<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>&gt; \
wrote:<br> &gt;&gt; Author: majnemer<br>
&gt;&gt; Date: Mon Jan 16 22:14:25 2017<br>
&gt;&gt; New Revision: 292194<br>
&gt;&gt;<br>
&gt;&gt; URL: <a href="http://llvm.org/viewvc/llvm-project?rev=292194&amp;view=rev" \
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=292194&amp;view=rev</a><br>
 &gt;&gt; Log:<br>
&gt;&gt; [AST] AttributedType should derive type properties from the \
EquivalentType<br> &gt;&gt;<br>
&gt;&gt; Using the canonical type instead of the equivalent type can result in<br>
&gt;&gt; insufficient template instantiations.<br>
&gt;&gt;<br>
&gt;&gt; This fixes PR31656.<br>
&gt;&gt;<br>
&gt;&gt; Differential Revision: <a href="https://reviews.llvm.org/D28788" \
rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D28788</a><br> \
&gt;&gt;<br> &gt;&gt; Modified:<br>
&gt;&gt;        cfe/trunk/include/clang/AST/<wbr>Type.h<br>
&gt;&gt;        cfe/trunk/test/CodeGenCXX/<wbr>microsoft-abi-default-cc.cpp<br>
&gt;&gt;<br>
&gt;&gt; Modified: cfe/trunk/include/clang/AST/<wbr>Type.h<br>
&gt;&gt; URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Type.h?rev=292194&amp;r1=292193&amp;r2=292194&amp;view=diff" \
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/in \
clude/<wbr>clang/AST/Type.h?rev=292194&amp;<wbr>r1=292193&amp;r2=292194&amp;view=diff</a><br>
 &gt;&gt; ==============================<wbr>==============================<wbr>==================<br>
 &gt;&gt; --- cfe/trunk/include/clang/AST/<wbr>Type.h (original)<br>
&gt;&gt; +++ cfe/trunk/include/clang/AST/<wbr>Type.h Mon Jan 16 22:14:25 2017<br>
&gt;&gt; @@ -3832,13 +3832,13 @@ private:<br>
&gt;&gt;<br>
&gt;&gt;      friend class ASTContext; // creates these<br>
&gt;&gt;<br>
&gt;&gt; -   AttributedType(QualType canon, Kind attrKind,<br>
&gt;&gt; -                          QualType modified, QualType equivalent)<br>
&gt;&gt; -      : Type(Attributed, canon, canon-&gt;isDependentType(),<br>
&gt;&gt; -                 canon-&gt;<wbr>isInstantiationDependentType()<wbr>,<br>
&gt;&gt; -                 canon-&gt;isVariablyModifiedType(<wbr>),<br>
&gt;&gt; -                 \
canon-&gt;<wbr>containsUnexpandedParameterPac<wbr>k()),<br> &gt;&gt; -         \
ModifiedType(modified), EquivalentType(equivalent) {<br> &gt;&gt; +   \
AttributedType(QualType canon, Kind attrKind, QualType modified,<br> &gt;&gt; +       \
QualType equivalent)<br> &gt;&gt; +         : Type(Attributed, canon, \
equivalent-&gt;isDependentType(),<br> &gt;&gt; +                    \
equivalent-&gt;<wbr>isInstantiationDependentType()<wbr>,<br> &gt;&gt; +               \
equivalent-&gt;<wbr>isVariablyModifiedType(),<br> &gt;&gt; +                    \
equivalent-&gt;<wbr>containsUnexpandedParameterPac<wbr>k()),<br> &gt;&gt; +           \
ModifiedType(modified), EquivalentType(equivalent) {<br> &gt;&gt;         \
AttributedTypeBits.AttrKind = attrKind;<br> &gt;&gt;      }<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Modified: cfe/trunk/test/CodeGenCXX/<wbr>microsoft-abi-default-cc.cpp<br>
&gt;&gt; URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/m \
icrosoft-abi-default-cc.cpp?rev=292194&amp;r1=292193&amp;r2=292194&amp;view=diff" \
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/te \
st/<wbr>CodeGenCXX/microsoft-abi-<wbr>default-cc.cpp?rev=292194&amp;r1=<wbr>292193&amp;r2=292194&amp;view=diff</a><br>
 &gt;&gt; ==============================<wbr>==============================<wbr>==================<br>
 &gt;&gt; --- cfe/trunk/test/CodeGenCXX/<wbr>microsoft-abi-default-cc.cpp \
(original)<br> &gt;&gt; +++ \
cfe/trunk/test/CodeGenCXX/<wbr>microsoft-abi-default-cc.cpp Mon Jan 16 22:14:25 \
2017<br> &gt;&gt; @@ -45,3 +45,12 @@ void __cdecl static_baz() {}<br>
&gt;&gt;   void static_qux() {}<br>
&gt;&gt;   // GCABI-LABEL: define void @_Z10static_quxv<br>
&gt;&gt;   // MSABI: define void @&quot;\01?static_qux@@YAXXZ&quot;<br>
&gt;&gt; +<br>
&gt;&gt; +namespace PR31656 {<br>
&gt;&gt; +template &lt;int I&gt;<br>
&gt;&gt; +void __cdecl callee(int args[I]);<br>
&gt;&gt; +// GCABI-LABEL: declare void @_ZN7PR316566calleeILi1EEEvPi(<br>
&gt;&gt; +// MSABI: declare void \
@&quot;\01??$callee@$00@PR31656@@<wbr>YAXQAH@Z&quot;(<br> &gt;&gt; +<br>
&gt;&gt; +void caller() { callee&lt;1&gt;(0); }<br>
&gt;&gt; +}<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; ______________________________<wbr>_________________<br>
&gt;&gt; cfe-commits mailing list<br>
&gt;&gt; <a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
 &gt;&gt; <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" \
rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
 </blockquote></div><br></div>


[Attachment #6 (text/plain)]

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic