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