<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">This does indeed fix the PS4 bots. Thanks for looking into this issue even though it was PS4 specific!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Douglas Yung<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> cfe-commits [mailto:cfe-commits-bounces@lists.llvm.org]
<b>On Behalf Of </b>Richard Smith via cfe-commits<br>
<b>Sent:</b> Friday, January 27, 2017 13:40<br>
<b>To:</b> Galina Kistanova<br>
<b>Cc:</b> cfe-commits<br>
<b>Subject:</b> Re: r293207 - PR0091R3: Implement parsing support for using templates as types.<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Fixed in r293333.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On 27 January 2017 at 13:27, Richard Smith <<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>> wrote:<o:p></o:p></p>
<div>
<p class="MsoNormal">It's a pre-existing bug with some PS4-specific TLS handling ("thread_local auto a;" is sufficient to trigger the assert). A fix is on the way.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On 27 January 2017 at 11:00, Galina Kistanova via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hello Richard,<br>
<br>
This commit broke test on few our builders:<br>
<br>
Failing Tests (1):<br>
Clang :: Parser/cxx1z-class-template-argument-deduction.cpp<br>
<br>
<a href="http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast" target="_blank">http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast</a><br>
<a href="http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast" target="_blank">http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast</a><br>
<br>
Please have a look at this?<br>
<br>
Thanks<br>
<br>
Galina<br>
<br>
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Thu, Jan 26, 2017 at 12:40 PM, Richard Smith via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<o:p></o:p></p>
<p class="MsoNormal">Author: rsmith<br>
Date: Thu Jan 26 14:40:47 2017<br>
New Revision: 293207<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=293207&view=rev" target="_blank">
http://llvm.org/viewvc/llvm-project?rev=293207&view=rev</a><br>
Log:<br>
PR0091R3: Implement parsing support for using templates as types.<br>
<br>
This change adds a new type node, DeducedTemplateSpecializationType, to<br>
represent a type template name that has been used as a type. This is modeled<br>
around AutoType, and shares a common base class for representing a deduced<br>
placeholder type.<br>
<br>
We allow deduced class template types in a few more places than the standard<br>
does: in conditions and for-range-declarators, and in new-type-ids. This is<br>
consistent with GCC and with discussion on the core reflector. This patch<br>
does not yet support deduced class template types being named in typename<br>
specifiers.<br>
<br>
Added:<br>
cfe/trunk/test/Parser/cxx1z-class-template-argument-deduction.cpp<br>
Modified:<br>
cfe/trunk/include/clang/AST/ASTContext.h<br>
cfe/trunk/include/clang/AST/RecursiveASTVisitor.h<br>
cfe/trunk/include/clang/AST/Type.h<br>
cfe/trunk/include/clang/AST/TypeLoc.h<br>
cfe/trunk/include/clang/AST/TypeNodes.def<br>
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td<br>
cfe/trunk/include/clang/Parse/Parser.h<br>
cfe/trunk/include/clang/Sema/DeclSpec.h<br>
cfe/trunk/include/clang/Sema/Sema.h<br>
cfe/trunk/include/clang/Serialization/ASTBitCodes.h<br>
cfe/trunk/lib/AST/ASTContext.cpp<br>
cfe/trunk/lib/AST/ASTImporter.cpp<br>
cfe/trunk/lib/AST/ExprConstant.cpp<br>
cfe/trunk/lib/AST/ItaniumMangle.cpp<br>
cfe/trunk/lib/AST/MicrosoftMangle.cpp<br>
cfe/trunk/lib/AST/Type.cpp<br>
cfe/trunk/lib/AST/TypePrinter.cpp<br>
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp<br>
cfe/trunk/lib/CodeGen/CodeGenFunction.cpp<br>
cfe/trunk/lib/CodeGen/CodeGenTypes.cpp<br>
cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp<br>
cfe/trunk/lib/Parse/ParseDecl.cpp<br>
cfe/trunk/lib/Parse/ParseDeclCXX.cpp<br>
cfe/trunk/lib/Parse/ParseExprCXX.cpp<br>
cfe/trunk/lib/Parse/Parser.cpp<br>
cfe/trunk/lib/Sema/SemaDecl.cpp<br>
cfe/trunk/lib/Sema/SemaExpr.cpp<br>
cfe/trunk/lib/Sema/SemaExprCXX.cpp<br>
cfe/trunk/lib/Sema/SemaLookup.cpp<br>
cfe/trunk/lib/Sema/SemaTemplate.cpp<br>
cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp<br>
cfe/trunk/lib/Sema/SemaType.cpp<br>
cfe/trunk/lib/Sema/TreeTransform.h<br>
cfe/trunk/lib/Serialization/ASTReader.cpp<br>
cfe/trunk/lib/Serialization/ASTWriter.cpp<br>
cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p5.cpp<br>
cfe/trunk/test/CXX/drs/dr5xx.cpp<br>
cfe/trunk/test/Parser/backtrack-off-by-one.cpp<br>
cfe/trunk/test/SemaTemplate/temp_arg.cpp<br>
cfe/trunk/test/SemaTemplate/typename-specifier-3.cpp<br>
cfe/trunk/tools/libclang/CIndex.cpp<br>
cfe/trunk/tools/libclang/CXType.cpp<br>
<br>
Modified: cfe/trunk/include/clang/AST/ASTContext.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTContext.h?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTContext.h?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/AST/ASTContext.h (original)<br>
+++ cfe/trunk/include/clang/AST/ASTContext.h Thu Jan 26 14:40:47 2017<br>
@@ -167,6 +167,8 @@ class ASTContext : public RefCountedBase<br>
mutable llvm::FoldingSet<DependentUnaryTransformType><br>
DependentUnaryTransformTypes;<br>
mutable llvm::FoldingSet<AutoType> AutoTypes;<br>
+ mutable llvm::FoldingSet<DeducedTemplateSpecializationType><br>
+ DeducedTemplateSpecializationTypes;<br>
mutable llvm::FoldingSet<AtomicType> AtomicTypes;<br>
llvm::FoldingSet<AttributedType> AttributedTypes;<br>
mutable llvm::FoldingSet<PipeType> PipeTypes;<br>
@@ -1412,6 +1414,11 @@ public:<br>
/// \brief C++11 deduction pattern for 'auto &&' type.<br>
QualType getAutoRRefDeductType() const;<br>
<br>
+ /// \brief C++1z deduced class template specialization type.<br>
+ QualType getDeducedTemplateSpecializationType(TemplateName Template,<br>
+ QualType DeducedType,<br>
+ bool IsDependent) const;<br>
+<br>
/// \brief Return the unique reference to the type for the specified TagDecl<br>
/// (struct/union/class/enum) decl.<br>
QualType getTagDeclType(const TagDecl *Decl) const;<br>
<br>
Modified: cfe/trunk/include/clang/AST/RecursiveASTVisitor.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/RecursiveASTVisitor.h?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/RecursiveASTVisitor.h?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/AST/RecursiveASTVisitor.h (original)<br>
+++ cfe/trunk/include/clang/AST/RecursiveASTVisitor.h Thu Jan 26 14:40:47 2017<br>
@@ -1008,6 +1008,10 @@ DEF_TRAVERSE_TYPE(UnaryTransformType, {<br>
})<br>
<br>
DEF_TRAVERSE_TYPE(AutoType, { TRY_TO(TraverseType(T->getDeducedType())); })<br>
+DEF_TRAVERSE_TYPE(DeducedTemplateSpecializationType, {<br>
+ TRY_TO(TraverseTemplateName(T->getTemplateName()));<br>
+ TRY_TO(TraverseType(T->getDeducedType()));<br>
+})<br>
<br>
DEF_TRAVERSE_TYPE(RecordType, {})<br>
DEF_TRAVERSE_TYPE(EnumType, {})<br>
@@ -1232,6 +1236,11 @@ DEF_TRAVERSE_TYPELOC(AutoType, {<br>
TRY_TO(TraverseType(TL.getTypePtr()->getDeducedType()));<br>
})<br>
<br>
+DEF_TRAVERSE_TYPELOC(DeducedTemplateSpecializationType, {<br>
+ TRY_TO(TraverseTemplateName(TL.getTypePtr()->getTemplateName()));<br>
+ TRY_TO(TraverseType(TL.getTypePtr()->getDeducedType()));<br>
+})<br>
+<br>
DEF_TRAVERSE_TYPELOC(RecordType, {})<br>
DEF_TRAVERSE_TYPELOC(EnumType, {})<br>
DEF_TRAVERSE_TYPELOC(TemplateTypeParmType, {})<br>
<br>
Modified: cfe/trunk/include/clang/AST/Type.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Type.h?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Type.h?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/AST/Type.h (original)<br>
+++ cfe/trunk/include/clang/AST/Type.h Thu Jan 26 14:40:47 2017<br>
@@ -1785,7 +1785,8 @@ public:<br>
}<br>
<br>
/// \brief Determine whether this type is an undeduced type, meaning that<br>
- /// it somehow involves a C++11 'auto' type which has not yet been deduced.<br>
+ /// it somehow involves a C++11 'auto' type or similar which has not yet been<br>
+ /// deduced.<br>
bool isUndeducedType() const;<br>
<br>
/// \brief Whether this type is a variably-modified type (C99 6.7.5).<br>
@@ -1862,10 +1863,17 @@ public:<br>
/// not refer to a CXXRecordDecl, returns NULL.<br>
const CXXRecordDecl *getPointeeCXXRecordDecl() const;<br>
<br>
+ /// Get the DeducedType whose type will be deduced for a variable with<br>
+ /// an initializer of this type. This looks through declarators like pointer<br>
+ /// types, but not through decltype or typedefs.<br>
+ DeducedType *getContainedDeducedType() const;<br>
+<br>
/// Get the AutoType whose type will be deduced for a variable with<br>
/// an initializer of this type. This looks through declarators like pointer<br>
/// types, but not through decltype or typedefs.<br>
- AutoType *getContainedAutoType() const;<br>
+ AutoType *getContainedAutoType() const {<br>
+ return dyn_cast_or_null<AutoType>(getContainedDeducedType());<br>
+ }<br>
<br>
/// Determine whether this type was written with a leading 'auto'<br>
/// corresponding to a trailing return type (possibly for a nested<br>
@@ -4094,43 +4102,38 @@ public:<br>
}<br>
};<br>
<br>
-/// \brief Represents a C++11 auto or C++14 decltype(auto) type.<br>
+/// \brief Common base class for placeholders for types that get replaced by<br>
+/// placeholder type deduction: C++11 auto, C++14 decltype(auto), C++17 deduced<br>
+/// class template types, and (eventually) constrained type names from the C++<br>
+/// Concepts TS.<br>
///<br>
/// These types are usually a placeholder for a deduced type. However, before<br>
/// the initializer is attached, or (usually) if the initializer is<br>
-/// type-dependent, there is no deduced type and an auto type is canonical. In<br>
+/// type-dependent, there is no deduced type and the type is canonical. In<br>
/// the latter case, it is also a dependent type.<br>
-class AutoType : public Type, public llvm::FoldingSetNode {<br>
- AutoType(QualType DeducedType, AutoTypeKeyword Keyword, bool IsDependent)<br>
- : Type(Auto, DeducedType.isNull() ? QualType(this, 0) : DeducedType,<br>
- /*Dependent=*/IsDependent, /*InstantiationDependent=*/IsDependent,<br>
- /*VariablyModified=*/false, /*ContainsParameterPack=*/false) {<br>
- if (!DeducedType.isNull()) {<br>
- if (DeducedType->isDependentType())<br>
+class DeducedType : public Type {<br>
+protected:<br>
+ DeducedType(TypeClass TC, QualType DeducedAsType, bool IsDependent,<br>
+ bool IsInstantiationDependent, bool ContainsParameterPack)<br>
+ : Type(TC, DeducedAsType.isNull() ? QualType(this, 0) : DeducedAsType,<br>
+ IsDependent, IsInstantiationDependent,<br>
+ /*VariablyModified=*/false, ContainsParameterPack) {<br>
+ if (!DeducedAsType.isNull()) {<br>
+ if (DeducedAsType->isDependentType())<br>
setDependent();<br>
- if (DeducedType->isInstantiationDependentType())<br>
+ if (DeducedAsType->isInstantiationDependentType())<br>
setInstantiationDependent();<br>
- if (DeducedType->containsUnexpandedParameterPack())<br>
+ if (DeducedAsType->containsUnexpandedParameterPack())<br>
setContainsUnexpandedParameterPack();<br>
}<br>
- AutoTypeBits.Keyword = (unsigned)Keyword;<br>
}<br>
<br>
- friend class ASTContext; // ASTContext creates these<br>
-<br>
public:<br>
- bool isDecltypeAuto() const {<br>
- return getKeyword() == AutoTypeKeyword::DecltypeAuto;<br>
- }<br>
- AutoTypeKeyword getKeyword() const {<br>
- return (AutoTypeKeyword)AutoTypeBits.Keyword;<br>
- }<br>
-<br>
bool isSugared() const { return !isCanonicalUnqualified(); }<br>
QualType desugar() const { return getCanonicalTypeInternal(); }<br>
<br>
- /// \brief Get the type deduced for this auto type, or null if it's either<br>
- /// not been deduced or was deduced to a dependent type.<br>
+ /// \brief Get the type deduced for this placeholder type, or null if it's<br>
+ /// either not been deduced or was deduced to a dependent type.<br>
QualType getDeducedType() const {<br>
return !isCanonicalUnqualified() ? getCanonicalTypeInternal() : QualType();<br>
}<br>
@@ -4138,6 +4141,31 @@ public:<br>
return !isCanonicalUnqualified() || isDependentType();<br>
}<br>
<br>
+ static bool classof(const Type *T) {<br>
+ return T->getTypeClass() == Auto ||<br>
+ T->getTypeClass() == DeducedTemplateSpecialization;<br>
+ }<br>
+};<br>
+<br>
+/// \brief Represents a C++11 auto or C++14 decltype(auto) type.<br>
+class AutoType : public DeducedType, public llvm::FoldingSetNode {<br>
+ AutoType(QualType DeducedAsType, AutoTypeKeyword Keyword,<br>
+ bool IsDeducedAsDependent)<br>
+ : DeducedType(Auto, DeducedAsType, IsDeducedAsDependent,<br>
+ IsDeducedAsDependent, /*ContainsPack=*/false) {<br>
+ AutoTypeBits.Keyword = (unsigned)Keyword;<br>
+ }<br>
+<br>
+ friend class ASTContext; // ASTContext creates these<br>
+<br>
+public:<br>
+ bool isDecltypeAuto() const {<br>
+ return getKeyword() == AutoTypeKeyword::DecltypeAuto;<br>
+ }<br>
+ AutoTypeKeyword getKeyword() const {<br>
+ return (AutoTypeKeyword)AutoTypeBits.Keyword;<br>
+ }<br>
+<br>
void Profile(llvm::FoldingSetNodeID &ID) {<br>
Profile(ID, getDeducedType(), getKeyword(), isDependentType());<br>
}<br>
@@ -4154,6 +4182,43 @@ public:<br>
}<br>
};<br>
<br>
+/// \brief Represents a C++17 deduced template specialization type.<br>
+class DeducedTemplateSpecializationType : public DeducedType,<br>
+ public llvm::FoldingSetNode {<br>
+ /// The name of the template whose arguments will be deduced.<br>
+ TemplateName Template;<br>
+<br>
+ DeducedTemplateSpecializationType(TemplateName Template,<br>
+ QualType DeducedAsType,<br>
+ bool IsDeducedAsDependent)<br>
+ : DeducedType(DeducedTemplateSpecialization, DeducedAsType,<br>
+ IsDeducedAsDependent || Template.isDependent(),<br>
+ IsDeducedAsDependent || Template.isInstantiationDependent(),<br>
+ Template.containsUnexpandedParameterPack()),<br>
+ Template(Template) {}<br>
+<br>
+ friend class ASTContext; // ASTContext creates these<br>
+<br>
+public:<br>
+ /// Retrieve the name of the template that we are deducing.<br>
+ TemplateName getTemplateName() const { return Template;}<br>
+<br>
+ void Profile(llvm::FoldingSetNodeID &ID) {<br>
+ Profile(ID, getTemplateName(), getDeducedType(), isDependentType());<br>
+ }<br>
+<br>
+ static void Profile(llvm::FoldingSetNodeID &ID, TemplateName Template,<br>
+ QualType Deduced, bool IsDependent) {<br>
+ Template.Profile(ID);<br>
+ ID.AddPointer(Deduced.getAsOpaquePtr());<br>
+ ID.AddBoolean(IsDependent);<br>
+ }<br>
+<br>
+ static bool classof(const Type *T) {<br>
+ return T->getTypeClass() == DeducedTemplateSpecialization;<br>
+ }<br>
+};<br>
+<br>
/// \brief Represents a type template specialization; the template<br>
/// must be a class template, a type alias template, or a template<br>
/// template parameter. A template which cannot be resolved to one of<br>
@@ -5857,8 +5922,8 @@ inline bool Type::isBooleanType() const<br>
}<br>
<br>
inline bool Type::isUndeducedType() const {<br>
- const AutoType *AT = getContainedAutoType();<br>
- return AT && !AT->isDeduced();<br>
+ auto *DT = getContainedDeducedType();<br>
+ return DT && !DT->isDeduced();<br>
}<br>
<br>
/// \brief Determines whether this is a type for which one can define<br>
<br>
Modified: cfe/trunk/include/clang/AST/TypeLoc.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/TypeLoc.h?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/TypeLoc.h?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/AST/TypeLoc.h (original)<br>
+++ cfe/trunk/include/clang/AST/TypeLoc.h Thu Jan 26 14:40:47 2017<br>
@@ -1827,9 +1827,25 @@ public:<br>
}<br>
};<br>
<br>
-class AutoTypeLoc : public InheritingConcreteTypeLoc<TypeSpecTypeLoc,<br>
- AutoTypeLoc,<br>
- AutoType> {<br>
+class DeducedTypeLoc<br>
+ : public InheritingConcreteTypeLoc<TypeSpecTypeLoc, DeducedTypeLoc,<br>
+ DeducedType> {};<br>
+<br>
+class AutoTypeLoc<br>
+ : public InheritingConcreteTypeLoc<DeducedTypeLoc, AutoTypeLoc, AutoType> {<br>
+};<br>
+<br>
+class DeducedTemplateSpecializationTypeLoc<br>
+ : public InheritingConcreteTypeLoc<DeducedTypeLoc,<br>
+ DeducedTemplateSpecializationTypeLoc,<br>
+ DeducedTemplateSpecializationType> {<br>
+public:<br>
+ SourceLocation getTemplateNameLoc() const {<br>
+ return getNameLoc();<br>
+ }<br>
+ void setTemplateNameLoc(SourceLocation Loc) {<br>
+ setNameLoc(Loc);<br>
+ }<br>
};<br>
<br>
struct ElaboratedLocInfo {<br>
<br>
Modified: cfe/trunk/include/clang/AST/TypeNodes.def<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/TypeNodes.def?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/TypeNodes.def?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/AST/TypeNodes.def (original)<br>
+++ cfe/trunk/include/clang/AST/TypeNodes.def Thu Jan 26 14:40:47 2017<br>
@@ -96,7 +96,9 @@ DEPENDENT_TYPE(TemplateTypeParm, Type)<br>
NON_CANONICAL_TYPE(SubstTemplateTypeParm, Type)<br>
DEPENDENT_TYPE(SubstTemplateTypeParmPack, Type)<br>
NON_CANONICAL_UNLESS_DEPENDENT_TYPE(TemplateSpecialization, Type)<br>
-TYPE(Auto, Type)<br>
+ABSTRACT_TYPE(Deduced, Type)<br>
+TYPE(Auto, DeducedType)<br>
+TYPE(DeducedTemplateSpecialization, DeducedType)<br>
DEPENDENT_TYPE(InjectedClassName, Type)<br>
DEPENDENT_TYPE(DependentName, Type)<br>
DEPENDENT_TYPE(DependentTemplateSpecialization, Type)<br>
<br>
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)<br>
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Thu Jan 26 14:40:47 2017<br>
@@ -1870,16 +1870,20 @@ def err_illegal_decl_array_of_auto : Err<br>
def err_new_array_of_auto : Error<<br>
"cannot allocate array of 'auto'">;<br>
def err_auto_not_allowed : Error<<br>
- "%select{'auto'|'decltype(auto)'|'__auto_type'}0 not allowed "<br>
+ "%select{'auto'|'decltype(auto)'|'__auto_type'|"<br>
+ "use of "<br>
+ "%select{class template|function template|variable template|alias template|"<br>
+ "template template parameter|template}2 %3 requires template arguments; "<br>
+ "argument deduction}0 not allowed "<br>
"%select{in function prototype"<br>
"|in non-static struct member|in struct member"<br>
"|in non-static union member|in union member"<br>
"|in non-static class member|in interface member"<br>
- "|in exception declaration|in template parameter|in block literal"<br>
+ "|in exception declaration|in template parameter until C++1z|in block literal"<br>
"|in template argument|in typedef|in type alias|in function return type"<br>
"|in conversion function type|here|in lambda parameter"<br>
- "|in type allocated by 'new'|in K&R-style function parameter}1"<br>
- "%select{|||||||| until C++1z||||||||||}1">;<br>
+ "|in type allocated by 'new'|in K&R-style function parameter"<br>
+ "|in template parameter|in friend declaration}1">;<br>
def err_auto_not_allowed_var_inst : Error<<br>
"'auto' variable template instantiation is not allowed">;<br>
def err_auto_var_requires_init : Error<<br>
@@ -1944,6 +1948,14 @@ def err_decltype_auto_compound_type : Er<br>
def err_decltype_auto_initializer_list : Error<<br>
"cannot deduce 'decltype(auto)' from initializer list">;<br>
<br>
+// C++1z deduced class template specialization types<br>
+def err_deduced_class_template_compound_type : Error<<br>
+ "cannot %select{form pointer to|form reference to|form array of|"<br>
+ "form function returning|use parentheses when declaring variable with}0 "<br>
+ "deduced class template specialization type">;<br>
+def err_deduced_class_template_not_supported : Error<<br>
+ "deduction of template arguments for class templates is not yet supported">;<br>
+<br>
// C++1y deduced return types<br>
def err_auto_fn_deduction_failure : Error<<br>
"cannot deduce return type %0 from returned value of type %1">;<br>
<br>
Modified: cfe/trunk/include/clang/Parse/Parser.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Parser.h?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Parser.h?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/Parse/Parser.h (original)<br>
+++ cfe/trunk/include/clang/Parse/Parser.h Thu Jan 26 14:40:47 2017<br>
@@ -1834,6 +1834,26 @@ private:<br>
llvm_unreachable("Missing DeclSpecContext case");<br>
}<br>
<br>
+ /// Is this a context in which we can perform class template argument<br>
+ /// deduction?<br>
+ static bool isClassTemplateDeductionContext(DeclSpecContext DSC) {<br>
+ switch (DSC) {<br>
+ case DSC_normal:<br>
+ case DSC_class:<br>
+ case DSC_top_level:<br>
+ case DSC_condition:<br>
+ case DSC_type_specifier:<br>
+ return true;<br>
+<br>
+ case DSC_objc_method_result:<br>
+ case DSC_template_type_arg:<br>
+ case DSC_trailing:<br>
+ case DSC_alias_declaration:<br>
+ return false;<br>
+ }<br>
+ llvm_unreachable("Missing DeclSpecContext case");<br>
+ }<br>
+<br>
/// Information on a C++0x for-range-initializer found while parsing a<br>
/// declaration which turns out to be a for-range-declaration.<br>
struct ForRangeInit {<br>
<br>
Modified: cfe/trunk/include/clang/Sema/DeclSpec.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/DeclSpec.h?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/DeclSpec.h?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/Sema/DeclSpec.h (original)<br>
+++ cfe/trunk/include/clang/Sema/DeclSpec.h Thu Jan 26 14:40:47 2017<br>
@@ -1709,6 +1709,7 @@ public:<br>
ObjCParameterContext,// An ObjC method parameter type.<br>
KNRTypeListContext, // K&R type definition list for formals.<br>
TypeNameContext, // Abstract declarator for types.<br>
+ FunctionalCastContext, // Type in a C++ functional cast expression.<br>
MemberContext, // Struct/Union field.<br>
BlockContext, // Declaration within a block in a function.<br>
ForContext, // Declaration within first part of a for loop.<br>
@@ -1911,6 +1912,7 @@ public:<br>
return false;<br>
<br>
case TypeNameContext:<br>
+ case FunctionalCastContext:<br>
case AliasDeclContext:<br>
case AliasTemplateContext:<br>
case PrototypeContext:<br>
@@ -1951,6 +1953,7 @@ public:<br>
return true;<br>
<br>
case TypeNameContext:<br>
+ case FunctionalCastContext:<br>
case CXXNewContext:<br>
case AliasDeclContext:<br>
case AliasTemplateContext:<br>
@@ -1983,6 +1986,7 @@ public:<br>
case CXXCatchContext:<br>
case ObjCCatchContext:<br>
case TypeNameContext:<br>
+ case FunctionalCastContext:<br>
case ConversionIdContext:<br>
case ObjCParameterContext:<br>
case ObjCResultContext:<br>
@@ -2021,6 +2025,7 @@ public:<br>
// These contexts don't allow any kind of non-abstract declarator.<br>
case KNRTypeListContext:<br>
case TypeNameContext:<br>
+ case FunctionalCastContext:<br>
case AliasDeclContext:<br>
case AliasTemplateContext:<br>
case LambdaExprParameterContext:<br>
@@ -2078,6 +2083,7 @@ public:<br>
case CXXCatchContext:<br>
case ObjCCatchContext:<br>
case TypeNameContext:<br>
+ case FunctionalCastContext: // FIXME<br>
case CXXNewContext:<br>
case AliasDeclContext:<br>
case AliasTemplateContext:<br>
@@ -2279,6 +2285,7 @@ public:<br>
case ConditionContext:<br>
case KNRTypeListContext:<br>
case TypeNameContext:<br>
+ case FunctionalCastContext:<br>
case AliasDeclContext:<br>
case AliasTemplateContext:<br>
case PrototypeContext:<br>
<br>
Modified: cfe/trunk/include/clang/Sema/Sema.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Sema.h?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Sema.h?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/Sema/Sema.h (original)<br>
+++ cfe/trunk/include/clang/Sema/Sema.h Thu Jan 26 14:40:47 2017<br>
@@ -1548,6 +1548,7 @@ public:<br>
ParsedType ObjectType = nullptr,<br>
bool IsCtorOrDtorName = false,<br>
bool WantNontrivialTypeSourceInfo = false,<br>
+ bool IsClassTemplateDeductionContext = true,<br>
IdentifierInfo **CorrectedII = nullptr);<br>
TypeSpecifierType isTagName(IdentifierInfo &II, Scope *S);<br>
bool isMicrosoftMissingTypename(const CXXScopeSpec *SS, Scope *S);<br>
<br>
Modified: cfe/trunk/include/clang/Serialization/ASTBitCodes.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Serialization/ASTBitCodes.h?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Serialization/ASTBitCodes.h?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/Serialization/ASTBitCodes.h (original)<br>
+++ cfe/trunk/include/clang/Serialization/ASTBitCodes.h Thu Jan 26 14:40:47 2017<br>
@@ -914,7 +914,9 @@ namespace clang {<br>
/// \brief A PipeType record.<br>
TYPE_PIPE = 43,<br>
/// \brief An ObjCTypeParamType record.<br>
- TYPE_OBJC_TYPE_PARAM = 44<br>
+ TYPE_OBJC_TYPE_PARAM = 44,<br>
+ /// \brief A DeducedTemplateSpecializationType record.<br>
+ TYPE_DEDUCED_TEMPLATE_SPECIALIZATION = 45<br>
};<br>
<br>
/// \brief The type IDs for special types constructed by semantic<br>
<br>
Modified: cfe/trunk/lib/AST/ASTContext.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/AST/ASTContext.cpp (original)<br>
+++ cfe/trunk/lib/AST/ASTContext.cpp Thu Jan 26 14:40:47 2017<br>
@@ -1877,8 +1877,9 @@ TypeInfo ASTContext::getTypeInfoImpl(con<br>
return getTypeInfo(cast<SubstTemplateTypeParmType>(T)-><br>
getReplacementType().getTypePtr());<br>
<br>
- case Type::Auto: {<br>
- const AutoType *A = cast<AutoType>(T);<br>
+ case Type::Auto:<br>
+ case Type::DeducedTemplateSpecialization: {<br>
+ const DeducedType *A = cast<DeducedType>(T);<br>
assert(!A->getDeducedType().isNull() &&<br>
"cannot request the size of an undeduced or dependent auto type");<br>
return getTypeInfo(A->getDeducedType().getTypePtr());<br>
@@ -2765,6 +2766,7 @@ QualType ASTContext::getVariableArrayDec<br>
case Type::TemplateTypeParm:<br>
case Type::SubstTemplateTypeParmPack:<br>
case Type::Auto:<br>
+ case Type::DeducedTemplateSpecialization:<br>
case Type::PackExpansion:<br>
llvm_unreachable("type should never be variably-modified");<br>
<br>
@@ -4435,6 +4437,28 @@ QualType ASTContext::getAutoType(QualTyp<br>
return QualType(AT, 0);<br>
}<br>
<br>
+/// Return the uniqued reference to the deduced template specialization type<br>
+/// which has been deduced to the given type, or to the canonical undeduced<br>
+/// such type, or the canonical deduced-but-dependent such type.<br>
+QualType ASTContext::getDeducedTemplateSpecializationType(<br>
+ TemplateName Template, QualType DeducedType, bool IsDependent) const {<br>
+ // Look in the folding set for an existing type.<br>
+ void *InsertPos = nullptr;<br>
+ llvm::FoldingSetNodeID ID;<br>
+ DeducedTemplateSpecializationType::Profile(ID, Template, DeducedType,<br>
+ IsDependent);<br>
+ if (DeducedTemplateSpecializationType *DTST =<br>
+ DeducedTemplateSpecializationTypes.FindNodeOrInsertPos(ID, InsertPos))<br>
+ return QualType(DTST, 0);<br>
+<br>
+ DeducedTemplateSpecializationType *DTST = new (*this, TypeAlignment)<br>
+ DeducedTemplateSpecializationType(Template, DeducedType, IsDependent);<br>
+ Types.push_back(DTST);<br>
+ if (InsertPos)<br>
+ DeducedTemplateSpecializationTypes.InsertNode(DTST, InsertPos);<br>
+ return QualType(DTST, 0);<br>
+}<br>
+<br>
/// getAtomicType - Return the uniqued reference to the atomic type for<br>
/// the given value type.<br>
QualType ASTContext::getAtomicType(QualType T) const {<br>
@@ -6333,6 +6357,7 @@ void ASTContext::getObjCEncodingForTypeI<br>
// We could see an undeduced auto type here during error recovery.<br>
// Just ignore it.<br>
case Type::Auto:<br>
+ case Type::DeducedTemplateSpecialization:<br>
return;<br>
<br>
case Type::Pipe:<br>
@@ -8132,6 +8157,7 @@ QualType ASTContext::mergeTypes(QualType<br>
llvm_unreachable("Non-canonical and dependent types shouldn't get here");<br>
<br>
case Type::Auto:<br>
+ case Type::DeducedTemplateSpecialization:<br>
case Type::LValueReference:<br>
case Type::RValueReference:<br>
case Type::MemberPointer:<br>
<br>
Modified: cfe/trunk/lib/AST/ASTImporter.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTImporter.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTImporter.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/AST/ASTImporter.cpp (original)<br>
+++ cfe/trunk/lib/AST/ASTImporter.cpp Thu Jan 26 14:40:47 2017<br>
@@ -883,6 +883,20 @@ static bool IsStructurallyEquivalent(Str<br>
return false;<br>
break;<br>
<br>
+ case Type::DeducedTemplateSpecialization: {<br>
+ auto *DT1 = cast<DeducedTemplateSpecializationType>(T1);<br>
+ auto *DT2 = cast<DeducedTemplateSpecializationType>(T2);<br>
+ if (!IsStructurallyEquivalent(Context,<br>
+ DT1->getTemplateName(),<br>
+ DT2->getTemplateName()))<br>
+ return false;<br>
+ if (!IsStructurallyEquivalent(Context,<br>
+ DT1->getDeducedType(),<br>
+ DT2->getDeducedType()))<br>
+ return false;<br>
+ break;<br>
+ }<br>
+<br>
case Type::Record:<br>
case Type::Enum:<br>
if (!IsStructurallyEquivalent(Context,<br>
<br>
Modified: cfe/trunk/lib/AST/ExprConstant.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/AST/ExprConstant.cpp (original)<br>
+++ cfe/trunk/lib/AST/ExprConstant.cpp Thu Jan 26 14:40:47 2017<br>
@@ -7004,6 +7004,7 @@ static int EvaluateBuiltinClassifyType(c<br>
case Type::Vector:<br>
case Type::ExtVector:<br>
case Type::Auto:<br>
+ case Type::DeducedTemplateSpecialization:<br>
case Type::ObjCObject:<br>
case Type::ObjCInterface:<br>
case Type::ObjCObjectPointer:<br>
<br>
Modified: cfe/trunk/lib/AST/ItaniumMangle.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ItaniumMangle.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ItaniumMangle.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/AST/ItaniumMangle.cpp (original)<br>
+++ cfe/trunk/lib/AST/ItaniumMangle.cpp Thu Jan 26 14:40:47 2017<br>
@@ -1870,6 +1870,7 @@ bool CXXNameMangler::mangleUnresolvedTyp<br>
case Type::Paren:<br>
case Type::Attributed:<br>
case Type::Auto:<br>
+ case Type::DeducedTemplateSpecialization:<br>
case Type::PackExpansion:<br>
case Type::ObjCObject:<br>
case Type::ObjCInterface:<br>
@@ -3145,6 +3146,16 @@ void CXXNameMangler::mangleType(const Au<br>
mangleType(D);<br>
}<br>
<br>
+void CXXNameMangler::mangleType(const DeducedTemplateSpecializationType *T) {<br>
+ // FIXME: This is not the right mangling. We also need to include a scope<br>
+ // here in some cases.<br>
+ QualType D = T->getDeducedType();<br>
+ if (D.isNull())<br>
+ mangleUnscopedTemplateName(T->getTemplateName(), nullptr);<br>
+ else<br>
+ mangleType(D);<br>
+}<br>
+<br>
void CXXNameMangler::mangleType(const AtomicType *T) {<br>
// <type> ::= U <source-name> <type> # vendor extended type qualifier<br>
// (Until there's a standardized mangling...)<br>
<br>
Modified: cfe/trunk/lib/AST/MicrosoftMangle.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/MicrosoftMangle.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/MicrosoftMangle.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/AST/MicrosoftMangle.cpp (original)<br>
+++ cfe/trunk/lib/AST/MicrosoftMangle.cpp Thu Jan 26 14:40:47 2017<br>
@@ -2474,6 +2474,17 @@ void MicrosoftCXXNameMangler::mangleType<br>
<< Range;<br>
}<br>
<br>
+void MicrosoftCXXNameMangler::mangleType(<br>
+ const DeducedTemplateSpecializationType *T, Qualifiers, SourceRange Range) {<br>
+ assert(T->getDeducedType().isNull() && "expecting a dependent type!");<br>
+<br>
+ DiagnosticsEngine &Diags = Context.getDiags();<br>
+ unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error,<br>
+ "cannot mangle this deduced class template specialization type yet");<br>
+ Diags.Report(Range.getBegin(), DiagID)<br>
+ << Range;<br>
+}<br>
+<br>
void MicrosoftCXXNameMangler::mangleType(const AtomicType *T, Qualifiers,<br>
SourceRange Range) {<br>
QualType ValueType = T->getValueType();<br>
<br>
Modified: cfe/trunk/lib/AST/Type.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Type.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Type.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/AST/Type.cpp (original)<br>
+++ cfe/trunk/lib/AST/Type.cpp Thu Jan 26 14:40:47 2017<br>
@@ -1559,25 +1559,29 @@ TagDecl *Type::getAsTagDecl() const {<br>
}<br>
<br>
namespace {<br>
- class GetContainedAutoVisitor :<br>
- public TypeVisitor<GetContainedAutoVisitor, Type*> {<br>
+ class GetContainedDeducedTypeVisitor :<br>
+ public TypeVisitor<GetContainedDeducedTypeVisitor, Type*> {<br>
bool Syntactic;<br>
public:<br>
- GetContainedAutoVisitor(bool Syntactic = false) : Syntactic(Syntactic) {}<br>
+ GetContainedDeducedTypeVisitor(bool Syntactic = false)<br>
+ : Syntactic(Syntactic) {}<br>
<br>
- using TypeVisitor<GetContainedAutoVisitor, Type*>::Visit;<br>
+ using TypeVisitor<GetContainedDeducedTypeVisitor, Type*>::Visit;<br>
Type *Visit(QualType T) {<br>
if (T.isNull())<br>
return nullptr;<br>
return Visit(T.getTypePtr());<br>
}<br>
<br>
- // The 'auto' type itself.<br>
- Type *VisitAutoType(const AutoType *AT) {<br>
- return const_cast<AutoType*>(AT);<br>
+ // The deduced type itself.<br>
+ Type *VisitDeducedType(const DeducedType *AT) {<br>
+ return const_cast<DeducedType*>(AT);<br>
}<br>
<br>
// Only these types can contain the desired 'auto' type.<br>
+ Type *VisitElaboratedType(const ElaboratedType *T) {<br>
+ return Visit(T->getNamedType());<br>
+ }<br>
Type *VisitPointerType(const PointerType *T) {<br>
return Visit(T->getPointeeType());<br>
}<br>
@@ -1620,13 +1624,14 @@ namespace {<br>
};<br>
}<br>
<br>
-AutoType *Type::getContainedAutoType() const {<br>
- return cast_or_null<AutoType>(GetContainedAutoVisitor().Visit(this));<br>
+DeducedType *Type::getContainedDeducedType() const {<br>
+ return cast_or_null<DeducedType>(<br>
+ GetContainedDeducedTypeVisitor().Visit(this));<br>
}<br>
<br>
bool Type::hasAutoForTrailingReturnType() const {<br>
return dyn_cast_or_null<FunctionType>(<br>
- GetContainedAutoVisitor(true).Visit(this));<br>
+ GetContainedDeducedTypeVisitor(true).Visit(this));<br>
}<br>
<br>
bool Type::hasIntegerRepresentation() const {<br>
@@ -3378,6 +3383,7 @@ static CachedProperties computeCachedPro<br>
return CachedProperties(ExternalLinkage, false);<br>
<br>
case Type::Auto:<br>
+ case Type::DeducedTemplateSpecialization:<br>
// Give non-deduced 'auto' types external linkage. We should only see them<br>
// here in error recovery.<br>
return CachedProperties(ExternalLinkage, false);<br>
@@ -3485,6 +3491,7 @@ static LinkageInfo computeLinkageInfo(co<br>
return LinkageInfo::external();<br>
<br>
case Type::Auto:<br>
+ case Type::DeducedTemplateSpecialization:<br>
return LinkageInfo::external();<br>
<br>
case Type::Record:<br>
@@ -3621,7 +3628,8 @@ bool Type::canHaveNullability() const {<br>
<br>
// auto is considered dependent when it isn't deduced.<br>
case Type::Auto:<br>
- return !cast<AutoType>(type.getTypePtr())->isDeduced();<br>
+ case Type::DeducedTemplateSpecialization:<br>
+ return !cast<DeducedType>(type.getTypePtr())->isDeduced();<br>
<br>
case Type::Builtin:<br>
switch (cast<BuiltinType>(type.getTypePtr())->getKind()) {<br>
<br>
Modified: cfe/trunk/lib/AST/TypePrinter.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/TypePrinter.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/TypePrinter.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/AST/TypePrinter.cpp (original)<br>
+++ cfe/trunk/lib/AST/TypePrinter.cpp Thu Jan 26 14:40:47 2017<br>
@@ -189,6 +189,7 @@ bool TypePrinter::canPrefixQualifiers(co<br>
case Type::Elaborated:<br>
case Type::TemplateTypeParm:<br>
case Type::SubstTemplateTypeParmPack:<br>
+ case Type::DeducedTemplateSpecialization:<br>
case Type::TemplateSpecialization:<br>
case Type::InjectedClassName:<br>
case Type::DependentName:<br>
@@ -887,6 +888,24 @@ void TypePrinter::printAutoAfter(const A<br>
if (!T->getDeducedType().isNull())<br>
printAfter(T->getDeducedType(), OS);<br>
}<br>
+<br>
+void TypePrinter::printDeducedTemplateSpecializationBefore(<br>
+ const DeducedTemplateSpecializationType *T, raw_ostream &OS) {<br>
+ // If the type has been deduced, print the deduced type.<br>
+ if (!T->getDeducedType().isNull()) {<br>
+ printBefore(T->getDeducedType(), OS);<br>
+ } else {<br>
+ IncludeStrongLifetimeRAII Strong(Policy);<br>
+ T->getTemplateName().print(OS, Policy);<br>
+ spaceBeforePlaceHolder(OS);<br>
+ }<br>
+}<br>
+void TypePrinter::printDeducedTemplateSpecializationAfter(<br>
+ const DeducedTemplateSpecializationType *T, raw_ostream &OS) {<br>
+ // If the type has been deduced, print the deduced type.<br>
+ if (!T->getDeducedType().isNull())<br>
+ printAfter(T->getDeducedType(), OS);<br>
+}<br>
<br>
void TypePrinter::printAtomicBefore(const AtomicType *T, raw_ostream &OS) {<br>
IncludeStrongLifetimeRAII Strong(Policy);<br>
<br>
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)<br>
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Thu Jan 26 14:40:47 2017<br>
@@ -2618,6 +2618,7 @@ llvm::DIType *CGDebugInfo::CreateTypeNod<br>
case Type::Attributed:<br>
case Type::Adjusted:<br>
case Type::Decayed:<br>
+ case Type::DeducedTemplateSpecialization:<br>
case Type::Elaborated:<br>
case Type::Paren:<br>
case Type::SubstTemplateTypeParm:<br>
<br>
Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/CodeGen/CodeGenFunction.cpp (original)<br>
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.cpp Thu Jan 26 14:40:47 2017<br>
@@ -200,7 +200,8 @@ TypeEvaluationKind CodeGenFunction::getE<br>
llvm_unreachable("non-canonical or dependent type in IR-generation");<br>
<br>
case Type::Auto:<br>
- llvm_unreachable("undeduced auto type in IR-generation");<br>
+ case Type::DeducedTemplateSpecialization:<br>
+ llvm_unreachable("undeduced type in IR-generation");<br>
<br>
// Various scalar types.<br>
case Type::Builtin:<br>
@@ -1899,6 +1900,7 @@ void CodeGenFunction::EmitVariablyModifi<br>
case Type::Typedef:<br>
case Type::Decltype:<br>
case Type::Auto:<br>
+ case Type::DeducedTemplateSpecialization:<br>
// Stop walking: nothing to do.<br>
return;<br>
<br>
<br>
Modified: cfe/trunk/lib/CodeGen/CodeGenTypes.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenTypes.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenTypes.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/CodeGen/CodeGenTypes.cpp (original)<br>
+++ cfe/trunk/lib/CodeGen/CodeGenTypes.cpp Thu Jan 26 14:40:47 2017<br>
@@ -487,7 +487,8 @@ llvm::Type *CodeGenTypes::ConvertType(Qu<br>
break;<br>
}<br>
case Type::Auto:<br>
- llvm_unreachable("Unexpected undeduced auto type!");<br>
+ case Type::DeducedTemplateSpecialization:<br>
+ llvm_unreachable("Unexpected undeduced type!");<br>
case Type::Complex: {<br>
llvm::Type *EltTy = ConvertType(cast<ComplexType>(Ty)->getElementType());<br>
ResultType = llvm::StructType::get(EltTy, EltTy, nullptr);<br>
<br>
Modified: cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp (original)<br>
+++ cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp Thu Jan 26 14:40:47 2017<br>
@@ -2815,7 +2815,8 @@ void ItaniumRTTIBuilder::BuildVTablePoin<br>
llvm_unreachable("References shouldn't get here");<br>
<br>
case Type::Auto:<br>
- llvm_unreachable("Undeduced auto type shouldn't get here");<br>
+ case Type::DeducedTemplateSpecialization:<br>
+ llvm_unreachable("Undeduced type shouldn't get here");<br>
<br>
case Type::Pipe:<br>
llvm_unreachable("Pipe types shouldn't get here");<br>
@@ -3045,7 +3046,8 @@ llvm::Constant *ItaniumRTTIBuilder::Buil<br>
llvm_unreachable("References shouldn't get here");<br>
<br>
case Type::Auto:<br>
- llvm_unreachable("Undeduced auto type shouldn't get here");<br>
+ case Type::DeducedTemplateSpecialization:<br>
+ llvm_unreachable("Undeduced type shouldn't get here");<br>
<br>
case Type::Pipe:<br>
llvm_unreachable("Pipe type shouldn't get here");<br>
<br>
Modified: cfe/trunk/lib/Parse/ParseDecl.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDecl.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDecl.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Parse/ParseDecl.cpp (original)<br>
+++ cfe/trunk/lib/Parse/ParseDecl.cpp Thu Jan 26 14:40:47 2017<br>
@@ -2884,7 +2884,8 @@ void Parser::ParseDeclarationSpecifiers(<br>
Actions.getTypeName(*Next.getIdentifierInfo(), Next.getLocation(),<br>
getCurScope(), &SS, false, false, nullptr,<br>
/*IsCtorOrDtorName=*/false,<br>
- /*NonTrivialSourceInfo=*/true);<br>
+ /*WantNonTrivialSourceInfo=*/true,<br>
+ isClassTemplateDeductionContext(DSContext));<br>
<br>
// If the referenced identifier is not a type, then this declspec is<br>
// erroneous: We already checked about that it has no type specifier, and<br>
@@ -2998,9 +2999,10 @@ void Parser::ParseDeclarationSpecifiers(<br>
continue;<br>
}<br>
<br>
- ParsedType TypeRep =<br>
- Actions.getTypeName(*Tok.getIdentifierInfo(),<br>
- Tok.getLocation(), getCurScope());<br>
+ ParsedType TypeRep = Actions.getTypeName(<br>
+ *Tok.getIdentifierInfo(), Tok.getLocation(), getCurScope(), nullptr,<br>
+ false, false, nullptr, false, false,<br>
+ isClassTemplateDeductionContext(DSContext));<br>
<br>
// If this is not a typedef name, don't parse it as part of the declspec,<br>
// it must be an implicit int or an error.<br>
<br>
Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Parse/ParseDeclCXX.cpp (original)<br>
+++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Thu Jan 26 14:40:47 2017<br>
@@ -1144,10 +1144,11 @@ TypeResult Parser::ParseBaseTypeSpecifie<br>
<br>
// We have an identifier; check whether it is actually a type.<br>
IdentifierInfo *CorrectedII = nullptr;<br>
- ParsedType Type =<br>
- Actions.getTypeName(*Id, IdLoc, getCurScope(), &SS, true, false, nullptr,<br>
- /*IsCtorOrDtorName=*/false,<br>
- /*NonTrivialTypeSourceInfo=*/true, &CorrectedII);<br>
+ ParsedType Type = Actions.getTypeName(<br>
+ *Id, IdLoc, getCurScope(), &SS, true, false, nullptr,<br>
+ /*IsCtorOrDtorName=*/false,<br>
+ /*NonTrivialTypeSourceInfo=*/true,<br>
+ /*IsClassTemplateDeductionContext*/ false, &CorrectedII);<br>
if (!Type) {<br>
Diag(IdLoc, diag::err_expected_class_name);<br>
return true;<br>
<br>
Modified: cfe/trunk/lib/Parse/ParseExprCXX.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseExprCXX.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseExprCXX.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Parse/ParseExprCXX.cpp (original)<br>
+++ cfe/trunk/lib/Parse/ParseExprCXX.cpp Thu Jan 26 14:40:47 2017<br>
@@ -1639,9 +1639,10 @@ ExprResult Parser::ParseCXXThis() {<br>
/// typename-specifier '(' expression-list[opt] ')'<br>
/// [C++0x] typename-specifier braced-init-list<br>
///<br>
+/// In C++1z onwards, the type specifier can also be a template-name.<br>
ExprResult<br>
Parser::ParseCXXTypeConstructExpression(const DeclSpec &DS) {<br>
- Declarator DeclaratorInfo(DS, Declarator::TypeNameContext);<br>
+ Declarator DeclaratorInfo(DS, Declarator::FunctionalCastContext);<br>
ParsedType TypeRep = Actions.ActOnTypeName(getCurScope(), DeclaratorInfo).get();<br>
<br>
assert((Tok.is(tok::l_paren) ||<br>
<br>
Modified: cfe/trunk/lib/Parse/Parser.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/Parser.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/Parser.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Parse/Parser.cpp (original)<br>
+++ cfe/trunk/lib/Parse/Parser.cpp Thu Jan 26 14:40:47 2017<br>
@@ -1743,7 +1743,8 @@ bool Parser::TryAnnotateTypeOrScopeToken<br>
*Tok.getIdentifierInfo(), Tok.getLocation(), getCurScope(), &SS,<br>
false, NextToken().is(tok::period), nullptr,<br>
/*IsCtorOrDtorName=*/false,<br>
- /*NonTrivialTypeSourceInfo*/ true)) {<br>
+ /*NonTrivialTypeSourceInfo*/ true,<br>
+ /*IsClassTemplateDeductionContext*/GreaterThanIsOperator)) {<br>
SourceLocation BeginLoc = Tok.getLocation();<br>
if (SS.isNotEmpty()) // it was a C++ qualified type name.<br>
BeginLoc = SS.getBeginLoc();<br>
<br>
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Thu Jan 26 14:40:47 2017<br>
@@ -60,6 +60,11 @@ Sema::DeclGroupPtrTy Sema::ConvertDeclTo<br>
return DeclGroupPtrTy::make(DeclGroupRef(Ptr));<br>
}<br>
<br>
+static bool isTypeTemplate(NamedDecl *ND) {<br>
+ return isa<ClassTemplateDecl>(ND) || isa<TypeAliasTemplateDecl>(ND) ||<br>
+ isa<TemplateTemplateParmDecl>(ND);<br>
+}<br>
+<br>
namespace {<br>
<br>
class TypeNameValidatorCCC : public CorrectionCandidateCallback {<br>
@@ -67,7 +72,7 @@ class TypeNameValidatorCCC : public Corr<br>
TypeNameValidatorCCC(bool AllowInvalid, bool WantClass=false,<br>
bool AllowTemplates=false)<br>
: AllowInvalidDecl(AllowInvalid), WantClassName(WantClass),<br>
- AllowClassTemplates(AllowTemplates) {<br>
+ AllowTemplates(AllowTemplates) {<br>
WantExpressionKeywords = false;<br>
WantCXXNamedCasts = false;<br>
WantRemainingKeywords = false;<br>
@@ -76,7 +81,7 @@ class TypeNameValidatorCCC : public Corr<br>
bool ValidateCandidate(const TypoCorrection &candidate) override {<br>
if (NamedDecl *ND = candidate.getCorrectionDecl()) {<br>
bool IsType = isa<TypeDecl>(ND) || isa<ObjCInterfaceDecl>(ND);<br>
- bool AllowedTemplate = AllowClassTemplates && isa<ClassTemplateDecl>(ND);<br>
+ bool AllowedTemplate = AllowTemplates && isTypeTemplate(ND);<br>
return (IsType || AllowedTemplate) &&<br>
(AllowInvalidDecl || !ND->isInvalidDecl());<br>
}<br>
@@ -86,7 +91,7 @@ class TypeNameValidatorCCC : public Corr<br>
private:<br>
bool AllowInvalidDecl;<br>
bool WantClassName;<br>
- bool AllowClassTemplates;<br>
+ bool AllowTemplates;<br>
};<br>
<br>
} // end anonymous namespace<br>
@@ -252,7 +257,13 @@ ParsedType Sema::getTypeName(const Ident<br>
ParsedType ObjectTypePtr,<br>
bool IsCtorOrDtorName,<br>
bool WantNontrivialTypeSourceInfo,<br>
+ bool IsClassTemplateDeductionContext,<br>
IdentifierInfo **CorrectedII) {<br>
+ // FIXME: Consider allowing this outside C++1z mode as an extension.<br>
+ bool AllowDeducedTemplate = IsClassTemplateDeductionContext &&<br>
+ getLangOpts().CPlusPlus1z && !IsCtorOrDtorName &&<br>
+ !isClassName && !HasTrailingDot;<br>
+<br>
// Determine where we will perform name lookup.<br>
DeclContext *LookupCtx = nullptr;<br>
if (ObjectTypePtr) {<br>
@@ -334,10 +345,11 @@ ParsedType Sema::getTypeName(const Ident<br>
case LookupResult::NotFound:<br>
case LookupResult::NotFoundInCurrentInstantiation:<br>
if (CorrectedII) {<br>
- TypoCorrection Correction = CorrectTypo(<br>
- Result.getLookupNameInfo(), Kind, S, SS,<br>
- llvm::make_unique<TypeNameValidatorCCC>(true, isClassName),<br>
- CTK_ErrorRecovery);<br>
+ TypoCorrection Correction =<br>
+ CorrectTypo(Result.getLookupNameInfo(), Kind, S, SS,<br>
+ llvm::make_unique<TypeNameValidatorCCC>(<br>
+ true, isClassName, AllowDeducedTemplate),<br>
+ CTK_ErrorRecovery);<br>
IdentifierInfo *NewII = Correction.getCorrectionAsIdentifierInfo();<br>
TemplateTy Template;<br>
bool MemberOfUnknownSpecialization;<br>
@@ -359,7 +371,8 @@ ParsedType Sema::getTypeName(const Ident<br>
ParsedType Ty = getTypeName(*NewII, NameLoc, S, NewSSPtr,<br>
isClassName, HasTrailingDot, ObjectTypePtr,<br>
IsCtorOrDtorName,<br>
- WantNontrivialTypeSourceInfo);<br>
+ WantNontrivialTypeSourceInfo,<br>
+ IsClassTemplateDeductionContext);<br>
if (Ty) {<br>
diagnoseTypo(Correction,<br>
PDiag(diag::err_unknown_type_or_class_name_suggest)<br>
@@ -391,7 +404,8 @@ ParsedType Sema::getTypeName(const Ident<br>
// Look to see if we have a type anywhere in the list of results.<br>
for (LookupResult::iterator Res = Result.begin(), ResEnd = Result.end();<br>
Res != ResEnd; ++Res) {<br>
- if (isa<TypeDecl>(*Res) || isa<ObjCInterfaceDecl>(*Res)) {<br>
+ if (isa<TypeDecl>(*Res) || isa<ObjCInterfaceDecl>(*Res) ||<br>
+ (AllowDeducedTemplate && isTypeTemplate(*Res))) {<br>
if (!IIDecl ||<br>
(*Res)->getLocation().getRawEncoding() <<br>
IIDecl->getLocation().getRawEncoding())<br>
@@ -440,29 +454,13 @@ ParsedType Sema::getTypeName(const Ident<br>
<br>
T = Context.getTypeDeclType(TD);<br>
MarkAnyDeclReferenced(TD->getLocation(), TD, /*OdrUse=*/false);<br>
-<br>
- // NOTE: avoid constructing an ElaboratedType(Loc) if this is a<br>
- // constructor or destructor name (in such a case, the scope specifier<br>
- // will be attached to the enclosing Expr or Decl node).<br>
- if (SS && SS->isNotEmpty() && !IsCtorOrDtorName) {<br>
- if (WantNontrivialTypeSourceInfo) {<br>
- // Construct a type with type-source information.<br>
- TypeLocBuilder Builder;<br>
- Builder.pushTypeSpec(T).setNameLoc(NameLoc);<br>
-<br>
- T = getElaboratedType(ETK_None, *SS, T);<br>
- ElaboratedTypeLoc ElabTL = Builder.push<ElaboratedTypeLoc>(T);<br>
- ElabTL.setElaboratedKeywordLoc(SourceLocation());<br>
- ElabTL.setQualifierLoc(SS->getWithLocInContext(Context));<br>
- return CreateParsedType(T, Builder.getTypeSourceInfo(Context, T));<br>
- } else {<br>
- T = getElaboratedType(ETK_None, *SS, T);<br>
- }<br>
- }<br>
} else if (ObjCInterfaceDecl *IDecl = dyn_cast<ObjCInterfaceDecl>(IIDecl)) {<br>
(void)DiagnoseUseOfDecl(IDecl, NameLoc);<br>
if (!HasTrailingDot)<br>
T = Context.getObjCInterfaceType(IDecl);<br>
+ } else if (AllowDeducedTemplate && isTypeTemplate(IIDecl)) {<br>
+ T = Context.getDeducedTemplateSpecializationType(<br>
+ TemplateName(cast<TemplateDecl>(IIDecl)), QualType(), false);<br>
}<br>
<br>
if (T.isNull()) {<br>
@@ -470,6 +468,27 @@ ParsedType Sema::getTypeName(const Ident<br>
Result.suppressDiagnostics();<br>
return nullptr;<br>
}<br>
+<br>
+ // NOTE: avoid constructing an ElaboratedType(Loc) if this is a<br>
+ // constructor or destructor name (in such a case, the scope specifier<br>
+ // will be attached to the enclosing Expr or Decl node).<br>
+ if (SS && SS->isNotEmpty() && !IsCtorOrDtorName &&<br>
+ !isa<ObjCInterfaceDecl>(IIDecl)) {<br>
+ if (WantNontrivialTypeSourceInfo) {<br>
+ // Construct a type with type-source information.<br>
+ TypeLocBuilder Builder;<br>
+ Builder.pushTypeSpec(T).setNameLoc(NameLoc);<br>
+<br>
+ T = getElaboratedType(ETK_None, *SS, T);<br>
+ ElaboratedTypeLoc ElabTL = Builder.push<ElaboratedTypeLoc>(T);<br>
+ ElabTL.setElaboratedKeywordLoc(SourceLocation());<br>
+ ElabTL.setQualifierLoc(SS->getWithLocInContext(Context));<br>
+ return CreateParsedType(T, Builder.getTypeSourceInfo(Context, T));<br>
+ } else {<br>
+ T = getElaboratedType(ETK_None, *SS, T);<br>
+ }<br>
+ }<br>
+<br>
return ParsedType::make(T);<br>
}<br>
<br>
@@ -647,6 +666,7 @@ void Sema::DiagnoseUnknownTypeName(Ident<br>
if (Corrected.getCorrectionSpecifier())<br>
tmpSS.MakeTrivial(Context, Corrected.getCorrectionSpecifier(),<br>
SourceRange(IILoc));<br>
+ // FIXME: Support class template argument deduction here.<br>
SuggestedType =<br>
getTypeName(*Corrected.getCorrectionAsIdentifierInfo(), IILoc, S,<br>
tmpSS.isSet() ? &tmpSS : SS, false, false, nullptr,<br>
@@ -9740,6 +9760,14 @@ QualType Sema::deduceVarTypeFromInitiali<br>
<br>
VarDeclOrName VN{VDecl, Name};<br>
<br>
+ DeducedType *Deduced = Type->getContainedDeducedType();<br>
+ assert(Deduced && "deduceVarTypeFromInitializer for non-deduced type");<br>
+<br>
+ if (isa<DeducedTemplateSpecializationType>(Deduced)) {<br>
+ Diag(Init->getLocStart(), diag::err_deduced_class_template_not_supported);<br>
+ return QualType();<br>
+ }<br>
+<br>
ArrayRef<Expr *> DeduceInits = Init;<br>
if (DirectInit) {<br>
if (auto *PL = dyn_cast<ParenListExpr>(Init))<br>
<br>
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Thu Jan 26 14:40:47 2017<br>
@@ -3976,7 +3976,8 @@ static void captureVariablyModifiedType(<br>
T = cast<DecltypeType>(Ty)->desugar();<br>
break;<br>
case Type::Auto:<br>
- T = cast<AutoType>(Ty)->getDeducedType();<br>
+ case Type::DeducedTemplateSpecialization:<br>
+ T = cast<DeducedType>(Ty)->getDeducedType();<br>
break;<br>
case Type::TypeOfExpr:<br>
T = cast<TypeOfExprType>(Ty)->getUnderlyingExpr()->getType();<br>
<br>
Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Thu Jan 26 14:40:47 2017<br>
@@ -1255,9 +1255,19 @@ Sema::BuildCXXTypeConstructExpr(TypeSour<br>
RParenLoc);<br>
}<br>
<br>
+ // C++1z [expr.type.conv]p1:<br>
+ // If the type is a placeholder for a deduced class type, [...perform class<br>
+ // template argument deduction...]<br>
+ DeducedType *Deduced = Ty->getContainedDeducedType();<br>
+ if (Deduced && isa<DeducedTemplateSpecializationType>(Deduced)) {<br>
+ Diag(TyBeginLoc, diag::err_deduced_class_template_not_supported);<br>
+ return ExprError();<br>
+ }<br>
+<br>
bool ListInitialization = LParenLoc.isInvalid();<br>
- assert((!ListInitialization || (Exprs.size() == 1 && isa<InitListExpr>(Exprs[0])))<br>
- && "List initialization must have initializer list as expression.");<br>
+ assert((!ListInitialization ||<br>
+ (Exprs.size() == 1 && isa<InitListExpr>(Exprs[0]))) &&<br>
+ "List initialization must have initializer list as expression.");<br>
SourceRange FullRange = SourceRange(TyBeginLoc,<br>
ListInitialization ? Exprs[0]->getSourceRange().getEnd() : RParenLoc);<br>
<br>
@@ -1646,6 +1656,11 @@ Sema::BuildCXXNew(SourceRange Range, boo<br>
<br>
// C++11 [dcl.spec.auto]p6. Deduce the type which 'auto' stands in for.<br>
if (AllocType->isUndeducedType()) {<br>
+ if (isa<DeducedTemplateSpecializationType>(<br>
+ AllocType->getContainedDeducedType()))<br>
+ return ExprError(Diag(TypeRange.getBegin(),<br>
+ diag::err_deduced_class_template_not_supported));<br>
+<br>
if (initStyle == CXXNewExpr::NoInit || NumInits == 0)<br>
return ExprError(Diag(StartLoc, diag::err_auto_new_requires_ctor_arg)<br>
<< AllocType << TypeRange);<br>
<br>
Modified: cfe/trunk/lib/Sema/SemaLookup.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLookup.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLookup.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaLookup.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaLookup.cpp Thu Jan 26 14:40:47 2017<br>
@@ -2694,6 +2694,7 @@ addAssociatedClassesAndNamespaces(Associ<br>
<br>
// Non-deduced auto types only get here for error cases.<br>
case Type::Auto:<br>
+ case Type::DeducedTemplateSpecialization:<br>
break;<br>
<br>
// If T is an Objective-C object or interface type, or a pointer to an<br>
<br>
Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplate.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplate.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaTemplate.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaTemplate.cpp Thu Jan 26 14:40:47 2017<br>
@@ -4439,6 +4439,11 @@ bool UnnamedLocalNoLinkageFinder::VisitA<br>
return Visit(T->getDeducedType());<br>
}<br>
<br>
+bool UnnamedLocalNoLinkageFinder::VisitDeducedTemplateSpecializationType(<br>
+ const DeducedTemplateSpecializationType *T) {<br>
+ return Visit(T->getDeducedType());<br>
+}<br>
+<br>
bool UnnamedLocalNoLinkageFinder::VisitRecordType(const RecordType* T) {<br>
return VisitTagDecl(T->getDecl());<br>
}<br>
@@ -8786,6 +8791,9 @@ Sema::CheckTypenameType(ElaboratedTypeKe<br>
Context.getTypeDeclType(Type));<br>
}<br>
<br>
+ // FIXME: Form a deduced template specialization type if we get a template<br>
+ // declaration here.<br>
+<br>
DiagID = diag::err_typename_nested_not_type;<br>
Referenced = Result.getFoundDecl();<br>
break;<br>
<br>
Modified: cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp Thu Jan 26 14:40:47 2017<br>
@@ -1723,6 +1723,7 @@ DeduceTemplateArgumentsByTypeMatch(Sema<br>
case Type::Decltype:<br>
case Type::UnaryTransform:<br>
case Type::Auto:<br>
+ case Type::DeducedTemplateSpecialization:<br>
case Type::DependentTemplateSpecialization:<br>
case Type::PackExpansion:<br>
case Type::Pipe:<br>
@@ -5152,8 +5153,9 @@ MarkUsedTemplateParameters(ASTContext &C<br>
break;<br>
<br>
case Type::Auto:<br>
+ case Type::DeducedTemplateSpecialization:<br>
MarkUsedTemplateParameters(Ctx,<br>
- cast<AutoType>(T)->getDeducedType(),<br>
+ cast<DeducedType>(T)->getDeducedType(),<br>
OnlyDeduced, Depth, Used);<br>
<br>
// None of these types have any template parameters in them.<br>
<br>
Modified: cfe/trunk/lib/Sema/SemaType.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaType.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaType.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaType.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaType.cpp Thu Jan 26 14:40:47 2017<br>
@@ -2778,12 +2778,20 @@ static QualType GetDeclSpecTypeForDeclar<br>
distributeTypeAttrsFromDeclarator(state, T);<br>
<br>
// C++11 [dcl.spec.auto]p5: reject 'auto' if it is not in an allowed context.<br>
- if (D.getDeclSpec().containsPlaceholderType()) {<br>
+ if (DeducedType *Deduced = T->getContainedDeducedType()) {<br>
+ AutoType *Auto = dyn_cast<AutoType>(Deduced);<br>
int Error = -1;<br>
<br>
+ // Is this a 'auto' or 'decltype(auto)' type (as opposed to __auto_type or<br>
+ // class template argument deduction)?<br>
+ bool IsCXXAutoType =<br>
+ (Auto && Auto->getKeyword() != AutoTypeKeyword::GNUAutoType);<br>
+<br>
switch (D.getContext()) {<br>
case Declarator::LambdaExprContext:<br>
- llvm_unreachable("Can't specify a type specifier in lambda grammar");<br>
+ // Declared return type of a lambda-declarator is implicit and is always<br>
+ // 'auto'.<br>
+ break;<br>
case Declarator::ObjCParameterContext:<br>
case Declarator::ObjCResultContext:<br>
case Declarator::PrototypeContext:<br>
@@ -2791,8 +2799,8 @@ static QualType GetDeclSpecTypeForDeclar<br>
break;<br>
case Declarator::LambdaExprParameterContext:<br>
// In C++14, generic lambdas allow 'auto' in their parameters.<br>
- if (!(SemaRef.getLangOpts().CPlusPlus14<br>
- && D.getDeclSpec().getTypeSpecType() == DeclSpec::TST_auto))<br>
+ if (!SemaRef.getLangOpts().CPlusPlus14 ||<br>
+ !Auto || Auto->getKeyword() != AutoTypeKeyword::Auto)<br>
Error = 16;<br>
break;<br>
case Declarator::MemberContext: {<br>
@@ -2807,6 +2815,8 @@ static QualType GetDeclSpecTypeForDeclar<br>
case TTK_Class: Error = 5; /* Class member */ break;<br>
case TTK_Interface: Error = 6; /* Interface member */ break;<br>
}<br>
+ if (D.getDeclSpec().isFriendSpecified())<br>
+ Error = 20; // Friend type<br>
break;<br>
}<br>
case Declarator::CXXCatchContext:<br>
@@ -2814,8 +2824,10 @@ static QualType GetDeclSpecTypeForDeclar<br>
Error = 7; // Exception declaration<br>
break;<br>
case Declarator::TemplateParamContext:<br>
- if (!SemaRef.getLangOpts().CPlusPlus1z)<br>
- Error = 8; // Template parameter<br>
+ if (isa<DeducedTemplateSpecializationType>(Deduced))<br>
+ Error = 19; // Template parameter<br>
+ else if (!SemaRef.getLangOpts().CPlusPlus1z)<br>
+ Error = 8; // Template parameter (until C++1z)<br>
break;<br>
case Declarator::BlockLiteralContext:<br>
Error = 9; // Block literal<br>
@@ -2828,15 +2840,17 @@ static QualType GetDeclSpecTypeForDeclar<br>
Error = 12; // Type alias<br>
break;<br>
case Declarator::TrailingReturnContext:<br>
- if (!SemaRef.getLangOpts().CPlusPlus14 ||<br>
- D.getDeclSpec().getTypeSpecType() == DeclSpec::TST_auto_type)<br>
+ if (!SemaRef.getLangOpts().CPlusPlus14 || !IsCXXAutoType)<br>
Error = 13; // Function return type<br>
break;<br>
case Declarator::ConversionIdContext:<br>
- if (!SemaRef.getLangOpts().CPlusPlus14 ||<br>
- D.getDeclSpec().getTypeSpecType() == DeclSpec::TST_auto_type)<br>
+ if (!SemaRef.getLangOpts().CPlusPlus14 || !IsCXXAutoType)<br>
Error = 14; // conversion-type-id<br>
break;<br>
+ case Declarator::FunctionalCastContext:<br>
+ if (isa<DeducedTemplateSpecializationType>(Deduced))<br>
+ break;<br>
+ LLVM_FALLTHROUGH;<br>
case Declarator::TypeNameContext:<br>
Error = 15; // Generic<br>
break;<br>
@@ -2845,9 +2859,14 @@ static QualType GetDeclSpecTypeForDeclar<br>
case Declarator::ForContext:<br>
case Declarator::InitStmtContext:<br>
case Declarator::ConditionContext:<br>
+ // FIXME: P0091R3 (erroneously) does not permit class template argument<br>
+ // deduction in conditions, for-init-statements, and other declarations<br>
+ // that are not simple-declarations.<br>
break;<br>
case Declarator::CXXNewContext:<br>
- if (D.getDeclSpec().getTypeSpecType() == DeclSpec::TST_auto_type)<br>
+ // FIXME: P0091R3 does not permit class template argument deduction here,<br>
+ // but we follow GCC and allow it anyway.<br>
+ if (!IsCXXAutoType && !isa<DeducedTemplateSpecializationType>(Deduced))<br>
Error = 17; // 'new' type<br>
break;<br>
case Declarator::KNRTypeListContext:<br>
@@ -2861,8 +2880,7 @@ static QualType GetDeclSpecTypeForDeclar<br>
// In Objective-C it is an error to use 'auto' on a function declarator<br>
// (and everywhere for '__auto_type').<br>
if (D.isFunctionDeclarator() &&<br>
- (!SemaRef.getLangOpts().CPlusPlus11 ||<br>
- D.getDeclSpec().getTypeSpecType() == DeclSpec::TST_auto_type))<br>
+ (!SemaRef.getLangOpts().CPlusPlus11 || !IsCXXAutoType))<br>
Error = 13;<br>
<br>
bool HaveTrailing = false;<br>
@@ -2872,8 +2890,8 @@ static QualType GetDeclSpecTypeForDeclar<br>
// level. Check all declarator chunks (outermost first) anyway, to give<br>
// better diagnostics.<br>
// We don't support '__auto_type' with trailing return types.<br>
- if (SemaRef.getLangOpts().CPlusPlus11 &&<br>
- D.getDeclSpec().getTypeSpecType() != DeclSpec::TST_auto_type) {<br>
+ // FIXME: Should we only do this for 'auto' and not 'decltype(auto)'?<br>
+ if (SemaRef.getLangOpts().CPlusPlus11 && IsCXXAutoType) {<br>
for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {<br>
unsigned chunkIndex = e - i - 1;<br>
state.setCurrentChunkIndex(chunkIndex);<br>
@@ -2894,15 +2912,28 @@ static QualType GetDeclSpecTypeForDeclar<br>
AutoRange = D.getName().getSourceRange();<br>
<br>
if (Error != -1) {<br>
- unsigned Keyword;<br>
- switch (D.getDeclSpec().getTypeSpecType()) {<br>
- case DeclSpec::TST_auto: Keyword = 0; break;<br>
- case DeclSpec::TST_decltype_auto: Keyword = 1; break;<br>
- case DeclSpec::TST_auto_type: Keyword = 2; break;<br>
- default: llvm_unreachable("unknown auto TypeSpecType");<br>
+ unsigned Kind;<br>
+ if (Auto) {<br>
+ switch (Auto->getKeyword()) {<br>
+ case AutoTypeKeyword::Auto: Kind = 0; break;<br>
+ case AutoTypeKeyword::DecltypeAuto: Kind = 1; break;<br>
+ case AutoTypeKeyword::GNUAutoType: Kind = 2; break;<br>
+ }<br>
+ } else {<br>
+ assert(isa<DeducedTemplateSpecializationType>(Deduced) &&<br>
+ "unknown auto type");<br>
+ Kind = 3;<br>
}<br>
+<br>
+ auto *DTST = dyn_cast<DeducedTemplateSpecializationType>(Deduced);<br>
+ TemplateName TN = DTST ? DTST->getTemplateName() : TemplateName();<br>
+<br>
SemaRef.Diag(AutoRange.getBegin(), diag::err_auto_not_allowed)<br>
- << Keyword << Error << AutoRange;<br>
+ << Kind << Error << (int)SemaRef.getTemplateNameKindForDiagnostics(TN)<br>
+ << QualType(Deduced, 0) << AutoRange;<br>
+ if (auto *TD = TN.getAsTemplateDecl())<br>
+ SemaRef.Diag(TD->getLocation(), diag::note_template_decl_here);<br>
+<br>
T = SemaRef.Context.IntTy;<br>
D.setInvalidType(true);<br>
} else if (!HaveTrailing) {<br>
@@ -2942,6 +2973,7 @@ static QualType GetDeclSpecTypeForDeclar<br>
DiagID = diag::err_type_defined_in_alias_template;<br>
break;<br>
case Declarator::TypeNameContext:<br>
+ case Declarator::FunctionalCastContext:<br>
case Declarator::ConversionIdContext:<br>
case Declarator::TemplateParamContext:<br>
case Declarator::CXXNewContext:<br>
@@ -3623,17 +3655,32 @@ static TypeSourceInfo *GetFullTypeForDec<br>
<br>
// If T is 'decltype(auto)', the only declarators we can have are parens<br>
// and at most one function declarator if this is a function declaration.<br>
- if (const AutoType *AT = T->getAs<AutoType>()) {<br>
- if (AT->isDecltypeAuto()) {<br>
+ // If T is a deduced class template specialization type, we can have no<br>
+ // declarator chunks at all.<br>
+ if (auto *DT = T->getAs<DeducedType>()) {<br>
+ const AutoType *AT = T->getAs<AutoType>();<br>
+ bool IsClassTemplateDeduction = isa<DeducedTemplateSpecializationType>(DT);<br>
+ if ((AT && AT->isDecltypeAuto()) || IsClassTemplateDeduction) {<br>
for (unsigned I = 0, E = D.getNumTypeObjects(); I != E; ++I) {<br>
unsigned Index = E - I - 1;<br>
DeclaratorChunk &DeclChunk = D.getTypeObject(Index);<br>
- unsigned DiagId = diag::err_decltype_auto_compound_type;<br>
+ unsigned DiagId = IsClassTemplateDeduction<br>
+ ? diag::err_deduced_class_template_compound_type<br>
+ : diag::err_decltype_auto_compound_type;<br>
unsigned DiagKind = 0;<br>
switch (DeclChunk.Kind) {<br>
case DeclaratorChunk::Paren:<br>
+ // FIXME: Rejecting this is a little silly.<br>
+ if (IsClassTemplateDeduction) {<br>
+ DiagKind = 4;<br>
+ break;<br>
+ }<br>
continue;<br>
case DeclaratorChunk::Function: {<br>
+ if (IsClassTemplateDeduction) {<br>
+ DiagKind = 3;<br>
+ break;<br>
+ }<br>
unsigned FnIndex;<br>
if (D.isFunctionDeclarationContext() &&<br>
D.isFunctionDeclarator(FnIndex) && FnIndex == Index)<br>
@@ -3834,6 +3881,7 @@ static TypeSourceInfo *GetFullTypeForDec<br>
case Declarator::TemplateParamContext:<br>
case Declarator::TemplateTypeArgContext:<br>
case Declarator::TypeNameContext:<br>
+ case Declarator::FunctionalCastContext:<br>
// Don't infer in these contexts.<br>
break;<br>
}<br>
@@ -4713,6 +4761,7 @@ static TypeSourceInfo *GetFullTypeForDec<br>
case Declarator::ObjCParameterContext: // FIXME: special diagnostic here?<br>
case Declarator::ObjCResultContext: // FIXME: special diagnostic here?<br>
case Declarator::TypeNameContext:<br>
+ case Declarator::FunctionalCastContext:<br>
case Declarator::CXXNewContext:<br>
case Declarator::AliasDeclContext:<br>
case Declarator::AliasTemplateContext:<br>
<br>
Modified: cfe/trunk/lib/Sema/TreeTransform.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/TreeTransform.h?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/TreeTransform.h?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Sema/TreeTransform.h (original)<br>
+++ cfe/trunk/lib/Sema/TreeTransform.h Thu Jan 26 14:40:47 2017<br>
@@ -876,6 +876,14 @@ public:<br>
/*IsDependent*/ false);<br>
}<br>
<br>
+ /// By default, builds a new DeducedTemplateSpecializationType with the given<br>
+ /// deduced type.<br>
+ QualType RebuildDeducedTemplateSpecializationType(TemplateName Template,<br>
+ QualType Deduced) {<br>
+ return SemaRef.Context.getDeducedTemplateSpecializationType(<br>
+ Template, Deduced, /*IsDependent*/ false);<br>
+ }<br>
+<br>
/// \brief Build a new template specialization type.<br>
///<br>
/// By default, performs semantic analysis when building the template<br>
@@ -5344,6 +5352,37 @@ QualType TreeTransform<Derived>::Transfo<br>
<br>
return Result;<br>
}<br>
+<br>
+template<typename Derived><br>
+QualType TreeTransform<Derived>::TransformDeducedTemplateSpecializationType(<br>
+ TypeLocBuilder &TLB, DeducedTemplateSpecializationTypeLoc TL) {<br>
+ const DeducedTemplateSpecializationType *T = TL.getTypePtr();<br>
+<br>
+ CXXScopeSpec SS;<br>
+ TemplateName TemplateName = getDerived().TransformTemplateName(<br>
+ SS, T->getTemplateName(), TL.getTemplateNameLoc());<br>
+ if (TemplateName.isNull())<br>
+ return QualType();<br>
+<br>
+ QualType OldDeduced = T->getDeducedType();<br>
+ QualType NewDeduced;<br>
+ if (!OldDeduced.isNull()) {<br>
+ NewDeduced = getDerived().TransformType(OldDeduced);<br>
+ if (NewDeduced.isNull())<br>
+ return QualType();<br>
+ }<br>
+<br>
+ QualType Result = getDerived().RebuildDeducedTemplateSpecializationType(<br>
+ TemplateName, NewDeduced);<br>
+ if (Result.isNull())<br>
+ return QualType();<br>
+<br>
+ DeducedTemplateSpecializationTypeLoc NewTL =<br>
+ TLB.push<DeducedTemplateSpecializationTypeLoc>(Result);<br>
+ NewTL.setTemplateNameLoc(TL.getTemplateNameLoc());<br>
+<br>
+ return Result;<br>
+}<br>
<br>
template<typename Derived><br>
QualType TreeTransform<Derived>::TransformRecordType(TypeLocBuilder &TLB,<br>
<br>
Modified: cfe/trunk/lib/Serialization/ASTReader.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)<br>
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Thu Jan 26 14:40:47 2017<br>
@@ -5651,6 +5651,14 @@ QualType ASTReader::readTypeRecord(unsig<br>
return Context.getAutoType(Deduced, Keyword, IsDependent);<br>
}<br>
<br>
+ case TYPE_DEDUCED_TEMPLATE_SPECIALIZATION: {<br>
+ TemplateName Name = ReadTemplateName(*Loc.F, Record, Idx);<br>
+ QualType Deduced = readType(*Loc.F, Record, Idx);<br>
+ bool IsDependent = Deduced.isNull() ? Record[Idx++] : false;<br>
+ return Context.getDeducedTemplateSpecializationType(Name, Deduced,<br>
+ IsDependent);<br>
+ }<br>
+<br>
case TYPE_RECORD: {<br>
if (Record.size() != 2) {<br>
Error("incorrect encoding of record type");<br>
@@ -6082,6 +6090,11 @@ void TypeLocReader::VisitAutoTypeLoc(Aut<br>
TL.setNameLoc(ReadSourceLocation());<br>
}<br>
<br>
+void TypeLocReader::VisitDeducedTemplateSpecializationTypeLoc(<br>
+ DeducedTemplateSpecializationTypeLoc TL) {<br>
+ TL.setTemplateNameLoc(ReadSourceLocation());<br>
+}<br>
+<br>
void TypeLocReader::VisitRecordTypeLoc(RecordTypeLoc TL) {<br>
TL.setNameLoc(ReadSourceLocation());<br>
}<br>
<br>
Modified: cfe/trunk/lib/Serialization/ASTWriter.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriter.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriter.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Serialization/ASTWriter.cpp (original)<br>
+++ cfe/trunk/lib/Serialization/ASTWriter.cpp Thu Jan 26 14:40:47 2017<br>
@@ -349,6 +349,15 @@ void ASTTypeWriter::VisitAutoType(const<br>
Code = TYPE_AUTO;<br>
}<br>
<br>
+void ASTTypeWriter::VisitDeducedTemplateSpecializationType(<br>
+ const DeducedTemplateSpecializationType *T) {<br>
+ Record.AddTemplateName(T->getTemplateName());<br>
+ Record.AddTypeRef(T->getDeducedType());<br>
+ if (T->getDeducedType().isNull())<br>
+ Record.push_back(T->isDependentType());<br>
+ Code = TYPE_DEDUCED_TEMPLATE_SPECIALIZATION;<br>
+}<br>
+<br>
void ASTTypeWriter::VisitTagType(const TagType *T) {<br>
Record.push_back(T->isDependentType());<br>
Record.AddDeclRef(T->getDecl()->getCanonicalDecl());<br>
@@ -683,6 +692,11 @@ void TypeLocWriter::VisitAutoTypeLoc(Aut<br>
Record.AddSourceLocation(TL.getNameLoc());<br>
}<br>
<br>
+void TypeLocWriter::VisitDeducedTemplateSpecializationTypeLoc(<br>
+ DeducedTemplateSpecializationTypeLoc TL) {<br>
+ Record.AddSourceLocation(TL.getTemplateNameLoc());<br>
+}<br>
+<br>
void TypeLocWriter::VisitRecordTypeLoc(RecordTypeLoc TL) {<br>
Record.AddSourceLocation(TL.getNameLoc());<br>
}<br>
<br>
Modified: cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p5.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p5.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p5.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p5.cpp (original)<br>
+++ cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p5.cpp Thu Jan 26 14:40:47 2017<br>
@@ -9,7 +9,7 @@ struct S {<br>
<br>
void f() throw (auto); // expected-error{{'auto' not allowed here}}<br>
<br>
- friend auto; // expected-error{{'auto' not allowed in non-static struct member}}<br>
+ friend auto; // expected-error{{'auto' not allowed in friend declaration}}<br>
<br>
operator auto(); // expected-error{{'auto' not allowed in conversion function type}}<br>
};<br>
<br>
Modified: cfe/trunk/test/CXX/drs/dr5xx.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/drs/dr5xx.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/drs/dr5xx.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CXX/drs/dr5xx.cpp (original)<br>
+++ cfe/trunk/test/CXX/drs/dr5xx.cpp Thu Jan 26 14:40:47 2017<br>
@@ -877,13 +877,25 @@ namespace dr583 { // dr583: 4<br>
namespace dr585 { // dr585: yes<br>
template<typename> struct T;<br>
struct A {<br>
- friend T; // expected-error {{requires a type specifier}} expected-error {{can only be classes or functions}}<br>
+ friend T;<br>
+#if __cplusplus <= 201402L<br>
+ // expected-error@-2 {{requires a type specifier}} expected-error@-2 {{can only be classes or functions}}<br>
+#else<br>
+ // expected-error@-4 {{use of class template 'T' requires template arguments; argument deduction not allowed in friend declaration}}<br>
+ // expected-note@-7 {{here}}<br>
+#endif<br>
// FIXME: It's not clear whether the standard allows this or what it means,<br>
// but the DR585 writeup suggests it as an alternative.<br>
template<typename U> friend T<U>; // expected-error {{must use an elaborated type}}<br>
};<br>
template<template<typename> class T> struct B {<br>
- friend T; // expected-error {{requires a type specifier}} expected-error {{can only be classes or functions}}<br>
+ friend T;<br>
+#if __cplusplus <= 201402L<br>
+ // expected-error@-2 {{requires a type specifier}} expected-error@-2 {{can only be classes or functions}}<br>
+#else<br>
+ // expected-error@-4 {{use of template template parameter 'T' requires template arguments; argument deduction not allowed in friend declaration}}<br>
+ // expected-note@-6 {{here}}<br>
+#endif<br>
template<typename U> friend T<U>; // expected-error {{must use an elaborated type}}<br>
};<br>
}<br>
<br>
Modified: cfe/trunk/test/Parser/backtrack-off-by-one.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/backtrack-off-by-one.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/backtrack-off-by-one.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Parser/backtrack-off-by-one.cpp (original)<br>
+++ cfe/trunk/test/Parser/backtrack-off-by-one.cpp Thu Jan 26 14:40:47 2017<br>
@@ -1,6 +1,7 @@<br>
// RUN: %clang_cc1 -verify %s<br>
// RUN: %clang_cc1 -verify %s -std=c++98<br>
// RUN: %clang_cc1 -verify %s -std=c++11<br>
+// RUN: %clang_cc1 -verify %s -std=c++1z<br>
<br>
// PR25946<br>
// We had an off-by-one error in an assertion when annotating A<int> below. Our<br>
@@ -13,9 +14,13 @@ template <typename T> class A {};<br>
// expected-error@+1 {{expected '{' after base class list}}<br>
template <typename T> class B : T // not ',' or '{'<br>
#if __cplusplus < 201103L<br>
-// expected-error@+4 {{expected ';' after top level declarator}}<br>
+// expected-error@+8 {{expected ';' after top level declarator}}<br>
+#endif<br>
+#if __cplusplus <= 201402L<br>
+// expected-error@+5 {{C++ requires a type specifier for all declarations}}<br>
+#else<br>
+// expected-error@+3 {{expected unqualified-id}}<br>
#endif<br>
-// expected-error@+2 {{C++ requires a type specifier for all declarations}}<br>
// expected-error@+1 {{expected ';' after class}}<br>
A<int> {<br>
};<br>
<br>
Added: cfe/trunk/test/Parser/cxx1z-class-template-argument-deduction.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/cxx1z-class-template-argument-deduction.cpp?rev=293207&view=auto" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/cxx1z-class-template-argument-deduction.cpp?rev=293207&view=auto</a><br>
==============================================================================<br>
--- cfe/trunk/test/Parser/cxx1z-class-template-argument-deduction.cpp (added)<br>
+++ cfe/trunk/test/Parser/cxx1z-class-template-argument-deduction.cpp Thu Jan 26 14:40:47 2017<br>
@@ -0,0 +1,131 @@<br>
+// RUN: %clang_cc1 -std=c++1z -fcxx-exceptions -verify %s<br>
+<br>
+template<typename T> struct A {}; // expected-note 31{{declared here}}<br>
+<br>
+// Make sure we still correctly parse cases where a template can appear without arguments.<br>
+namespace template_template_arg {<br>
+ template<template<typename> typename> struct X {};<br>
+ template<typename> struct Y {};<br>
+<br>
+ X<A> xa;<br>
+ Y<A> ya; // expected-error {{requires template arguments}}<br>
+ X<::A> xcca;<br>
+ Y<::A> ycca; // expected-error {{requires template arguments}}<br>
+<br>
+ template<template<typename> typename = A> struct XD {};<br>
+ template<typename = A> struct YD {}; // expected-error {{requires template arguments}}<br>
+ template<template<typename> typename = ::A> struct XCCD {};<br>
+ template<typename = ::A> struct YCCD {}; // expected-error {{requires template arguments}}<br>
+<br>
+ // FIXME: replacing the invalid type with 'int' here is horrible<br>
+ template <A a = A<int>()> class C { }; // expected-error {{requires template arguments}} expected-error {{not implicitly convertible to 'int'}}<br>
+ template<typename T = A> struct G { }; // expected-error {{requires template arguments}}<br>
+}<br>
+<br>
+namespace injected_class_name {<br>
+ template<typename T> struct A {<br>
+ A(T);<br>
+ void f(int) {<br>
+ A a = 1;<br>
+ injected_class_name::A b = 1; // expected-error {{not yet supported}}<br>
+ }<br>
+ void f(T);<br>
+ };<br>
+ A<short> ai = 1;<br>
+ A<double>::A b(1); // expected-error {{constructor name}}<br>
+}<br>
+<br>
+struct member {<br>
+ A a; // expected-error {{requires template arguments}}<br>
+ A *b; // expected-error {{requires template arguments}}<br>
+ const A c; // expected-error {{requires template arguments}}<br>
+<br>
+ void f() throw (A); // expected-error {{requires template arguments}}<br>
+<br>
+ friend A; // expected-error {{requires template arguments; argument deduction not allowed in friend declaration}}<br>
+<br>
+ operator A(); // expected-error {{requires template arguments; argument deduction not allowed in conversion function type}}<br>
+<br>
+ static A x; // expected-error {{requires an initializer}}<br>
+ static A y = 0; // expected-error {{not yet supported}}<br>
+};<br>
+<br>
+namespace in_typedef {<br>
+ typedef A *AutoPtr; // expected-error {{requires template arguments; argument deduction not allowed in typedef}}<br>
+ typedef A (*PFun)(int a); // expected-error{{requires template arguments; argument deduction not allowed in typedef}}<br>
+ typedef A Fun(int a) -> decltype(a + a); // expected-error{{requires template arguments; argument deduction not allowed in function return type}}<br>
+}<br>
+<br>
+namespace stmt {<br>
+ void g(A a) { // expected-error{{requires template arguments; argument deduction not allowed in function prototype}}<br>
+ try { }<br>
+ catch (A &a) { } // expected-error{{requires template arguments; argument deduction not allowed in exception declaration}}<br>
+ catch (const A a) { } // expected-error{{requires template arguments; argument deduction not allowed in exception declaration}}<br>
+ try { } catch (A a) { } // expected-error{{requires template arguments; argument deduction not allowed in exception declaration}}<br>
+<br>
+ // FIXME: The standard only permits class template argument deduction in a<br>
+ // simple-declaration or cast. We also permit it in conditions,<br>
+ // for-range-declarations, member-declarations for static data members, and<br>
+ // new-expressions, because not doing so would be bizarre.<br>
+ A local = 0; // expected-error {{not yet supported}}<br>
+ static A local_static = 0; // expected-error {{not yet supported}}<br>
+ static thread_local A thread_local_static = 0; // expected-error {{not yet supported}}<br>
+ if (A a = 0) {} // expected-error {{not yet supported}}<br>
+ if (A a = 0; a) {} // expected-error {{not yet supported}}<br>
+ switch (A a = 0) {} // expected-error {{not yet supported}}<br>
+ switch (A a = 0; a) {} // expected-error {{not yet supported}}<br>
+ for (A a = 0; a; /**/) {} // expected-error {{not yet supported}}<br>
+ for (/**/; A a = 0; /**/) {} // expected-error {{not yet supported}}<br>
+ while (A a = 0) {} // expected-error {{not yet supported}}<br>
+ int arr[3];<br>
+ for (A a : arr) {} // expected-error {{not yet supported}}<br>
+ }<br>
+<br>
+ namespace std {<br>
+ class type_info;<br>
+ }<br>
+}<br>
+<br>
+namespace expr {<br>
+ template<typename T> struct U {};<br>
+ void j() {<br>
+ (void)typeid(A); // expected-error{{requires template arguments; argument deduction not allowed here}}<br>
+ (void)sizeof(A); // expected-error{{requires template arguments; argument deduction not allowed here}}<br>
+ (void)__alignof(A); // expected-error{{requires template arguments; argument deduction not allowed here}}<br>
+<br>
+ U<A> v; // expected-error {{requires template arguments}}<br>
+<br>
+ int n;<br>
+ (void)dynamic_cast<A&>(n); // expected-error{{requires template arguments; argument deduction not allowed here}}<br>
+ (void)static_cast<A*>(&n); // expected-error{{requires template arguments; argument deduction not allowed here}}<br>
+ (void)reinterpret_cast<A*>(&n); // expected-error{{requires template arguments; argument deduction not allowed here}}<br>
+ (void)const_cast<A>(n); // expected-error{{requires template arguments; argument deduction not allowed here}}<br>
+ (void)*(A*)(&n); // expected-error{{requires template arguments; argument deduction not allowed here}}<br>
+<br>
+ (void)A(n); // expected-error {{not yet supported}}<br>
+ (void)A{n}; // expected-error {{not yet supported}}<br>
+ (void)new A(n); // expected-error {{not yet supported}}<br>
+ (void)new A{n}; // expected-error {{not yet supported}}<br>
+ // FIXME: We should diagnose the lack of an initializer here.<br>
+ (void)new A; // expected-error {{not yet supported}}<br>
+ }<br>
+}<br>
+<br>
+namespace decl {<br>
+ enum E : A {}; // expected-error{{requires template arguments; argument deduction not allowed here}}<br>
+ struct F : A {}; // expected-error{{expected class name}}<br>
+<br>
+ using B = A; // expected-error{{requires template arguments}}<br>
+<br>
+ auto k() -> A; // expected-error{{requires template arguments}}<br>
+<br>
+ A a; // expected-error {{requires an initializer}}<br>
+ A b = 0; // expected-error {{not yet supported}}<br>
+ A (parens) = 0; // expected-error {{cannot use parentheses when declaring variable with deduced class template specialization type}}<br>
+ A *p = 0; // expected-error {{cannot form pointer to deduced class template specialization type}}<br>
+ A &r = *p; // expected-error {{cannot form reference to deduced class template specialization type}}<br>
+ A arr[3] = 0; // expected-error {{cannot form array of deduced class template specialization type}}<br>
+ A F::*pm = 0; // expected-error {{cannot form pointer to deduced class template specialization type}}<br>
+ A (*fp)() = 0; // expected-error {{cannot form function returning deduced class template specialization type}}<br>
+ A [x, y] = 0; // expected-error {{cannot be declared with type 'A'}} expected-error {{not yet supported}}<br>
+}<br>
<br>
Modified: cfe/trunk/test/SemaTemplate/temp_arg.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/temp_arg.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/temp_arg.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/SemaTemplate/temp_arg.cpp (original)<br>
+++ cfe/trunk/test/SemaTemplate/temp_arg.cpp Thu Jan 26 14:40:47 2017<br>
@@ -10,7 +10,7 @@ A<int, 0, X> * a1;<br>
<br>
A<float, 1, X, double> *a2; // expected-error{{too many template arguments for class template 'A'}}<br>
A<float, 1> *a3; // expected-error{{too few template arguments for class template 'A'}}<br>
-A a3; // expected-error{{use of class template 'A' requires template arguments}}<br>
+A a4; // expected-error{{use of class template 'A' requires template arguments}}<br>
<br>
namespace test0 {<br>
template <class t> class foo {};<br>
<br>
Modified: cfe/trunk/test/SemaTemplate/typename-specifier-3.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/typename-specifier-3.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/typename-specifier-3.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/SemaTemplate/typename-specifier-3.cpp (original)<br>
+++ cfe/trunk/test/SemaTemplate/typename-specifier-3.cpp Thu Jan 26 14:40:47 2017<br>
@@ -1,7 +1,7 @@<br>
// RUN: %clang_cc1 -fsyntax-only -verify %s<br>
<br>
// PR4364<br>
-template<class T> struct a {<br>
+template<class T> struct a { // expected-note {{here}}<br>
T b() {<br>
return typename T::x();<br>
}<br>
@@ -17,3 +17,4 @@ B c() {<br>
// Some extra tests for invalid cases<br>
template<class T> struct test2 { T b() { return typename T::a; } }; // expected-error{{expected '(' for function-style cast or type construction}}<br>
template<class T> struct test3 { T b() { return typename a; } }; // expected-error{{expected a qualified name after 'typename'}}<br>
+template<class T> struct test4 { T b() { return typename ::a; } }; // expected-error{{refers to non-type member}} expected-error{{expected '(' for function-style cast or type construction}}<br>
<br>
Modified: cfe/trunk/tools/libclang/CIndex.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/tools/libclang/CIndex.cpp (original)<br>
+++ cfe/trunk/tools/libclang/CIndex.cpp Thu Jan 26 14:40:47 2017<br>
@@ -1640,6 +1640,15 @@ bool CursorVisitor::VisitAdjustedTypeLoc<br>
return Visit(TL.getOriginalLoc());<br>
}<br>
<br>
+bool CursorVisitor::VisitDeducedTemplateSpecializationTypeLoc(<br>
+ DeducedTemplateSpecializationTypeLoc TL) {<br>
+ if (VisitTemplateName(TL.getTypePtr()->getTemplateName(),<br>
+ TL.getTemplateNameLoc()))<br>
+ return true;<br>
+<br>
+ return false;<br>
+}<br>
+<br>
bool CursorVisitor::VisitTemplateSpecializationTypeLoc(<br>
TemplateSpecializationTypeLoc TL) {<br>
// Visit the template name.<br>
<br>
Modified: cfe/trunk/tools/libclang/CXType.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CXType.cpp?rev=293207&r1=293206&r2=293207&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CXType.cpp?rev=293207&r1=293206&r2=293207&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/tools/libclang/CXType.cpp (original)<br>
+++ cfe/trunk/tools/libclang/CXType.cpp Thu Jan 26 14:40:47 2017<br>
@@ -452,7 +452,8 @@ try_again:<br>
break;<br>
<br>
case Type::Auto:<br>
- TP = cast<AutoType>(TP)->getDeducedType().getTypePtrOrNull();<br>
+ case Type::DeducedTemplateSpecialization:<br>
+ TP = cast<DeducedType>(TP)->getDeducedType().getTypePtrOrNull();<br>
if (TP)<br>
goto try_again;<br>
break;<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>