summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-05-27 18:47:56 +0000
committerdim <dim@FreeBSD.org>2015-05-27 18:47:56 +0000
commit3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65 (patch)
treedbbd4047878da71c1a706e26ce05b4e7791b14cc /include/clang/Basic
parent38d6f2e7f2ce51a5b3836d26596c6c34a3288752 (diff)
downloadFreeBSD-src-3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65.zip
FreeBSD-src-3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65.tar.gz
Vendor import of clang trunk r238337:
https://llvm.org/svn/llvm-project/cfe/trunk@238337
Diffstat (limited to 'include/clang/Basic')
-rw-r--r--include/clang/Basic/ABI.h9
-rw-r--r--include/clang/Basic/Attr.td104
-rw-r--r--include/clang/Basic/AttrDocs.td37
-rw-r--r--include/clang/Basic/Builtins.def35
-rw-r--r--include/clang/Basic/Builtins.h6
-rw-r--r--include/clang/Basic/BuiltinsARM.def2
-rw-r--r--include/clang/Basic/BuiltinsPPC.def79
-rw-r--r--include/clang/Basic/BuiltinsSystemZ.def252
-rw-r--r--include/clang/Basic/BuiltinsX86.def280
-rw-r--r--include/clang/Basic/DeclNodes.td1
-rw-r--r--include/clang/Basic/Diagnostic.h21
-rw-r--r--include/clang/Basic/DiagnosticASTKinds.td8
-rw-r--r--include/clang/Basic/DiagnosticCommentKinds.td2
-rw-r--r--include/clang/Basic/DiagnosticCommonKinds.td15
-rw-r--r--include/clang/Basic/DiagnosticDriverKinds.td15
-rw-r--r--include/clang/Basic/DiagnosticFrontendKinds.td10
-rw-r--r--include/clang/Basic/DiagnosticGroups.td18
-rw-r--r--include/clang/Basic/DiagnosticIDs.h2
-rw-r--r--include/clang/Basic/DiagnosticLexKinds.td15
-rw-r--r--include/clang/Basic/DiagnosticOptions.h2
-rw-r--r--include/clang/Basic/DiagnosticParseKinds.td30
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td344
-rw-r--r--include/clang/Basic/DiagnosticSerializationKinds.td5
-rw-r--r--include/clang/Basic/FileManager.h10
-rw-r--r--include/clang/Basic/IdentifierTable.h40
-rw-r--r--include/clang/Basic/LLVM.h2
-rw-r--r--include/clang/Basic/LangOptions.def11
-rw-r--r--include/clang/Basic/LangOptions.h20
-rw-r--r--include/clang/Basic/Linkage.h4
-rw-r--r--include/clang/Basic/Module.h102
-rw-r--r--include/clang/Basic/PlistSupport.h23
-rw-r--r--include/clang/Basic/SanitizerBlacklist.h3
-rw-r--r--include/clang/Basic/Sanitizers.def33
-rw-r--r--include/clang/Basic/Sanitizers.h53
-rw-r--r--include/clang/Basic/SourceManager.h36
-rw-r--r--include/clang/Basic/SourceManagerInternals.h5
-rw-r--r--include/clang/Basic/Specifiers.h7
-rw-r--r--include/clang/Basic/TargetBuiltins.h10
-rw-r--r--include/clang/Basic/TargetInfo.h16
-rw-r--r--include/clang/Basic/TokenKinds.def35
-rw-r--r--include/clang/Basic/VersionTuple.h54
41 files changed, 1367 insertions, 389 deletions
diff --git a/include/clang/Basic/ABI.h b/include/clang/Basic/ABI.h
index bd24679..75e9faf 100644
--- a/include/clang/Basic/ABI.h
+++ b/include/clang/Basic/ABI.h
@@ -17,14 +17,17 @@
#define LLVM_CLANG_BASIC_ABI_H
#include "llvm/Support/DataTypes.h"
+#include <cstring>
namespace clang {
/// \brief C++ constructor types.
enum CXXCtorType {
- Ctor_Complete, ///< Complete object ctor
- Ctor_Base, ///< Base object ctor
- Ctor_Comdat ///< The COMDAT used for ctors
+ Ctor_Complete, ///< Complete object ctor
+ Ctor_Base, ///< Base object ctor
+ Ctor_Comdat, ///< The COMDAT used for ctors
+ Ctor_CopyingClosure, ///< Copying closure variant of a ctor
+ Ctor_DefaultClosure, ///< Default closure variant of a ctor
};
/// \brief C++ destructor types.
diff --git a/include/clang/Basic/Attr.td b/include/clang/Basic/Attr.td
index 3ed7f8d..c310d25 100644
--- a/include/clang/Basic/Attr.td
+++ b/include/clang/Basic/Attr.td
@@ -144,6 +144,7 @@ class TypeArgument<string name, bit opt = 0> : Argument<name, opt>;
class UnsignedArgument<string name, bit opt = 0> : Argument<name, opt>;
class VariadicUnsignedArgument<string name> : Argument<name, 1>;
class VariadicExprArgument<string name> : Argument<name, 1>;
+class VariadicStringArgument<string name> : Argument<name, 1>;
// A version of the form major.minor[.subminor].
class VersionArgument<string name, bit opt = 0> : Argument<name, opt>;
@@ -224,12 +225,14 @@ class SubjectList<list<AttrSubject> subjects, SubjectDiag diag = WarnDiag,
string CustomDiag = customDiag;
}
-class LangOpt<string name> {
+class LangOpt<string name, bit negated = 0> {
string Name = name;
+ bit Negated = negated;
}
def MicrosoftExt : LangOpt<"MicrosoftExt">;
def Borland : LangOpt<"Borland">;
def CUDA : LangOpt<"CUDA">;
+def COnly : LangOpt<"CPlusPlus", 1>;
// Defines targets for target-specific attributes. The list of strings should
// specify architectures for which the target applies, based off the ArchType
@@ -343,6 +346,8 @@ def AddressSpace : TypeAttr {
def Alias : Attr {
let Spellings = [GCC<"alias">];
let Args = [StringArgument<"Aliasee">];
+ let Subjects = SubjectList<[Function, GlobalVar], ErrorDiag,
+ "ExpectedFunctionGlobalVarMethodOrProperty">;
let Documentation = [Undocumented];
}
@@ -436,8 +441,11 @@ def Availability : InheritableAttr {
let AdditionalMembers =
[{static llvm::StringRef getPrettyPlatformName(llvm::StringRef Platform) {
return llvm::StringSwitch<llvm::StringRef>(Platform)
+ .Case("android", "Android")
.Case("ios", "iOS")
.Case("macosx", "OS X")
+ .Case("ios_app_extension", "iOS (App Extension)")
+ .Case("macosx_app_extension", "OS X (App Extension)")
.Default(llvm::StringRef());
} }];
let HasCustomParsing = 1;
@@ -574,7 +582,7 @@ def CUDAInvalidTarget : InheritableAttr {
def CUDALaunchBounds : InheritableAttr {
let Spellings = [GNU<"launch_bounds">];
- let Args = [IntArgument<"MaxThreads">, DefaultIntArgument<"MinBlocks", 0>];
+ let Args = [ExprArgument<"MaxThreads">, ExprArgument<"MinBlocks", 1>];
let LangOpts = [CUDA];
let Subjects = SubjectList<[ObjCMethod, FunctionLike], WarnDiag,
"ExpectedFunctionOrMethod">;
@@ -707,6 +715,25 @@ def MinSize : InheritableAttr {
let Documentation = [Undocumented];
}
+def FlagEnum : InheritableAttr {
+ let Spellings = [GNU<"flag_enum">];
+ let Subjects = SubjectList<[Enum]>;
+ let Documentation = [FlagEnumDocs];
+ let LangOpts = [COnly];
+ let AdditionalMembers = [{
+private:
+ llvm::APInt FlagBits;
+public:
+ llvm::APInt &getFlagBits() {
+ return FlagBits;
+ }
+
+ const llvm::APInt &getFlagBits() const {
+ return FlagBits;
+ }
+}];
+}
+
def Flatten : InheritableAttr {
let Spellings = [GCC<"flatten">];
let Subjects = SubjectList<[Function], ErrorDiag>;
@@ -767,9 +794,9 @@ def IBOutletCollection : InheritableAttr {
let Documentation = [Undocumented];
}
-def Malloc : InheritableAttr {
- let Spellings = [GCC<"malloc">];
-// let Subjects = [Function];
+def Restrict : InheritableAttr {
+ let Spellings = [Declspec<"restrict">, GCC<"malloc">];
+ let Subjects = SubjectList<[Function]>;
let Documentation = [Undocumented];
}
@@ -958,7 +985,8 @@ def NoThrow : InheritableAttr {
def ObjCBridge : InheritableAttr {
let Spellings = [GNU<"objc_bridge">];
- let Subjects = SubjectList<[Record], ErrorDiag>;
+ let Subjects = SubjectList<[Record, TypedefName], ErrorDiag,
+ "ExpectedStructOrUnionOrTypedef">;
let Args = [IdentifierArgument<"BridgedType">];
let Documentation = [Undocumented];
}
@@ -1031,6 +1059,11 @@ def ObjCNSObject : InheritableAttr {
let Documentation = [Undocumented];
}
+def ObjCIndependentClass : InheritableAttr {
+ let Spellings = [GNU<"objc_independent_class">];
+ let Documentation = [Undocumented];
+}
+
def ObjCPreciseLifetime : InheritableAttr {
let Spellings = [GNU<"objc_precise_lifetime">];
let Subjects = SubjectList<[Var], ErrorDiag>;
@@ -1118,12 +1151,6 @@ def Packed : InheritableAttr {
let Documentation = [Undocumented];
}
-def PnaclCall : InheritableAttr {
- let Spellings = [GNU<"pnaclcall">];
-// let Subjects = [Function, ObjCMethod];
- let Documentation = [Undocumented];
-}
-
def IntelOclBicc : InheritableAttr {
let Spellings = [GNU<"intel_ocl_bicc">];
// let Subjects = [Function, ObjCMethod];
@@ -1360,26 +1387,35 @@ def X86ForceAlignArgPointer : InheritableAttr, TargetSpecificAttr<TargetX86> {
let Documentation = [Undocumented];
}
-// Attribute to disable AddressSanitizer (or equivalent) checks.
-def NoSanitizeAddress : InheritableAttr {
- let Spellings = [GCC<"no_address_safety_analysis">,
- GCC<"no_sanitize_address">];
- let Subjects = SubjectList<[Function], ErrorDiag>;
- let Documentation = [NoSanitizeAddressDocs];
-}
-
-// Attribute to disable ThreadSanitizer checks.
-def NoSanitizeThread : InheritableAttr {
- let Spellings = [GNU<"no_sanitize_thread">];
- let Subjects = SubjectList<[Function], ErrorDiag>;
- let Documentation = [NoSanitizeThreadDocs];
+def NoSanitize : InheritableAttr {
+ let Spellings = [GNU<"no_sanitize">, CXX11<"clang", "no_sanitize">];
+ let Args = [VariadicStringArgument<"Sanitizers">];
+ let Subjects = SubjectList<[Function, ObjCMethod], ErrorDiag>;
+ let Documentation = [NoSanitizeDocs];
+ let AdditionalMembers = [{
+ SanitizerMask getMask() const {
+ SanitizerMask Mask = 0;
+ for (auto SanitizerName : sanitizers()) {
+ SanitizerMask ParsedMask =
+ parseSanitizerValue(SanitizerName, /*AllowGroups=*/true);
+ Mask |= expandSanitizerGroups(ParsedMask);
+ }
+ return Mask;
+ }
+ }];
}
-// Attribute to disable MemorySanitizer checks.
-def NoSanitizeMemory : InheritableAttr {
- let Spellings = [GNU<"no_sanitize_memory">];
+// Attributes to disable a specific sanitizer. No new sanitizers should be added
+// to this list; the no_sanitize attribute should be extended instead.
+def NoSanitizeSpecific : InheritableAttr {
+ let Spellings = [GCC<"no_address_safety_analysis">,
+ GCC<"no_sanitize_address">,
+ GCC<"no_sanitize_thread">,
+ GNU<"no_sanitize_memory">];
let Subjects = SubjectList<[Function], ErrorDiag>;
- let Documentation = [NoSanitizeMemoryDocs];
+ let Documentation = [NoSanitizeAddressDocs, NoSanitizeThreadDocs,
+ NoSanitizeMemoryDocs];
+ let ASTNode = 0;
}
// C/C++ Thread safety attributes (e.g. for deadlock, data race checking)
@@ -1743,11 +1779,17 @@ def TypeTagForDatatype : InheritableAttr {
// Microsoft-related attributes
-def MsProperty : IgnoredAttr {
+def MSNoVTable : InheritableAttr {
+ let Spellings = [Declspec<"novtable">];
+ let Subjects = SubjectList<[CXXRecord]>;
+ let Documentation = [MSNoVTableDocs];
+}
+
+def : IgnoredAttr {
let Spellings = [Declspec<"property">];
}
-def MsStruct : InheritableAttr {
+def MSStruct : InheritableAttr {
let Spellings = [GCC<"ms_struct">];
let Subjects = SubjectList<[Record]>;
let Documentation = [Undocumented];
diff --git a/include/clang/Basic/AttrDocs.td b/include/clang/Basic/AttrDocs.td
index 530c6e7..9314c44 100644
--- a/include/clang/Basic/AttrDocs.td
+++ b/include/clang/Basic/AttrDocs.td
@@ -920,6 +920,22 @@ This attribute accepts a single parameter that must be one of the following:
}];
}
+def NoSanitizeDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+Use the ``no_sanitize`` attribute on a function declaration to specify
+that a particular instrumentation or set of instrumentations should not be
+applied to that function. The attribute takes a list of string literals,
+which have the same meaning as values accepted by the ``-fno-sanitize=``
+flag. For example, ``__attribute__((no_sanitize("address", "thread")))``
+specifies that AddressSanitizer and ThreadSanitizer should not be applied
+to the function.
+
+See :ref:`Controlling Code Generation <controlling-code-generation>` for a
+full list of supported sanitizer flags.
+ }];
+}
+
def NoSanitizeAddressDocs : Documentation {
let Category = DocCatFunction;
// This function has multiple distinct spellings, and so it requires a custom
@@ -936,6 +952,7 @@ not be applied to that function.
def NoSanitizeThreadDocs : Documentation {
let Category = DocCatFunction;
+ let Heading = "no_sanitize_thread";
let Content = [{
.. _langext-thread_sanitizer:
@@ -948,6 +965,7 @@ tool to avoid false positives and provide meaningful stack traces.
def NoSanitizeMemoryDocs : Documentation {
let Category = DocCatFunction;
+ let Heading = "no_sanitize_memory";
let Content = [{
.. _langext-memory_sanitizer:
@@ -1196,6 +1214,16 @@ behavior of the program is undefined.
}];
}
+def FlagEnumDocs : Documentation {
+ let Category = DocCatType;
+ let Content = [{
+This attribute can be added to an enumerator to signal to the compiler that it
+is intended to be used as a flag type. This will cause the compiler to assume
+that the range of the type includes all of the values that you can get by
+manipulating bits of the enumerator when issuing warnings.
+ }];
+}
+
def MSInheritanceDocs : Documentation {
let Category = DocCatType;
let Heading = "__single_inhertiance, __multiple_inheritance, __virtual_inheritance";
@@ -1243,6 +1271,15 @@ an error:
}];
}
+def MSNoVTableDocs : Documentation {
+ let Category = DocCatType;
+ let Content = [{
+This attribute can be added to a class declaration or definition to signal to
+the compiler that constructors and destructors will not reference the virtual
+function table.
+ }];
+}
+
def OptnoneDocs : Documentation {
let Category = DocCatFunction;
let Content = [{
diff --git a/include/clang/Basic/Builtins.def b/include/clang/Basic/Builtins.def
index 098f5da..1927907 100644
--- a/include/clang/Basic/Builtins.def
+++ b/include/clang/Basic/Builtins.def
@@ -56,7 +56,8 @@
// I -> Required to constant fold to an integer constant expression.
//
// Types may be postfixed with the following modifiers:
-// * -> pointer (optionally followed by an address space number)
+// * -> pointer (optionally followed by an address space number, if no address
+// space is specified than any address space will be accepted)
// & -> reference (optionally followed by an address space number)
// C -> const
// D -> volatile
@@ -692,19 +693,29 @@ BUILTIN(__builtin_index, "c*cC*i", "Fn")
BUILTIN(__builtin_rindex, "c*cC*i", "Fn")
// Microsoft builtins. These are only active with -fms-extensions.
-LANGBUILTIN(_alloca, "v*z", "n", ALL_MS_LANGUAGES)
-LANGBUILTIN(__assume, "vb", "n", ALL_MS_LANGUAGES)
-LANGBUILTIN(__noop, "i.", "n", ALL_MS_LANGUAGES)
-LANGBUILTIN(__debugbreak, "v", "n", ALL_MS_LANGUAGES)
-LANGBUILTIN(__va_start, "vc**.", "nt", ALL_MS_LANGUAGES)
+LANGBUILTIN(_alloca, "v*z", "n", ALL_MS_LANGUAGES)
+LANGBUILTIN(__assume, "vb", "n", ALL_MS_LANGUAGES)
+LANGBUILTIN(__debugbreak, "v", "n", ALL_MS_LANGUAGES)
+LANGBUILTIN(__exception_code, "ULi", "n", ALL_MS_LANGUAGES)
+LANGBUILTIN(_exception_code, "ULi", "n", ALL_MS_LANGUAGES)
+LANGBUILTIN(__exception_info, "v*", "n", ALL_MS_LANGUAGES)
+LANGBUILTIN(_exception_info, "v*", "n", ALL_MS_LANGUAGES)
+LANGBUILTIN(__abnormal_termination, "i", "n", ALL_MS_LANGUAGES)
+LANGBUILTIN(_abnormal_termination, "i", "n", ALL_MS_LANGUAGES)
+LANGBUILTIN(__GetExceptionInfo, "v*.", "ntu", ALL_MS_LANGUAGES)
LANGBUILTIN(_InterlockedCompareExchange, "LiLiD*LiLi", "n", ALL_MS_LANGUAGES)
LANGBUILTIN(_InterlockedCompareExchangePointer, "v*v*D*v*v*", "n", ALL_MS_LANGUAGES)
-LANGBUILTIN(_InterlockedIncrement, "LiLiD*", "n", ALL_MS_LANGUAGES)
-LANGBUILTIN(_InterlockedDecrement, "LiLiD*", "n", ALL_MS_LANGUAGES)
-LANGBUILTIN(_InterlockedExchangeAdd, "LiLiD*Li", "n", ALL_MS_LANGUAGES)
-LANGBUILTIN(_InterlockedExchangePointer, "v*v*D*v*", "n", ALL_MS_LANGUAGES)
-LANGBUILTIN(_InterlockedExchange, "LiLiD*Li", "n", ALL_MS_LANGUAGES)
-LANGBUILTIN(__readfsdword, "ULiULi", "n", ALL_MS_LANGUAGES)
+LANGBUILTIN(_InterlockedDecrement, "LiLiD*", "n", ALL_MS_LANGUAGES)
+LANGBUILTIN(_InterlockedExchangeAdd, "LiLiD*Li", "n", ALL_MS_LANGUAGES)
+LANGBUILTIN(_InterlockedExchange, "LiLiD*Li", "n", ALL_MS_LANGUAGES)
+LANGBUILTIN(_InterlockedExchangePointer, "v*v*D*v*", "n", ALL_MS_LANGUAGES)
+LANGBUILTIN(_InterlockedIncrement, "LiLiD*", "n", ALL_MS_LANGUAGES)
+LANGBUILTIN(__noop, "i.", "n", ALL_MS_LANGUAGES)
+LANGBUILTIN(__readfsdword, "ULiULi", "n", ALL_MS_LANGUAGES)
+LANGBUILTIN(__va_start, "vc**.", "nt", ALL_MS_LANGUAGES)
+
+// Microsoft library builtins.
+LIBBUILTIN(_setjmpex, "iJ", "fj", "setjmpex.h", ALL_MS_LANGUAGES)
// C99 library functions
// C99 stdlib.h
diff --git a/include/clang/Basic/Builtins.h b/include/clang/Basic/Builtins.h
index 3ce2255..27428ad 100644
--- a/include/clang/Basic/Builtins.h
+++ b/include/clang/Basic/Builtins.h
@@ -143,6 +143,12 @@ public:
return strchr(GetRecord(ID).Attributes, 't') != nullptr;
}
+ /// \brief Determines whether this builtin has a result or any arguments which
+ /// are pointer types.
+ bool hasPtrArgsOrResult(unsigned ID) const {
+ return strchr(GetRecord(ID).Type, '*') != nullptr;
+ }
+
/// \brief Completely forget that the given ID was ever considered a builtin,
/// e.g., because the user provided a conflicting signature.
void ForgetBuiltin(unsigned ID, IdentifierTable &Table);
diff --git a/include/clang/Basic/BuiltinsARM.def b/include/clang/Basic/BuiltinsARM.def
index 9091ad4..98d5ab7 100644
--- a/include/clang/Basic/BuiltinsARM.def
+++ b/include/clang/Basic/BuiltinsARM.def
@@ -96,7 +96,7 @@ LANGBUILTIN(__sevl, "v", "", ALL_MS_LANGUAGES)
LANGBUILTIN(__dmb, "vUi", "nc", ALL_MS_LANGUAGES)
LANGBUILTIN(__dsb, "vUi", "nc", ALL_MS_LANGUAGES)
LANGBUILTIN(__isb, "vUi", "nc", ALL_MS_LANGUAGES)
-LANGBUILTIN(__ldrexd, "WiCDWi*", "", ALL_MS_LANGUAGES)
+LANGBUILTIN(__ldrexd, "WiWiCD*", "", ALL_MS_LANGUAGES)
LANGBUILTIN(_MoveFromCoprocessor, "UiUiUiUiUiUi", "", ALL_MS_LANGUAGES)
LANGBUILTIN(_MoveFromCoprocessor2, "UiUiUiUiUiUi", "", ALL_MS_LANGUAGES)
LANGBUILTIN(_MoveToCoprocessor, "vUiUiUiUiUiUi", "", ALL_MS_LANGUAGES)
diff --git a/include/clang/Basic/BuiltinsPPC.def b/include/clang/Basic/BuiltinsPPC.def
index e42af42..57ae63e 100644
--- a/include/clang/Basic/BuiltinsPPC.def
+++ b/include/clang/Basic/BuiltinsPPC.def
@@ -26,6 +26,9 @@ BUILTIN(__builtin_altivec_vaddshs, "V8SsV8SsV8Ss", "")
BUILTIN(__builtin_altivec_vadduhs, "V8UsV8UsV8Us", "")
BUILTIN(__builtin_altivec_vaddsws, "V4SiV4SiV4Si", "")
BUILTIN(__builtin_altivec_vadduws, "V4UiV4UiV4Ui", "")
+BUILTIN(__builtin_altivec_vaddeuqm, "V1ULLLiV1ULLLiV1ULLLiV1ULLLi","")
+BUILTIN(__builtin_altivec_vaddcuq, "V1ULLLiV1ULLLiV1ULLLi","")
+BUILTIN(__builtin_altivec_vaddecuq, "V1ULLLiV1ULLLiV1ULLLiV1ULLLi","")
BUILTIN(__builtin_altivec_vsubsbs, "V16ScV16ScV16Sc", "")
BUILTIN(__builtin_altivec_vsububs, "V16UcV16UcV16Uc", "")
@@ -33,6 +36,9 @@ BUILTIN(__builtin_altivec_vsubshs, "V8SsV8SsV8Ss", "")
BUILTIN(__builtin_altivec_vsubuhs, "V8UsV8UsV8Us", "")
BUILTIN(__builtin_altivec_vsubsws, "V4SiV4SiV4Si", "")
BUILTIN(__builtin_altivec_vsubuws, "V4UiV4UiV4Ui", "")
+BUILTIN(__builtin_altivec_vsubeuqm, "V1ULLLiV1ULLLiV1ULLLiV1ULLLi","")
+BUILTIN(__builtin_altivec_vsubcuq, "V1ULLLiV1ULLLiV1ULLLi","")
+BUILTIN(__builtin_altivec_vsubecuq, "V1ULLLiV1ULLLiV1ULLLiV1ULLLi","")
BUILTIN(__builtin_altivec_vavgsb, "V16ScV16ScV16Sc", "")
BUILTIN(__builtin_altivec_vavgub, "V16UcV16UcV16Uc", "")
@@ -85,10 +91,14 @@ BUILTIN(__builtin_altivec_vmuleub, "V8UsV16UcV16Uc", "")
BUILTIN(__builtin_altivec_vmulesb, "V8SsV16ScV16Sc", "")
BUILTIN(__builtin_altivec_vmuleuh, "V4UiV8UsV8Us", "")
BUILTIN(__builtin_altivec_vmulesh, "V4SiV8SsV8Ss", "")
+BUILTIN(__builtin_altivec_vmuleuw, "V2ULLiV4UiV4Ui", "")
+BUILTIN(__builtin_altivec_vmulesw, "V2SLLiV4SiV4Si", "")
BUILTIN(__builtin_altivec_vmuloub, "V8UsV16UcV16Uc", "")
BUILTIN(__builtin_altivec_vmulosb, "V8SsV16ScV16Sc", "")
BUILTIN(__builtin_altivec_vmulouh, "V4UiV8UsV8Us", "")
BUILTIN(__builtin_altivec_vmulosh, "V4SiV8SsV8Ss", "")
+BUILTIN(__builtin_altivec_vmulouw, "V2ULLiV4UiV4Ui", "")
+BUILTIN(__builtin_altivec_vmulosw, "V2SLLiV4SiV4Si", "")
BUILTIN(__builtin_altivec_vnmsubfp, "V4fV4fV4fV4f", "")
@@ -99,6 +109,10 @@ BUILTIN(__builtin_altivec_vpkuwus, "V8UsV4UiV4Ui", "")
BUILTIN(__builtin_altivec_vpkswss, "V8SsV4SiV4Si", "")
BUILTIN(__builtin_altivec_vpkshus, "V16UcV8SsV8Ss", "")
BUILTIN(__builtin_altivec_vpkswus, "V8UsV4SiV4Si", "")
+BUILTIN(__builtin_altivec_vpksdss, "V4SiV2SLLiV2SLLi", "")
+BUILTIN(__builtin_altivec_vpksdus, "V4UiV2SLLiV2SLLi", "")
+BUILTIN(__builtin_altivec_vpkudus, "V4UiV2ULLiV2ULLi", "")
+BUILTIN(__builtin_altivec_vpkudum, "V4UiV2ULLiV2ULLi", "")
BUILTIN(__builtin_altivec_vperm_4si, "V4iV4iV4iV16Uc", "")
@@ -115,6 +129,7 @@ BUILTIN(__builtin_altivec_vcmpgefp, "V4iV4fV4f", "")
BUILTIN(__builtin_altivec_vcmpequb, "V16cV16cV16c", "")
BUILTIN(__builtin_altivec_vcmpequh, "V8sV8sV8s", "")
BUILTIN(__builtin_altivec_vcmpequw, "V4iV4iV4i", "")
+BUILTIN(__builtin_altivec_vcmpequd, "V2LLiV2LLiV2LLi", "")
BUILTIN(__builtin_altivec_vcmpeqfp, "V4iV4fV4f", "")
BUILTIN(__builtin_altivec_vcmpgtsb, "V16cV16ScV16Sc", "")
@@ -123,6 +138,8 @@ BUILTIN(__builtin_altivec_vcmpgtsh, "V8sV8SsV8Ss", "")
BUILTIN(__builtin_altivec_vcmpgtuh, "V8sV8UsV8Us", "")
BUILTIN(__builtin_altivec_vcmpgtsw, "V4iV4SiV4Si", "")
BUILTIN(__builtin_altivec_vcmpgtuw, "V4iV4UiV4Ui", "")
+BUILTIN(__builtin_altivec_vcmpgtsd, "V2LLiV2LLiV2LLi", "")
+BUILTIN(__builtin_altivec_vcmpgtud, "V2LLiV2ULLiV2ULLi", "")
BUILTIN(__builtin_altivec_vcmpgtfp, "V4iV4fV4f", "")
BUILTIN(__builtin_altivec_vmaxsb, "V16ScV16ScV16Sc", "")
@@ -131,6 +148,8 @@ BUILTIN(__builtin_altivec_vmaxsh, "V8SsV8SsV8Ss", "")
BUILTIN(__builtin_altivec_vmaxuh, "V8UsV8UsV8Us", "")
BUILTIN(__builtin_altivec_vmaxsw, "V4SiV4SiV4Si", "")
BUILTIN(__builtin_altivec_vmaxuw, "V4UiV4UiV4Ui", "")
+BUILTIN(__builtin_altivec_vmaxsd, "V2LLiV2LLiV2LLi", "")
+BUILTIN(__builtin_altivec_vmaxud, "V2ULLiV2ULLiV2ULLi", "")
BUILTIN(__builtin_altivec_vmaxfp, "V4fV4fV4f", "")
BUILTIN(__builtin_altivec_mfvscr, "V8Us", "")
@@ -141,6 +160,8 @@ BUILTIN(__builtin_altivec_vminsh, "V8SsV8SsV8Ss", "")
BUILTIN(__builtin_altivec_vminuh, "V8UsV8UsV8Us", "")
BUILTIN(__builtin_altivec_vminsw, "V4SiV4SiV4Si", "")
BUILTIN(__builtin_altivec_vminuw, "V4UiV4UiV4Ui", "")
+BUILTIN(__builtin_altivec_vminsd, "V2LLiV2LLiV2LLi", "")
+BUILTIN(__builtin_altivec_vminud, "V2ULLiV2ULLiV2ULLi", "")
BUILTIN(__builtin_altivec_vminfp, "V4fV4fV4f", "")
BUILTIN(__builtin_altivec_mtvscr, "vV4i", "")
@@ -150,6 +171,7 @@ BUILTIN(__builtin_altivec_vrefp, "V4fV4f", "")
BUILTIN(__builtin_altivec_vrlb, "V16cV16cV16Uc", "")
BUILTIN(__builtin_altivec_vrlh, "V8sV8sV8Us", "")
BUILTIN(__builtin_altivec_vrlw, "V4iV4iV4Ui", "")
+BUILTIN(__builtin_altivec_vrld, "V2LLiV2LLiV2ULLi", "")
BUILTIN(__builtin_altivec_vsel_4si, "V4iV4iV4iV4Ui", "")
@@ -182,10 +204,12 @@ BUILTIN(__builtin_altivec_vrfiz, "V4fV4f", "")
BUILTIN(__builtin_altivec_vupkhsb, "V8sV16c", "")
BUILTIN(__builtin_altivec_vupkhpx, "V4UiV8s", "")
BUILTIN(__builtin_altivec_vupkhsh, "V4iV8s", "")
+BUILTIN(__builtin_altivec_vupkhsw, "V2LLiV4i", "")
BUILTIN(__builtin_altivec_vupklsb, "V8sV16c", "")
BUILTIN(__builtin_altivec_vupklpx, "V4UiV8s", "")
BUILTIN(__builtin_altivec_vupklsh, "V4iV8s", "")
+BUILTIN(__builtin_altivec_vupklsw, "V2LLiV4i", "")
BUILTIN(__builtin_altivec_vcmpbfp_p, "iiV4fV4f", "")
@@ -194,6 +218,7 @@ BUILTIN(__builtin_altivec_vcmpgefp_p, "iiV4fV4f", "")
BUILTIN(__builtin_altivec_vcmpequb_p, "iiV16cV16c", "")
BUILTIN(__builtin_altivec_vcmpequh_p, "iiV8sV8s", "")
BUILTIN(__builtin_altivec_vcmpequw_p, "iiV4iV4i", "")
+BUILTIN(__builtin_altivec_vcmpequd_p, "iiV2LLiV2LLi", "")
BUILTIN(__builtin_altivec_vcmpeqfp_p, "iiV4fV4f", "")
BUILTIN(__builtin_altivec_vcmpgtsb_p, "iiV16ScV16Sc", "")
@@ -202,8 +227,24 @@ BUILTIN(__builtin_altivec_vcmpgtsh_p, "iiV8SsV8Ss", "")
BUILTIN(__builtin_altivec_vcmpgtuh_p, "iiV8UsV8Us", "")
BUILTIN(__builtin_altivec_vcmpgtsw_p, "iiV4SiV4Si", "")
BUILTIN(__builtin_altivec_vcmpgtuw_p, "iiV4UiV4Ui", "")
+BUILTIN(__builtin_altivec_vcmpgtsd_p, "iiV2LLiV2LLi", "")
+BUILTIN(__builtin_altivec_vcmpgtud_p, "iiV2ULLiV2ULLi", "")
BUILTIN(__builtin_altivec_vcmpgtfp_p, "iiV4fV4f", "")
+// P8 Crypto built-ins.
+BUILTIN(__builtin_altivec_crypto_vsbox, "V2ULLiV2ULLi", "")
+BUILTIN(__builtin_altivec_crypto_vpermxor, "V16UcV16UcV16UcV16Uc", "")
+BUILTIN(__builtin_altivec_crypto_vshasigmaw, "V4UiV4UiIiIi", "")
+BUILTIN(__builtin_altivec_crypto_vshasigmad, "V2ULLiV2ULLiIiIi", "")
+BUILTIN(__builtin_altivec_crypto_vcipher, "V2ULLiV2ULLiV2ULLi", "")
+BUILTIN(__builtin_altivec_crypto_vcipherlast, "V2ULLiV2ULLiV2ULLi", "")
+BUILTIN(__builtin_altivec_crypto_vncipher, "V2ULLiV2ULLiV2ULLi", "")
+BUILTIN(__builtin_altivec_crypto_vncipherlast, "V2ULLiV2ULLiV2ULLi", "")
+BUILTIN(__builtin_altivec_crypto_vpmsumb, "V16UcV16UcV16Uc", "")
+BUILTIN(__builtin_altivec_crypto_vpmsumh, "V8UsV8UsV8Us", "")
+BUILTIN(__builtin_altivec_crypto_vpmsumw, "V4UiV4UiV4Ui", "")
+BUILTIN(__builtin_altivec_crypto_vpmsumd, "V2ULLiV2ULLiV2ULLi", "")
+
// VSX built-ins.
BUILTIN(__builtin_vsx_lxvd2x, "V2divC*", "")
@@ -223,6 +264,44 @@ BUILTIN(__builtin_vsx_xsmindp, "ddd", "")
BUILTIN(__builtin_vsx_xvdivdp, "V2dV2dV2d", "")
BUILTIN(__builtin_vsx_xvdivsp, "V4fV4fV4f", "")
+// HTM builtins
+BUILTIN(__builtin_tbegin, "UiUIi", "")
+BUILTIN(__builtin_tend, "UiUIi", "")
+
+BUILTIN(__builtin_tabort, "UiUi", "")
+BUILTIN(__builtin_tabortdc, "UiUiUiUi", "")
+BUILTIN(__builtin_tabortdci, "UiUiUii", "")
+BUILTIN(__builtin_tabortwc, "UiUiUiUi", "")
+BUILTIN(__builtin_tabortwci, "UiUiUii", "")
+
+BUILTIN(__builtin_tcheck, "Ui", "")
+BUILTIN(__builtin_treclaim, "UiUi", "")
+BUILTIN(__builtin_trechkpt, "Ui", "")
+BUILTIN(__builtin_tsr, "UiUi", "")
+
+BUILTIN(__builtin_tendall, "Ui", "")
+BUILTIN(__builtin_tresume, "Ui", "")
+BUILTIN(__builtin_tsuspend, "Ui", "")
+
+BUILTIN(__builtin_get_texasr, "LUi", "c")
+BUILTIN(__builtin_get_texasru, "LUi", "c")
+BUILTIN(__builtin_get_tfhar, "LUi", "c")
+BUILTIN(__builtin_get_tfiar, "LUi", "c")
+
+BUILTIN(__builtin_set_texasr, "vLUi", "c")
+BUILTIN(__builtin_set_texasru, "vLUi", "c")
+BUILTIN(__builtin_set_tfhar, "vLUi", "c")
+BUILTIN(__builtin_set_tfiar, "vLUi", "c")
+
+BUILTIN(__builtin_ttest, "LUi", "")
+
+// Scalar built-ins
+BUILTIN(__builtin_divwe, "SiSiSi", "")
+BUILTIN(__builtin_divweu, "UiUiUi", "")
+BUILTIN(__builtin_divde, "SLLiSLLiSLLi", "")
+BUILTIN(__builtin_divdeu, "ULLiULLiULLi", "")
+BUILTIN(__builtin_bpermd, "SLLiSLLiSLLi", "")
+
// FIXME: Obviously incomplete.
#undef BUILTIN
diff --git a/include/clang/Basic/BuiltinsSystemZ.def b/include/clang/Basic/BuiltinsSystemZ.def
new file mode 100644
index 0000000..68d5a1c
--- /dev/null
+++ b/include/clang/Basic/BuiltinsSystemZ.def
@@ -0,0 +1,252 @@
+//===-- BuiltinsSystemZ.def - SystemZ Builtin function database -*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines the SystemZ-specific builtin function database. Users of
+// this file must define the BUILTIN macro to make use of this information.
+//
+//===----------------------------------------------------------------------===//
+
+// The format of this database matches clang/Basic/Builtins.def.
+
+// Transactional-memory intrinsics
+BUILTIN(__builtin_tbegin, "iv*", "j")
+BUILTIN(__builtin_tbegin_nofloat, "iv*", "j")
+BUILTIN(__builtin_tbeginc, "v", "nj")
+BUILTIN(__builtin_tabort, "vi", "r")
+BUILTIN(__builtin_tend, "i", "n")
+BUILTIN(__builtin_tx_nesting_depth, "i", "nc")
+BUILTIN(__builtin_tx_assist, "vi", "n")
+BUILTIN(__builtin_non_tx_store, "vULi*ULi", "")
+
+// Vector intrinsics.
+// These all map directly to z instructions, except that some variants ending
+// in "s" have a final "int *" that receives the post-instruction CC value.
+
+// Vector support instructions (chapter 21 of the PoP)
+BUILTIN(__builtin_s390_lcbb, "UivC*Ii", "nc")
+BUILTIN(__builtin_s390_vlbb, "V16ScvC*Ii", "")
+BUILTIN(__builtin_s390_vll, "V16ScUivC*", "")
+BUILTIN(__builtin_s390_vstl, "vV16ScUiv*", "")
+BUILTIN(__builtin_s390_vperm, "V16UcV16UcV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vpdi, "V2ULLiV2ULLiV2ULLiIi", "nc")
+BUILTIN(__builtin_s390_vpksh, "V16ScV8SsV8Ss", "nc")
+BUILTIN(__builtin_s390_vpkshs, "V16ScV8SsV8Ssi*", "nc")
+BUILTIN(__builtin_s390_vpksf, "V8SsV4SiV4Si", "nc")
+BUILTIN(__builtin_s390_vpksfs, "V8SsV4SiV4Sii*", "nc")
+BUILTIN(__builtin_s390_vpksg, "V4SiV2SLLiV2SLLi", "nc")
+BUILTIN(__builtin_s390_vpksgs, "V4SiV2SLLiV2SLLii*", "nc")
+BUILTIN(__builtin_s390_vpklsh, "V16UcV8UsV8Us", "nc")
+BUILTIN(__builtin_s390_vpklshs, "V16UcV8UsV8Usi*", "nc")
+BUILTIN(__builtin_s390_vpklsf, "V8UsV4UiV4Ui", "nc")
+BUILTIN(__builtin_s390_vpklsfs, "V8UsV4UiV4Uii*", "nc")
+BUILTIN(__builtin_s390_vpklsg, "V4UiV2ULLiV2ULLi", "nc")
+BUILTIN(__builtin_s390_vpklsgs, "V4UiV2ULLiV2ULLii*", "nc")
+BUILTIN(__builtin_s390_vuphb, "V8SsV16Sc", "nc")
+BUILTIN(__builtin_s390_vuphh, "V4SiV8Ss", "nc")
+BUILTIN(__builtin_s390_vuphf, "V2SLLiV4Si", "nc")
+BUILTIN(__builtin_s390_vuplb, "V8SsV16Sc", "nc")
+BUILTIN(__builtin_s390_vuplhw, "V4SiV8Ss", "nc")
+BUILTIN(__builtin_s390_vuplf, "V2SLLiV4Si", "nc")
+BUILTIN(__builtin_s390_vuplhb, "V8UsV16Uc", "nc")
+BUILTIN(__builtin_s390_vuplhh, "V4UiV8Us", "nc")
+BUILTIN(__builtin_s390_vuplhf, "V2ULLiV4Ui", "nc")
+BUILTIN(__builtin_s390_vupllb, "V8UsV16Uc", "nc")
+BUILTIN(__builtin_s390_vupllh, "V4UiV8Us", "nc")
+BUILTIN(__builtin_s390_vupllf, "V2ULLiV4Ui", "nc")
+
+// Vector integer instructions (chapter 22 of the PoP)
+BUILTIN(__builtin_s390_vaq, "V16UcV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vacq, "V16UcV16UcV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vaccb, "V16UcV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vacch, "V8UsV8UsV8Us", "nc")
+BUILTIN(__builtin_s390_vaccf, "V4UiV4UiV4Ui", "nc")
+BUILTIN(__builtin_s390_vaccg, "V2ULLiV2ULLiV2ULLi", "nc")
+BUILTIN(__builtin_s390_vaccq, "V16UcV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vacccq, "V16UcV16UcV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vavgb, "V16ScV16ScV16Sc", "nc")
+BUILTIN(__builtin_s390_vavgh, "V8SsV8SsV8Ss", "nc")
+BUILTIN(__builtin_s390_vavgf, "V4SiV4SiV4Si", "nc")
+BUILTIN(__builtin_s390_vavgg, "V2SLLiV2SLLiV2SLLi", "nc")
+BUILTIN(__builtin_s390_vavglb, "V16UcV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vavglh, "V8UsV8UsV8Us", "nc")
+BUILTIN(__builtin_s390_vavglf, "V4UiV4UiV4Ui", "nc")
+BUILTIN(__builtin_s390_vavglg, "V2ULLiV2ULLiV2ULLi", "nc")
+BUILTIN(__builtin_s390_vceqbs, "V16ScV16ScV16Sci*", "nc")
+BUILTIN(__builtin_s390_vceqhs, "V8SsV8SsV8Ssi*", "nc")
+BUILTIN(__builtin_s390_vceqfs, "V4SiV4SiV4Sii*", "nc")
+BUILTIN(__builtin_s390_vceqgs, "V2SLLiV2SLLiV2SLLii*", "nc")
+BUILTIN(__builtin_s390_vchbs, "V16ScV16ScV16Sci*", "nc")
+BUILTIN(__builtin_s390_vchhs, "V8SsV8SsV8Ssi*", "nc")
+BUILTIN(__builtin_s390_vchfs, "V4SiV4SiV4Sii*", "nc")
+BUILTIN(__builtin_s390_vchgs, "V2SLLiV2SLLiV2SLLii*", "nc")
+BUILTIN(__builtin_s390_vchlbs, "V16ScV16UcV16Uci*", "nc")
+BUILTIN(__builtin_s390_vchlhs, "V8SsV8UsV8Usi*", "nc")
+BUILTIN(__builtin_s390_vchlfs, "V4SiV4UiV4Uii*", "nc")
+BUILTIN(__builtin_s390_vchlgs, "V2SLLiV2ULLiV2ULLii*", "nc")
+BUILTIN(__builtin_s390_vcksm, "V4UiV4UiV4Ui", "nc")
+BUILTIN(__builtin_s390_vclzb, "V16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vclzh, "V8UsV8Us", "nc")
+BUILTIN(__builtin_s390_vclzf, "V4UiV4Ui", "nc")
+BUILTIN(__builtin_s390_vclzg, "V2ULLiV2ULLi", "nc")
+BUILTIN(__builtin_s390_vctzb, "V16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vctzh, "V8UsV8Us", "nc")
+BUILTIN(__builtin_s390_vctzf, "V4UiV4Ui", "nc")
+BUILTIN(__builtin_s390_vctzg, "V2ULLiV2ULLi", "nc")
+BUILTIN(__builtin_s390_verimb, "V16UcV16UcV16UcV16UcIi", "nc")
+BUILTIN(__builtin_s390_verimh, "V8UsV8UsV8UsV8UsIi", "nc")
+BUILTIN(__builtin_s390_verimf, "V4UiV4UiV4UiV4UiIi", "nc")
+BUILTIN(__builtin_s390_verimg, "V2ULLiV2ULLiV2ULLiV2ULLiIi", "nc")
+BUILTIN(__builtin_s390_verllb, "V16UcV16UcUi", "nc")
+BUILTIN(__builtin_s390_verllh, "V8UsV8UsUi", "nc")
+BUILTIN(__builtin_s390_verllf, "V4UiV4UiUi", "nc")
+BUILTIN(__builtin_s390_verllg, "V2ULLiV2ULLiUi", "nc")
+BUILTIN(__builtin_s390_verllvb, "V16UcV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_verllvh, "V8UsV8UsV8Us", "nc")
+BUILTIN(__builtin_s390_verllvf, "V4UiV4UiV4Ui", "nc")
+BUILTIN(__builtin_s390_verllvg, "V2ULLiV2ULLiV2ULLi", "nc")
+BUILTIN(__builtin_s390_vgfmb, "V8UsV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vgfmh, "V4UiV8UsV8Us", "nc")
+BUILTIN(__builtin_s390_vgfmf, "V2ULLiV4UiV4Ui", "nc")
+BUILTIN(__builtin_s390_vgfmg, "V16UcV2ULLiV2ULLi", "nc")
+BUILTIN(__builtin_s390_vgfmab, "V8UsV16UcV16UcV8Us", "nc")
+BUILTIN(__builtin_s390_vgfmah, "V4UiV8UsV8UsV4Ui", "nc")
+BUILTIN(__builtin_s390_vgfmaf, "V2ULLiV4UiV4UiV2ULLi", "nc")
+BUILTIN(__builtin_s390_vgfmag, "V16UcV2ULLiV2ULLiV16Uc", "nc")
+BUILTIN(__builtin_s390_vmahb, "V16ScV16ScV16ScV16Sc", "nc")
+BUILTIN(__builtin_s390_vmahh, "V8SsV8SsV8SsV8Ss", "nc")
+BUILTIN(__builtin_s390_vmahf, "V4SiV4SiV4SiV4Si", "nc")
+BUILTIN(__builtin_s390_vmalhb, "V16UcV16UcV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vmalhh, "V8UsV8UsV8UsV8Us", "nc")
+BUILTIN(__builtin_s390_vmalhf, "V4UiV4UiV4UiV4Ui", "nc")
+BUILTIN(__builtin_s390_vmaeb, "V8SsV16ScV16ScV8Ss", "nc")
+BUILTIN(__builtin_s390_vmaeh, "V4SiV8SsV8SsV4Si", "nc")
+BUILTIN(__builtin_s390_vmaef, "V2SLLiV4SiV4SiV2SLLi", "nc")
+BUILTIN(__builtin_s390_vmaleb, "V8UsV16UcV16UcV8Us", "nc")
+BUILTIN(__builtin_s390_vmaleh, "V4UiV8UsV8UsV4Ui", "nc")
+BUILTIN(__builtin_s390_vmalef, "V2ULLiV4UiV4UiV2ULLi", "nc")
+BUILTIN(__builtin_s390_vmaob, "V8SsV16ScV16ScV8Ss", "nc")
+BUILTIN(__builtin_s390_vmaoh, "V4SiV8SsV8SsV4Si", "nc")
+BUILTIN(__builtin_s390_vmaof, "V2SLLiV4SiV4SiV2SLLi", "nc")
+BUILTIN(__builtin_s390_vmalob, "V8UsV16UcV16UcV8Us", "nc")
+BUILTIN(__builtin_s390_vmaloh, "V4UiV8UsV8UsV4Ui", "nc")
+BUILTIN(__builtin_s390_vmalof, "V2ULLiV4UiV4UiV2ULLi", "nc")
+BUILTIN(__builtin_s390_vmhb, "V16ScV16ScV16Sc", "nc")
+BUILTIN(__builtin_s390_vmhh, "V8SsV8SsV8Ss", "nc")
+BUILTIN(__builtin_s390_vmhf, "V4SiV4SiV4Si", "nc")
+BUILTIN(__builtin_s390_vmlhb, "V16UcV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vmlhh, "V8UsV8UsV8Us", "nc")
+BUILTIN(__builtin_s390_vmlhf, "V4UiV4UiV4Ui", "nc")
+BUILTIN(__builtin_s390_vmeb, "V8SsV16ScV16Sc", "nc")
+BUILTIN(__builtin_s390_vmeh, "V4SiV8SsV8Ss", "nc")
+BUILTIN(__builtin_s390_vmef, "V2SLLiV4SiV4Si", "nc")
+BUILTIN(__builtin_s390_vmleb, "V8UsV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vmleh, "V4UiV8UsV8Us", "nc")
+BUILTIN(__builtin_s390_vmlef, "V2ULLiV4UiV4Ui", "nc")
+BUILTIN(__builtin_s390_vmob, "V8SsV16ScV16Sc", "nc")
+BUILTIN(__builtin_s390_vmoh, "V4SiV8SsV8Ss", "nc")
+BUILTIN(__builtin_s390_vmof, "V2SLLiV4SiV4Si", "nc")
+BUILTIN(__builtin_s390_vmlob, "V8UsV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vmloh, "V4UiV8UsV8Us", "nc")
+BUILTIN(__builtin_s390_vmlof, "V2ULLiV4UiV4Ui", "nc")
+BUILTIN(__builtin_s390_vpopctb, "V16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vpopcth, "V8UsV8Us", "nc")
+BUILTIN(__builtin_s390_vpopctf, "V4UiV4Ui", "nc")
+BUILTIN(__builtin_s390_vpopctg, "V2ULLiV2ULLi", "nc")
+BUILTIN(__builtin_s390_vsq, "V16UcV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vsbcbiq, "V16UcV16UcV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vsbiq, "V16UcV16UcV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vscbib, "V16UcV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vscbih, "V8UsV8UsV8Us", "nc")
+BUILTIN(__builtin_s390_vscbif, "V4UiV4UiV4Ui", "nc")
+BUILTIN(__builtin_s390_vscbig, "V2ULLiV2ULLiV2ULLi", "nc")
+BUILTIN(__builtin_s390_vscbiq, "V16UcV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vsl, "V16UcV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vslb, "V16UcV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vsldb, "V16UcV16UcV16UcIi", "nc")
+BUILTIN(__builtin_s390_vsra, "V16UcV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vsrab, "V16UcV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vsrl, "V16UcV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vsrlb, "V16UcV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vsumb, "V4UiV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vsumh, "V4UiV8UsV8Us", "nc")
+BUILTIN(__builtin_s390_vsumgh, "V2ULLiV8UsV8Us", "nc")
+BUILTIN(__builtin_s390_vsumgf, "V2ULLiV4UiV4Ui", "nc")
+BUILTIN(__builtin_s390_vsumqf, "V16UcV4UiV4Ui", "nc")
+BUILTIN(__builtin_s390_vsumqg, "V16UcV2ULLiV2ULLi", "nc")
+BUILTIN(__builtin_s390_vtm, "iV16UcV16Uc", "nc")
+
+// Vector string instructions (chapter 23 of the PoP)
+BUILTIN(__builtin_s390_vfaeb, "V16UcV16UcV16UcIi", "nc")
+BUILTIN(__builtin_s390_vfaebs, "V16UcV16UcV16UcIii*", "nc")
+BUILTIN(__builtin_s390_vfaeh, "V8UsV8UsV8UsIi", "nc")
+BUILTIN(__builtin_s390_vfaehs, "V8UsV8UsV8UsIii*", "nc")
+BUILTIN(__builtin_s390_vfaef, "V4UiV4UiV4UiIi", "nc")
+BUILTIN(__builtin_s390_vfaefs, "V4UiV4UiV4UiIii*", "nc")
+BUILTIN(__builtin_s390_vfaezb, "V16UcV16UcV16UcIi", "nc")
+BUILTIN(__builtin_s390_vfaezbs, "V16UcV16UcV16UcIii*", "nc")
+BUILTIN(__builtin_s390_vfaezh, "V8UsV8UsV8UsIi", "nc")
+BUILTIN(__builtin_s390_vfaezhs, "V8UsV8UsV8UsIii*", "nc")
+BUILTIN(__builtin_s390_vfaezf, "V4UiV4UiV4UiIi", "nc")
+BUILTIN(__builtin_s390_vfaezfs, "V4UiV4UiV4UiIii*", "nc")
+BUILTIN(__builtin_s390_vfeeb, "V16UcV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vfeebs, "V16UcV16UcV16Uci*", "nc")
+BUILTIN(__builtin_s390_vfeeh, "V8UsV8UsV8Us", "nc")
+BUILTIN(__builtin_s390_vfeehs, "V8UsV8UsV8Usi*", "nc")
+BUILTIN(__builtin_s390_vfeef, "V4UiV4UiV4Ui", "nc")
+BUILTIN(__builtin_s390_vfeefs, "V4UiV4UiV4Uii*", "nc")
+BUILTIN(__builtin_s390_vfeezb, "V16UcV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vfeezbs, "V16UcV16UcV16Uci*", "nc")
+BUILTIN(__builtin_s390_vfeezh, "V8UsV8UsV8Us", "nc")
+BUILTIN(__builtin_s390_vfeezhs, "V8UsV8UsV8Usi*", "nc")
+BUILTIN(__builtin_s390_vfeezf, "V4UiV4UiV4Ui", "nc")
+BUILTIN(__builtin_s390_vfeezfs, "V4UiV4UiV4Uii*", "nc")
+BUILTIN(__builtin_s390_vfeneb, "V16UcV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vfenebs, "V16UcV16UcV16Uci*", "nc")
+BUILTIN(__builtin_s390_vfeneh, "V8UsV8UsV8Us", "nc")
+BUILTIN(__builtin_s390_vfenehs, "V8UsV8UsV8Usi*", "nc")
+BUILTIN(__builtin_s390_vfenef, "V4UiV4UiV4Ui", "nc")
+BUILTIN(__builtin_s390_vfenefs, "V4UiV4UiV4Uii*", "nc")
+BUILTIN(__builtin_s390_vfenezb, "V16UcV16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vfenezbs, "V16UcV16UcV16Uci*", "nc")
+BUILTIN(__builtin_s390_vfenezh, "V8UsV8UsV8Us", "nc")
+BUILTIN(__builtin_s390_vfenezhs, "V8UsV8UsV8Usi*", "nc")
+BUILTIN(__builtin_s390_vfenezf, "V4UiV4UiV4Ui", "nc")
+BUILTIN(__builtin_s390_vfenezfs, "V4UiV4UiV4Uii*", "nc")
+BUILTIN(__builtin_s390_vistrb, "V16UcV16Uc", "nc")
+BUILTIN(__builtin_s390_vistrbs, "V16UcV16Uci*", "nc")
+BUILTIN(__builtin_s390_vistrh, "V8UsV8Us", "nc")
+BUILTIN(__builtin_s390_vistrhs, "V8UsV8Usi*", "nc")
+BUILTIN(__builtin_s390_vistrf, "V4UiV4Ui", "nc")
+BUILTIN(__builtin_s390_vistrfs, "V4UiV4Uii*", "nc")
+BUILTIN(__builtin_s390_vstrcb, "V16UcV16UcV16UcV16UcIi", "nc")
+BUILTIN(__builtin_s390_vstrcbs, "V16UcV16UcV16UcV16UcIii*", "nc")
+BUILTIN(__builtin_s390_vstrch, "V8UsV8UsV8UsV8UsIi", "nc")
+BUILTIN(__builtin_s390_vstrchs, "V8UsV8UsV8UsV8UsIii*", "nc")
+BUILTIN(__builtin_s390_vstrcf, "V4UiV4UiV4UiV4UiIi", "nc")
+BUILTIN(__builtin_s390_vstrcfs, "V4UiV4UiV4UiV4UiIii*", "nc")
+BUILTIN(__builtin_s390_vstrczb, "V16UcV16UcV16UcV16UcIi", "nc")
+BUILTIN(__builtin_s390_vstrczbs, "V16UcV16UcV16UcV16UcIii*", "nc")
+BUILTIN(__builtin_s390_vstrczh, "V8UsV8UsV8UsV8UsIi", "nc")
+BUILTIN(__builtin_s390_vstrczhs, "V8UsV8UsV8UsV8UsIii*", "nc")
+BUILTIN(__builtin_s390_vstrczf, "V4UiV4UiV4UiV4UiIi", "nc")
+BUILTIN(__builtin_s390_vstrczfs, "V4UiV4UiV4UiV4UiIii*", "nc")
+
+// Vector floating-point instructions (chapter 24 of the PoP)
+BUILTIN(__builtin_s390_vfcedbs, "V2SLLiV2dV2di*", "nc")
+BUILTIN(__builtin_s390_vfchdbs, "V2SLLiV2dV2di*", "nc")
+BUILTIN(__builtin_s390_vfchedbs, "V2SLLiV2dV2di*", "nc")
+BUILTIN(__builtin_s390_vfidb, "V2dV2dIiIi", "nc")
+BUILTIN(__builtin_s390_vflndb, "V2dV2d", "nc")
+BUILTIN(__builtin_s390_vflpdb, "V2dV2d", "nc")
+BUILTIN(__builtin_s390_vfmadb, "V2dV2dV2dV2d", "nc")
+BUILTIN(__builtin_s390_vfmsdb, "V2dV2dV2dV2d", "nc")
+BUILTIN(__builtin_s390_vfsqdb, "V2dV2d", "nc")
+BUILTIN(__builtin_s390_vftcidb, "V2SLLiV2dIii*", "nc")
+
+#undef BUILTIN
diff --git a/include/clang/Basic/BuiltinsX86.def b/include/clang/Basic/BuiltinsX86.def
index eb6803b..1a597b5 100644
--- a/include/clang/Basic/BuiltinsX86.def
+++ b/include/clang/Basic/BuiltinsX86.def
@@ -316,8 +316,6 @@ BUILTIN(__builtin_ia32_psraw128, "V8sV8sV8s", "")
BUILTIN(__builtin_ia32_psrad128, "V4iV4iV4i", "")
BUILTIN(__builtin_ia32_psrlw128, "V8sV8sV8s", "")
BUILTIN(__builtin_ia32_psrld128, "V4iV4iV4i", "")
-BUILTIN(__builtin_ia32_pslldqi128, "V2LLiV2LLiIi", "")
-BUILTIN(__builtin_ia32_psrldqi128, "V2LLiV2LLiIi", "")
BUILTIN(__builtin_ia32_psrlq128, "V2LLiV2LLiV2LLi", "")
BUILTIN(__builtin_ia32_psllw128, "V8sV8sV8s", "")
BUILTIN(__builtin_ia32_pslld128, "V4iV4iV4i", "")
@@ -338,9 +336,6 @@ BUILTIN(__builtin_ia32_palignr128, "V16cV16cV16cIc", "")
BUILTIN(__builtin_ia32_insertps128, "V4fV4fV4fIc", "")
BUILTIN(__builtin_ia32_pblendvb128, "V16cV16cV16cV16c", "")
-BUILTIN(__builtin_ia32_pblendw128, "V8sV8sV8sIc", "")
-BUILTIN(__builtin_ia32_blendpd, "V2dV2dV2dIc", "")
-BUILTIN(__builtin_ia32_blendps, "V4fV4fV4fIc", "")
BUILTIN(__builtin_ia32_blendvpd, "V2dV2dV2dV2d", "")
BUILTIN(__builtin_ia32_blendvps, "V4fV4fV4fV4f", "")
@@ -436,16 +431,11 @@ BUILTIN(__builtin_ia32_vpermilvarpd, "V2dV2dV2LLi", "")
BUILTIN(__builtin_ia32_vpermilvarps, "V4fV4fV4i", "")
BUILTIN(__builtin_ia32_vpermilvarpd256, "V4dV4dV4LLi", "")
BUILTIN(__builtin_ia32_vpermilvarps256, "V8fV8fV8i", "")
-BUILTIN(__builtin_ia32_blendpd256, "V4dV4dV4dIc", "")
-BUILTIN(__builtin_ia32_blendps256, "V8fV8fV8fIc", "")
BUILTIN(__builtin_ia32_blendvpd256, "V4dV4dV4dV4d", "")
BUILTIN(__builtin_ia32_blendvps256, "V8fV8fV8fV8f", "")
BUILTIN(__builtin_ia32_dpps256, "V8fV8fV8fIc", "")
BUILTIN(__builtin_ia32_cmppd256, "V4dV4dV4dIc", "")
BUILTIN(__builtin_ia32_cmpps256, "V8fV8fV8fIc", "")
-BUILTIN(__builtin_ia32_vextractf128_pd256, "V2dV4dIc", "")
-BUILTIN(__builtin_ia32_vextractf128_ps256, "V4fV8fIc", "")
-BUILTIN(__builtin_ia32_vextractf128_si256, "V4iV8iIc", "")
BUILTIN(__builtin_ia32_cvtdq2pd256, "V4dV4i", "")
BUILTIN(__builtin_ia32_cvtdq2ps256, "V8fV8i", "")
BUILTIN(__builtin_ia32_cvtpd2ps256, "V4fV4d", "")
@@ -457,9 +447,6 @@ BUILTIN(__builtin_ia32_cvttps2dq256, "V8iV8f", "")
BUILTIN(__builtin_ia32_vperm2f128_pd256, "V4dV4dV4dIc", "")
BUILTIN(__builtin_ia32_vperm2f128_ps256, "V8fV8fV8fIc", "")
BUILTIN(__builtin_ia32_vperm2f128_si256, "V8iV8iV8iIc", "")
-BUILTIN(__builtin_ia32_vinsertf128_pd256, "V4dV4dV2dIc", "")
-BUILTIN(__builtin_ia32_vinsertf128_ps256, "V8fV8fV4fIc", "")
-BUILTIN(__builtin_ia32_vinsertf128_si256, "V8iV8iV4iIc", "")
BUILTIN(__builtin_ia32_sqrtpd256, "V4dV4d", "")
BUILTIN(__builtin_ia32_sqrtps256, "V8fV8f", "")
BUILTIN(__builtin_ia32_rsqrtps256, "V8fV8f", "")
@@ -524,7 +511,6 @@ BUILTIN(__builtin_ia32_palignr256, "V32cV32cV32cIc", "")
BUILTIN(__builtin_ia32_pavgb256, "V32cV32cV32c", "")
BUILTIN(__builtin_ia32_pavgw256, "V16sV16sV16s", "")
BUILTIN(__builtin_ia32_pblendvb256, "V32cV32cV32cV32c", "")
-BUILTIN(__builtin_ia32_pblendw256, "V16sV16sV16sIc", "")
BUILTIN(__builtin_ia32_phaddw256, "V16sV16sV16s", "")
BUILTIN(__builtin_ia32_phaddd256, "V8iV8iV8i", "")
BUILTIN(__builtin_ia32_phaddsw256, "V16sV16sV16s", "")
@@ -590,9 +576,6 @@ BUILTIN(__builtin_ia32_movntdqa256, "V4LLiV4LLi*", "")
BUILTIN(__builtin_ia32_vbroadcastss_ps, "V4fV4f", "")
BUILTIN(__builtin_ia32_vbroadcastss_ps256, "V8fV4f", "")
BUILTIN(__builtin_ia32_vbroadcastsd_pd256, "V4dV2d", "")
-BUILTIN(__builtin_ia32_vbroadcastsi256, "V4LLiV2LLi", "")
-BUILTIN(__builtin_ia32_pblendd128, "V4iV4iV4iIc", "")
-BUILTIN(__builtin_ia32_pblendd256, "V8iV8iV8iIc", "")
BUILTIN(__builtin_ia32_pbroadcastb256, "V32cV16c", "")
BUILTIN(__builtin_ia32_pbroadcastw256, "V16sV8s", "")
BUILTIN(__builtin_ia32_pbroadcastd256, "V8iV4i", "")
@@ -604,8 +587,6 @@ BUILTIN(__builtin_ia32_pbroadcastq128, "V2LLiV2LLi", "")
BUILTIN(__builtin_ia32_permvarsi256, "V8iV8iV8i", "")
BUILTIN(__builtin_ia32_permvarsf256, "V8fV8fV8f", "")
BUILTIN(__builtin_ia32_permti256, "V4LLiV4LLiV4LLiIc", "")
-BUILTIN(__builtin_ia32_extract128i256, "V2LLiV4LLiIc", "")
-BUILTIN(__builtin_ia32_insert128i256, "V4LLiV4LLiV2LLiIc", "")
BUILTIN(__builtin_ia32_maskloadd256, "V8iV8iC*V8i", "")
BUILTIN(__builtin_ia32_maskloadq256, "V4LLiV4LLiC*V4LLi", "")
BUILTIN(__builtin_ia32_maskloadd, "V4iV4iC*V4i", "")
@@ -738,12 +719,12 @@ BUILTIN(__builtin_ia32_vfmaddsubps256, "V8fV8fV8fV8f", "")
BUILTIN(__builtin_ia32_vfmaddsubpd256, "V4dV4dV4dV4d", "")
BUILTIN(__builtin_ia32_vfmsubaddps256, "V8fV8fV8fV8f", "")
BUILTIN(__builtin_ia32_vfmsubaddpd256, "V4dV4dV4dV4d", "")
-BUILTIN(__builtin_ia32_vfmaddpd512_mask, "V8dV8dV8dV8dUci", "")
-BUILTIN(__builtin_ia32_vfmsubpd512_mask, "V8dV8dV8dV8dUci", "")
-BUILTIN(__builtin_ia32_vfnmaddpd512_mask, "V8dV8dV8dV8dUci", "")
-BUILTIN(__builtin_ia32_vfmaddps512_mask, "V16fV16fV16fV16fUsi", "")
-BUILTIN(__builtin_ia32_vfmsubps512_mask, "V16fV16fV16fV16fUsi", "")
-BUILTIN(__builtin_ia32_vfnmaddps512_mask, "V16fV16fV16fV16fUsi", "")
+BUILTIN(__builtin_ia32_vfmaddpd512_mask, "V8dV8dV8dV8dUcIi", "")
+BUILTIN(__builtin_ia32_vfmsubpd512_mask, "V8dV8dV8dV8dUcIi", "")
+BUILTIN(__builtin_ia32_vfnmaddpd512_mask, "V8dV8dV8dV8dUcIi", "")
+BUILTIN(__builtin_ia32_vfmaddps512_mask, "V16fV16fV16fV16fUsIi", "")
+BUILTIN(__builtin_ia32_vfmsubps512_mask, "V16fV16fV16fV16fUsIi", "")
+BUILTIN(__builtin_ia32_vfnmaddps512_mask, "V16fV16fV16fV16fUsIi", "")
// XOP
BUILTIN(__builtin_ia32_vpmacssww, "V8sV8sV8sV8s", "")
@@ -820,29 +801,33 @@ BUILTIN(__builtin_ia32_rdtsc, "ULLi", "")
BUILTIN(__builtin_ia32_rdtscp, "ULLiUi*", "")
// AVX-512
-BUILTIN(__builtin_ia32_sqrtpd512_mask, "V8dV8dV8dUciC", "")
-BUILTIN(__builtin_ia32_sqrtps512_mask, "V16fV16fV16fUsiC", "")
+BUILTIN(__builtin_ia32_sqrtpd512_mask, "V8dV8dV8dUcIi", "")
+BUILTIN(__builtin_ia32_sqrtps512_mask, "V16fV16fV16fUsIi", "")
BUILTIN(__builtin_ia32_rsqrt14sd_mask, "V2dV2dV2dV2dUc", "")
BUILTIN(__builtin_ia32_rsqrt14ss_mask, "V4fV4fV4fV4fUc", "")
BUILTIN(__builtin_ia32_rsqrt14pd512_mask, "V8dV8dV8dUc", "")
BUILTIN(__builtin_ia32_rsqrt14ps512_mask, "V16fV16fV16fUs", "")
-BUILTIN(__builtin_ia32_rsqrt28sd_mask, "V2dV2dV2dV2dUciC", "")
-BUILTIN(__builtin_ia32_rsqrt28ss_mask, "V4fV4fV4fV4fUciC", "")
-BUILTIN(__builtin_ia32_rsqrt28pd_mask, "V8dV8dV8dUciC", "")
-BUILTIN(__builtin_ia32_rsqrt28ps_mask, "V16fV16fV16fUsiC", "")
+BUILTIN(__builtin_ia32_rsqrt28sd_mask, "V2dV2dV2dV2dUcIi", "")
+BUILTIN(__builtin_ia32_rsqrt28ss_mask, "V4fV4fV4fV4fUcIi", "")
+BUILTIN(__builtin_ia32_rsqrt28pd_mask, "V8dV8dV8dUcIi", "")
+BUILTIN(__builtin_ia32_rsqrt28ps_mask, "V16fV16fV16fUsIi", "")
BUILTIN(__builtin_ia32_rcp14sd_mask, "V2dV2dV2dV2dUc", "")
BUILTIN(__builtin_ia32_rcp14ss_mask, "V4fV4fV4fV4fUc", "")
BUILTIN(__builtin_ia32_rcp14pd512_mask, "V8dV8dV8dUc", "")
BUILTIN(__builtin_ia32_rcp14ps512_mask, "V16fV16fV16fUs", "")
-BUILTIN(__builtin_ia32_rcp28sd_mask, "V2dV2dV2dV2dUciC", "")
-BUILTIN(__builtin_ia32_rcp28ss_mask, "V4fV4fV4fV4fUciC", "")
-BUILTIN(__builtin_ia32_rcp28pd_mask, "V8dV8dV8dUciC", "")
-BUILTIN(__builtin_ia32_rcp28ps_mask, "V16fV16fV16fUsiC", "")
-BUILTIN(__builtin_ia32_cvttps2dq512_mask, "V16iV16fV16iUsiC", "")
-BUILTIN(__builtin_ia32_cvttps2udq512_mask, "V16iV16fV16iUsiC", "")
-BUILTIN(__builtin_ia32_cvttpd2dq512_mask, "V8iV8dV8iUciC", "")
-BUILTIN(__builtin_ia32_cvttpd2udq512_mask, "V8iV8dV8iUciC", "")
-BUILTIN(__builtin_ia32_cmpps512_mask, "UsV16fV16fiCUsi", "")
+BUILTIN(__builtin_ia32_rcp28sd_mask, "V2dV2dV2dV2dUcIi", "")
+BUILTIN(__builtin_ia32_rcp28ss_mask, "V4fV4fV4fV4fUcIi", "")
+BUILTIN(__builtin_ia32_rcp28pd_mask, "V8dV8dV8dUcIi", "")
+BUILTIN(__builtin_ia32_rcp28ps_mask, "V16fV16fV16fUsIi", "")
+BUILTIN(__builtin_ia32_exp2pd_mask, "V8dV8dV8dUcIi", "")
+BUILTIN(__builtin_ia32_exp2ps_mask, "V16fV16fV16fUsIi", "")
+BUILTIN(__builtin_ia32_cvttps2dq512_mask, "V16iV16fV16iUsIi", "")
+BUILTIN(__builtin_ia32_cvttps2udq512_mask, "V16iV16fV16iUsIi", "")
+BUILTIN(__builtin_ia32_cvttpd2dq512_mask, "V8iV8dV8iUcIi", "")
+BUILTIN(__builtin_ia32_cvttpd2udq512_mask, "V8iV8dV8iUcIi", "")
+BUILTIN(__builtin_ia32_cmpps512_mask, "UsV16fV16fIiUsIi", "")
+BUILTIN(__builtin_ia32_cmpps256_mask, "UcV8fV8fIiUc", "")
+BUILTIN(__builtin_ia32_cmpps128_mask, "UcV4fV4fIiUc", "")
BUILTIN(__builtin_ia32_pcmpeqb512_mask, "LLiV64cV64cLLi", "")
BUILTIN(__builtin_ia32_pcmpeqd512_mask, "sV16iV16is", "")
BUILTIN(__builtin_ia32_pcmpeqq512_mask, "cV8LLiV8LLic", "")
@@ -855,24 +840,44 @@ BUILTIN(__builtin_ia32_pcmpeqb128_mask, "sV16cV16cs", "")
BUILTIN(__builtin_ia32_pcmpeqd128_mask, "cV4iV4ic", "")
BUILTIN(__builtin_ia32_pcmpeqq128_mask, "cV2LLiV2LLic", "")
BUILTIN(__builtin_ia32_pcmpeqw128_mask, "cV8sV8sc", "")
-BUILTIN(__builtin_ia32_cmppd512_mask, "UcV8dV8diCUci", "")
-BUILTIN(__builtin_ia32_rndscaleps_mask, "V16fV16fiCV16fUsiC", "")
-BUILTIN(__builtin_ia32_rndscalepd_mask, "V8dV8diCV8dUciC", "")
-BUILTIN(__builtin_ia32_cvtps2dq512_mask, "V16iV16fV16iUsiC", "")
-BUILTIN(__builtin_ia32_cvtpd2dq512_mask, "V8iV8dV8iUciC", "")
-BUILTIN(__builtin_ia32_cvtps2udq512_mask, "V16iV16fV16iUsiC", "")
-BUILTIN(__builtin_ia32_cvtpd2udq512_mask, "V8iV8dV8iUciC", "")
-BUILTIN(__builtin_ia32_minps512_mask, "V16fV16fV16fV16fUsiC", "")
-BUILTIN(__builtin_ia32_minpd512_mask, "V8dV8dV8dV8dUciC", "")
-BUILTIN(__builtin_ia32_maxps512_mask, "V16fV16fV16fV16fUsiC", "")
-BUILTIN(__builtin_ia32_maxpd512_mask, "V8dV8dV8dV8dUciC", "")
-BUILTIN(__builtin_ia32_cvtdq2ps512_mask, "V16fV16iV16fUsiC", "")
-BUILTIN(__builtin_ia32_cvtudq2ps512_mask, "V16fV16iV16fUsiC", "")
+BUILTIN(__builtin_ia32_pcmpgtb512_mask, "LLiV64cV64cLLi", "")
+BUILTIN(__builtin_ia32_pcmpgtd512_mask, "sV16iV16is", "")
+BUILTIN(__builtin_ia32_pcmpgtq512_mask, "cV8LLiV8LLic", "")
+BUILTIN(__builtin_ia32_pcmpgtw512_mask, "iV32sV32si", "")
+BUILTIN(__builtin_ia32_pcmpgtb256_mask, "iV32cV32ci", "")
+BUILTIN(__builtin_ia32_pcmpgtd256_mask, "cV8iV8ic", "")
+BUILTIN(__builtin_ia32_pcmpgtq256_mask, "cV4LLiV4LLic", "")
+BUILTIN(__builtin_ia32_pcmpgtw256_mask, "sV16sV16ss", "")
+BUILTIN(__builtin_ia32_pcmpgtb128_mask, "sV16cV16cs", "")
+BUILTIN(__builtin_ia32_pcmpgtd128_mask, "cV4iV4ic", "")
+BUILTIN(__builtin_ia32_pcmpgtq128_mask, "cV2LLiV2LLic", "")
+BUILTIN(__builtin_ia32_pcmpgtw128_mask, "cV8sV8sc", "")
+BUILTIN(__builtin_ia32_cmppd512_mask, "UcV8dV8dIiUcIi", "")
+BUILTIN(__builtin_ia32_cmppd256_mask, "UcV4dV4dIiUc", "")
+BUILTIN(__builtin_ia32_cmppd128_mask, "UcV2dV2dIiUc", "")
+BUILTIN(__builtin_ia32_rndscaleps_mask, "V16fV16fIiV16fUsIi", "")
+BUILTIN(__builtin_ia32_rndscalepd_mask, "V8dV8dIiV8dUcIi", "")
+BUILTIN(__builtin_ia32_cvtps2dq512_mask, "V16iV16fV16iUsIi", "")
+BUILTIN(__builtin_ia32_cvtpd2dq512_mask, "V8iV8dV8iUcIi", "")
+BUILTIN(__builtin_ia32_cvtps2udq512_mask, "V16iV16fV16iUsIi", "")
+BUILTIN(__builtin_ia32_cvtpd2udq512_mask, "V8iV8dV8iUcIi", "")
+BUILTIN(__builtin_ia32_minps512_mask, "V16fV16fV16fV16fUsIi", "")
+BUILTIN(__builtin_ia32_minpd512_mask, "V8dV8dV8dV8dUcIi", "")
+BUILTIN(__builtin_ia32_maxps512_mask, "V16fV16fV16fV16fUsIi", "")
+BUILTIN(__builtin_ia32_maxpd512_mask, "V8dV8dV8dV8dUcIi", "")
+BUILTIN(__builtin_ia32_cvtdq2ps512_mask, "V16fV16iV16fUsIi", "")
+BUILTIN(__builtin_ia32_cvtudq2ps512_mask, "V16fV16iV16fUsIi", "")
BUILTIN(__builtin_ia32_cvtdq2pd512_mask, "V8dV8iV8dUc", "")
BUILTIN(__builtin_ia32_cvtudq2pd512_mask, "V8dV8iV8dUc", "")
-BUILTIN(__builtin_ia32_cvtpd2ps512_mask, "V8fV8dV8fUciC", "")
-BUILTIN(__builtin_ia32_vcvtps2ph512_mask, "V16sV16fiCV16sUs", "")
-BUILTIN(__builtin_ia32_vcvtph2ps512_mask, "V16fV16sV16fUsiC", "")
+BUILTIN(__builtin_ia32_cvtpd2ps512_mask, "V8fV8dV8fUcIi", "")
+BUILTIN(__builtin_ia32_vcvtps2ph512_mask, "V16sV16fIiV16sUs", "")
+BUILTIN(__builtin_ia32_vcvtph2ps512_mask, "V16fV16sV16fUsIi", "")
+BUILTIN(__builtin_ia32_pandd512_mask, "V16iV16iV16iV16iUs", "")
+BUILTIN(__builtin_ia32_pandq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "")
+BUILTIN(__builtin_ia32_pord512_mask, "V16iV16iV16iV16iUs", "")
+BUILTIN(__builtin_ia32_porq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "")
+BUILTIN(__builtin_ia32_pxord512_mask, "V16iV16iV16iV16iUs", "")
+BUILTIN(__builtin_ia32_pxorq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "")
BUILTIN(__builtin_ia32_pabsd512_mask, "V16iV16iV16iUs", "")
BUILTIN(__builtin_ia32_pabsq512_mask, "V8LLiV8LLiV8LLiUc", "")
BUILTIN(__builtin_ia32_pmaxsd512_mask, "V16iV16iV16iV16iUs", "")
@@ -897,41 +902,152 @@ BUILTIN(__builtin_ia32_pbroadcastq512_mem_mask, "V8LLiLLiV8LLiUc", "")
BUILTIN(__builtin_ia32_loaddqusi512_mask, "V16ivC*V16iUs", "")
BUILTIN(__builtin_ia32_loaddqudi512_mask, "V8LLivC*V8LLiUc", "")
BUILTIN(__builtin_ia32_loadups512_mask, "V16fvC*V16fUs", "")
+BUILTIN(__builtin_ia32_loadaps512_mask, "V16fvC*V16fUs", "")
BUILTIN(__builtin_ia32_loadupd512_mask, "V8dvC*V8dUc", "")
+BUILTIN(__builtin_ia32_loadapd512_mask, "V8dvC*V8dUc", "")
BUILTIN(__builtin_ia32_storedqudi512_mask, "vv*V8LLiUc", "")
BUILTIN(__builtin_ia32_storedqusi512_mask, "vv*V16iUs", "")
BUILTIN(__builtin_ia32_storeupd512_mask, "vv*V8dUc", "")
+BUILTIN(__builtin_ia32_storeapd512_mask, "vv*V8dUc", "")
BUILTIN(__builtin_ia32_storeups512_mask, "vv*V16fUs", "")
+BUILTIN(__builtin_ia32_storeaps512_mask, "vv*V16fUs", "")
BUILTIN(__builtin_ia32_vpermt2vard512_mask, "V16iV16iV16iV16iUs", "")
BUILTIN(__builtin_ia32_vpermt2varq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "")
BUILTIN(__builtin_ia32_vpermt2varps512_mask, "V16fV16iV16fV16fUs", "")
BUILTIN(__builtin_ia32_vpermt2varpd512_mask, "V8dV8LLiV8dV8dUc", "")
-BUILTIN(__builtin_ia32_alignq512_mask, "V8LLiV8LLiV8LLiUcV8LLiUc", "")
-BUILTIN(__builtin_ia32_alignd512_mask, "V16iV16iV16iUcV16iUc", "")
-BUILTIN(__builtin_ia32_gathersiv8df, "V8dV8dvC*V8iUciC", "")
-BUILTIN(__builtin_ia32_gathersiv16sf, "V16fV16fvC*UsiC", "")
-BUILTIN(__builtin_ia32_gatherdiv8df, "V8dV8dvC*V8LLiUciC", "")
-BUILTIN(__builtin_ia32_gatherdiv16sf, "V8fV8fvC*V8LLiUciC", "")
-BUILTIN(__builtin_ia32_gathersiv8di, "V8LLiV8LLivC*V8iUciC", "")
-BUILTIN(__builtin_ia32_gathersiv16si, "V16iV16ivC*UsiC", "")
-BUILTIN(__builtin_ia32_gatherdiv8di, "V8LLiV8LLivC*V8LLiUciC", "")
-BUILTIN(__builtin_ia32_gatherdiv16si, "V8iV8ivC*V8LLiUciC", "")
-BUILTIN(__builtin_ia32_scattersiv8df, "vv*UcV8iV8diC", "")
-BUILTIN(__builtin_ia32_scattersiv16sf, "vv*UsV16iV16fiC", "")
-BUILTIN(__builtin_ia32_scatterdiv8df, "vv*UcV8LLiV8diC", "")
-BUILTIN(__builtin_ia32_scatterdiv16sf, "vv*UcV8LLiV8fiC", "")
-BUILTIN(__builtin_ia32_scattersiv8di, "vv*UcV8iV8LLiiC", "")
-BUILTIN(__builtin_ia32_scattersiv16si, "vv*UsV16iV16iiC", "")
-BUILTIN(__builtin_ia32_scatterdiv8di, "vv*UcV8LLiV8LLiiC", "")
-BUILTIN(__builtin_ia32_scatterdiv16si, "vv*UcV8LLiV8iiC", "")
-BUILTIN(__builtin_ia32_gatherpfdpd, "vUcV8ivC*iCiC", "")
-BUILTIN(__builtin_ia32_gatherpfdps, "vUsV16ivC*iCiC", "")
-BUILTIN(__builtin_ia32_gatherpfqpd, "vUcV8LLivC*iCiC", "")
-BUILTIN(__builtin_ia32_gatherpfqps, "vUcV8LLivC*iCiC", "")
-BUILTIN(__builtin_ia32_scatterpfdpd, "vUcV8iv*iCiC", "")
-BUILTIN(__builtin_ia32_scatterpfdps, "vUsV16iv*iCiC", "")
-BUILTIN(__builtin_ia32_scatterpfqpd, "vUcV8LLiv*iCiC", "")
-BUILTIN(__builtin_ia32_scatterpfqps, "vUcV8LLiv*iCiC", "")
+BUILTIN(__builtin_ia32_alignq512_mask, "V8LLiV8LLiV8LLiIcV8LLiUc", "")
+BUILTIN(__builtin_ia32_alignd512_mask, "V16iV16iV16iIcV16iUs", "")
+BUILTIN(__builtin_ia32_extractf64x4_mask, "V4dV8dIcV4dUc", "")
+BUILTIN(__builtin_ia32_extractf32x4_mask, "V4fV16fIcV4fUc", "")
+BUILTIN(__builtin_ia32_gathersiv8df, "V8dV8dvC*V8iUcIi", "")
+BUILTIN(__builtin_ia32_gathersiv16sf, "V16fV16fvC*UsIi", "")
+BUILTIN(__builtin_ia32_gatherdiv8df, "V8dV8dvC*V8LLiUcIi", "")
+BUILTIN(__builtin_ia32_gatherdiv16sf, "V8fV8fvC*V8LLiUcIi", "")
+BUILTIN(__builtin_ia32_gathersiv8di, "V8LLiV8LLivC*V8iUcIi", "")
+BUILTIN(__builtin_ia32_gathersiv16si, "V16iV16ivC*UsIi", "")
+BUILTIN(__builtin_ia32_gatherdiv8di, "V8LLiV8LLivC*V8LLiUcIi", "")
+BUILTIN(__builtin_ia32_gatherdiv16si, "V8iV8ivC*V8LLiUcIi", "")
+BUILTIN(__builtin_ia32_scattersiv8df, "vv*UcV8iV8dIi", "")
+BUILTIN(__builtin_ia32_scattersiv16sf, "vv*UsV16iV16fIi", "")
+BUILTIN(__builtin_ia32_scatterdiv8df, "vv*UcV8LLiV8dIi", "")
+BUILTIN(__builtin_ia32_scatterdiv16sf, "vv*UcV8LLiV8fIi", "")
+BUILTIN(__builtin_ia32_scattersiv8di, "vv*UcV8iV8LLiIi", "")
+BUILTIN(__builtin_ia32_scattersiv16si, "vv*UsV16iV16iIi", "")
+BUILTIN(__builtin_ia32_scatterdiv8di, "vv*UcV8LLiV8LLiIi", "")
+BUILTIN(__builtin_ia32_scatterdiv16si, "vv*UcV8LLiV8iIi", "")
+BUILTIN(__builtin_ia32_gatherpfdpd, "vUcV8ivC*IiIi", "")
+BUILTIN(__builtin_ia32_gatherpfdps, "vUsV16ivC*IiIi", "")
+BUILTIN(__builtin_ia32_gatherpfqpd, "vUcV8LLivC*IiIi", "")
+BUILTIN(__builtin_ia32_gatherpfqps, "vUcV8LLivC*IiIi", "")
+BUILTIN(__builtin_ia32_scatterpfdpd, "vUcV8iv*IiIi", "")
+BUILTIN(__builtin_ia32_scatterpfdps, "vUsV16iv*IiIi", "")
+BUILTIN(__builtin_ia32_scatterpfqpd, "vUcV8LLiv*IiIi", "")
+BUILTIN(__builtin_ia32_scatterpfqps, "vUcV8LLiv*IiIi", "")
BUILTIN(__builtin_ia32_knothi, "UsUs", "")
+BUILTIN(__builtin_ia32_cmpb128_mask, "UsV16cV16cIiUs", "")
+BUILTIN(__builtin_ia32_cmpd128_mask, "UcV4iV4iIiUc", "")
+BUILTIN(__builtin_ia32_cmpq128_mask, "UcV2LLiV2LLiIiUc", "")
+BUILTIN(__builtin_ia32_cmpw128_mask, "UcV8sV8sIiUc", "")
+BUILTIN(__builtin_ia32_cmpb256_mask, "UiV32cV32cIiUi", "")
+BUILTIN(__builtin_ia32_cmpd256_mask, "UcV8iV8iIiUc", "")
+BUILTIN(__builtin_ia32_cmpq256_mask, "UcV4LLiV4LLiIiUc", "")
+BUILTIN(__builtin_ia32_cmpw256_mask, "UsV16sV16sIiUs", "")
+BUILTIN(__builtin_ia32_cmpb512_mask, "ULLiV64cV64cIiULLi", "")
+BUILTIN(__builtin_ia32_cmpd512_mask, "UsV16iV16iIiUs", "")
+BUILTIN(__builtin_ia32_cmpq512_mask, "UcV8LLiV8LLiIiUc", "")
+BUILTIN(__builtin_ia32_cmpw512_mask, "UiV32sV32sIiUi", "")
+BUILTIN(__builtin_ia32_ucmpb128_mask, "UsV16cV16cIiUs", "")
+BUILTIN(__builtin_ia32_ucmpd128_mask, "UcV4iV4iIiUc", "")
+BUILTIN(__builtin_ia32_ucmpq128_mask, "UcV2LLiV2LLiIiUc", "")
+BUILTIN(__builtin_ia32_ucmpw128_mask, "UcV8sV8sIiUc", "")
+BUILTIN(__builtin_ia32_ucmpb256_mask, "UiV32cV32cIiUi", "")
+BUILTIN(__builtin_ia32_ucmpd256_mask, "UcV8iV8iIiUc", "")
+BUILTIN(__builtin_ia32_ucmpq256_mask, "UcV4LLiV4LLiIiUc", "")
+BUILTIN(__builtin_ia32_ucmpw256_mask, "UsV16sV16sIiUs", "")
+BUILTIN(__builtin_ia32_ucmpb512_mask, "ULLiV64cV64cIiULLi", "")
+BUILTIN(__builtin_ia32_ucmpd512_mask, "UsV16iV16iIiUs", "")
+BUILTIN(__builtin_ia32_ucmpq512_mask, "UcV8LLiV8LLiIiUc", "")
+BUILTIN(__builtin_ia32_ucmpw512_mask, "UiV32sV32sIiUi", "")
+
+BUILTIN(__builtin_ia32_paddd256_mask, "V8iV8iV8iV8iUc", "")
+BUILTIN(__builtin_ia32_paddq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "")
+BUILTIN(__builtin_ia32_psubd256_mask, "V8iV8iV8iV8iUc", "")
+BUILTIN(__builtin_ia32_psubq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "")
+BUILTIN(__builtin_ia32_paddd128_mask, "V4iV4iV4iV4iUc", "")
+BUILTIN(__builtin_ia32_paddq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "")
+BUILTIN(__builtin_ia32_psubd128_mask, "V4iV4iV4iV4iUc", "")
+BUILTIN(__builtin_ia32_psubq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "")
+BUILTIN(__builtin_ia32_pmuldq256_mask, "V4LLiV8iV8iV4LLiUc", "")
+BUILTIN(__builtin_ia32_pmuldq128_mask, "V2LLiV4iV4iV2LLiUc", "")
+BUILTIN(__builtin_ia32_pmuludq256_mask, "V4LLiV8iV8iV4LLiUc", "")
+BUILTIN(__builtin_ia32_pmuludq128_mask, "V2LLiV4iV4iV2LLiUc", "")
+BUILTIN(__builtin_ia32_pmulld256_mask, "V8iV8iV8iV8iUc", "")
+BUILTIN(__builtin_ia32_pmulld128_mask, "V4iV4iV4iV4iUc", "")
+BUILTIN(__builtin_ia32_pandd256_mask, "V8iV8iV8iV8iUc", "")
+BUILTIN(__builtin_ia32_pandd128_mask, "V4iV4iV4iV4iUc", "")
+BUILTIN(__builtin_ia32_pandnd256_mask, "V8iV8iV8iV8iUc", "")
+BUILTIN(__builtin_ia32_pandnd128_mask, "V4iV4iV4iV4iUc", "")
+BUILTIN(__builtin_ia32_pord256_mask, "V8iV8iV8iV8iUc", "")
+BUILTIN(__builtin_ia32_pord128_mask, "V4iV4iV4iV4iUc", "")
+BUILTIN(__builtin_ia32_pxord256_mask, "V8iV8iV8iV8iUc", "")
+BUILTIN(__builtin_ia32_pxord128_mask, "V4iV4iV4iV4iUc", "")
+BUILTIN(__builtin_ia32_pandq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "")
+BUILTIN(__builtin_ia32_pandq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "")
+BUILTIN(__builtin_ia32_pandnq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "")
+BUILTIN(__builtin_ia32_pandnq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "")
+BUILTIN(__builtin_ia32_porq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "")
+BUILTIN(__builtin_ia32_porq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "")
+BUILTIN(__builtin_ia32_pxorq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "")
+BUILTIN(__builtin_ia32_pxorq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "")
+BUILTIN(__builtin_ia32_paddb512_mask, "V64cV64cV64cV64cULLi", "")
+BUILTIN(__builtin_ia32_psubb512_mask, "V64cV64cV64cV64cULLi", "")
+BUILTIN(__builtin_ia32_paddw512_mask, "V32sV32sV32sV32sUi", "")
+BUILTIN(__builtin_ia32_psubw512_mask, "V32sV32sV32sV32sUi", "")
+BUILTIN(__builtin_ia32_pmullw512_mask, "V32sV32sV32sV32sUi", "")
+BUILTIN(__builtin_ia32_paddb256_mask, "V32cV32cV32cV32cUi", "")
+BUILTIN(__builtin_ia32_paddw256_mask, "V16sV16sV16sV16sUs", "")
+BUILTIN(__builtin_ia32_psubb256_mask, "V32cV32cV32cV32cUi", "")
+BUILTIN(__builtin_ia32_psubw256_mask, "V16sV16sV16sV16sUs", "")
+BUILTIN(__builtin_ia32_paddb128_mask, "V16cV16cV16cV16cUs", "")
+BUILTIN(__builtin_ia32_paddw128_mask, "V8sV8sV8sV8sUc", "")
+BUILTIN(__builtin_ia32_psubb128_mask, "V16cV16cV16cV16cUs", "")
+BUILTIN(__builtin_ia32_psubw128_mask, "V8sV8sV8sV8sUc", "")
+BUILTIN(__builtin_ia32_pmullw256_mask, "V16sV16sV16sV16sUs", "")
+BUILTIN(__builtin_ia32_pmullw128_mask, "V8sV8sV8sV8sUc", "")
+BUILTIN(__builtin_ia32_pandnd512_mask, "V16iV16iV16iV16iUs", "")
+BUILTIN(__builtin_ia32_pandnq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "")
+BUILTIN(__builtin_ia32_paddq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "")
+BUILTIN(__builtin_ia32_psubq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "")
+BUILTIN(__builtin_ia32_paddd512_mask, "V16iV16iV16iV16iUs", "")
+BUILTIN(__builtin_ia32_psubd512_mask, "V16iV16iV16iV16iUs", "")
+BUILTIN(__builtin_ia32_pmulld512_mask, "V16iV16iV16iV16iUs", "")
+BUILTIN(__builtin_ia32_pmullq512_mask, "V8LLiV8LLiV8LLiV8LLiUc", "")
+BUILTIN(__builtin_ia32_xorpd512_mask, "V8dV8dV8dV8dUc", "")
+BUILTIN(__builtin_ia32_xorps512_mask, "V16fV16fV16fV16fUs", "")
+BUILTIN(__builtin_ia32_orpd512_mask, "V8dV8dV8dV8dUc", "")
+BUILTIN(__builtin_ia32_orps512_mask, "V16fV16fV16fV16fUs", "")
+BUILTIN(__builtin_ia32_andpd512_mask, "V8dV8dV8dV8dUc", "")
+BUILTIN(__builtin_ia32_andps512_mask, "V16fV16fV16fV16fUs", "")
+BUILTIN(__builtin_ia32_andnpd512_mask, "V8dV8dV8dV8dUc", "")
+BUILTIN(__builtin_ia32_andnps512_mask, "V16fV16fV16fV16fUs", "")
+BUILTIN(__builtin_ia32_pmullq256_mask, "V4LLiV4LLiV4LLiV4LLiUc", "")
+BUILTIN(__builtin_ia32_pmullq128_mask, "V2LLiV2LLiV2LLiV2LLiUc", "")
+BUILTIN(__builtin_ia32_andnpd256_mask, "V4dV4dV4dV4dUc", "")
+BUILTIN(__builtin_ia32_andnpd128_mask, "V2dV2dV2dV2dUc", "")
+BUILTIN(__builtin_ia32_andnps256_mask, "V8fV8fV8fV8fUc", "")
+BUILTIN(__builtin_ia32_andnps128_mask, "V4fV4fV4fV4fUc", "")
+BUILTIN(__builtin_ia32_andpd256_mask, "V4dV4dV4dV4dUc", "")
+BUILTIN(__builtin_ia32_andpd128_mask, "V2dV2dV2dV2dUc", "")
+BUILTIN(__builtin_ia32_andps256_mask, "V8fV8fV8fV8fUc", "")
+BUILTIN(__builtin_ia32_andps128_mask, "V4fV4fV4fV4fUc", "")
+BUILTIN(__builtin_ia32_xorpd256_mask, "V4dV4dV4dV4dUc", "")
+BUILTIN(__builtin_ia32_xorpd128_mask, "V2dV2dV2dV2dUc", "")
+BUILTIN(__builtin_ia32_xorps256_mask, "V8fV8fV8fV8fUc", "")
+BUILTIN(__builtin_ia32_xorps128_mask, "V4fV4fV4fV4fUc", "")
+BUILTIN(__builtin_ia32_orpd256_mask, "V4dV4dV4dV4dUc", "")
+BUILTIN(__builtin_ia32_orpd128_mask, "V2dV2dV2dV2dUc", "")
+BUILTIN(__builtin_ia32_orps256_mask, "V8fV8fV8fV8fUc", "")
+BUILTIN(__builtin_ia32_orps128_mask, "V4fV4fV4fV4fUc", "")
+
#undef BUILTIN
diff --git a/include/clang/Basic/DeclNodes.td b/include/clang/Basic/DeclNodes.td
index 18bca57..dece8f9 100644
--- a/include/clang/Basic/DeclNodes.td
+++ b/include/clang/Basic/DeclNodes.td
@@ -11,6 +11,7 @@ class DDecl<Decl base, bit abstract = 0> : Decl<abstract> {
class DeclContext { }
def TranslationUnit : Decl, DeclContext;
+def ExternCContext : Decl, DeclContext;
def Named : Decl<1>;
def Namespace : DDecl<Named>, DeclContext;
def UsingDirective : DDecl<Named>;
diff --git a/include/clang/Basic/Diagnostic.h b/include/clang/Basic/Diagnostic.h
index 91e94db..0f3831d 100644
--- a/include/clang/Basic/Diagnostic.h
+++ b/include/clang/Basic/Diagnostic.h
@@ -132,8 +132,8 @@ public:
/// the user. DiagnosticsEngine is tied to one translation unit and one
/// SourceManager.
class DiagnosticsEngine : public RefCountedBase<DiagnosticsEngine> {
- DiagnosticsEngine(const DiagnosticsEngine &) LLVM_DELETED_FUNCTION;
- void operator=(const DiagnosticsEngine &) LLVM_DELETED_FUNCTION;
+ DiagnosticsEngine(const DiagnosticsEngine &) = delete;
+ void operator=(const DiagnosticsEngine &) = delete;
public:
/// \brief The level of the diagnostic, after it has been through mapping.
@@ -877,7 +877,7 @@ class DiagnosticBuilder {
/// call to ForceEmit.
mutable bool IsForceEmit;
- void operator=(const DiagnosticBuilder &) LLVM_DELETED_FUNCTION;
+ void operator=(const DiagnosticBuilder &) = delete;
friend class DiagnosticsEngine;
DiagnosticBuilder()
@@ -991,7 +991,8 @@ public:
void AddFixItHint(const FixItHint &Hint) const {
assert(isActive() && "Clients must not add to cleared diagnostic!");
- DiagObj->DiagFixItHints.push_back(Hint);
+ if (!Hint.isNull())
+ DiagObj->DiagFixItHints.push_back(Hint);
}
void addFlagValue(StringRef V) const { DiagObj->FlagValue = V; }
@@ -1095,7 +1096,13 @@ inline const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
inline const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
const FixItHint &Hint) {
- if (!Hint.isNull())
+ DB.AddFixItHint(Hint);
+ return DB;
+}
+
+inline const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
+ ArrayRef<FixItHint> Hints) {
+ for (const FixItHint &Hint : Hints)
DB.AddFixItHint(Hint);
return DB;
}
@@ -1260,7 +1267,7 @@ public:
~StoredDiagnostic();
/// \brief Evaluates true when this object stores a diagnostic.
- LLVM_EXPLICIT operator bool() const { return Message.size() > 0; }
+ explicit operator bool() const { return Message.size() > 0; }
unsigned getID() const { return ID; }
DiagnosticsEngine::Level getLevel() const { return Level; }
@@ -1364,7 +1371,7 @@ class ForwardingDiagnosticConsumer : public DiagnosticConsumer {
public:
ForwardingDiagnosticConsumer(DiagnosticConsumer &Target) : Target(Target) {}
- virtual ~ForwardingDiagnosticConsumer();
+ ~ForwardingDiagnosticConsumer() override;
void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel,
const Diagnostic &Info) override;
diff --git a/include/clang/Basic/DiagnosticASTKinds.td b/include/clang/Basic/DiagnosticASTKinds.td
index d353b45..0b37030 100644
--- a/include/clang/Basic/DiagnosticASTKinds.td
+++ b/include/clang/Basic/DiagnosticASTKinds.td
@@ -168,6 +168,14 @@ let CategoryName = "Inline Assembly Issue" in {
"invalid operand number in inline asm string">;
}
+// vtable related.
+let CategoryName = "VTable ABI Issue" in {
+ def err_vftable_ambiguous_component : Error<
+ "ambiguous vftable component for %0 introduced via covariant thunks; "
+ "this is an inherent limitation of the ABI">;
+ def note_covariant_thunk : Note<
+ "covariant thunk required by %0">;
+}
// Importing ASTs
def err_odr_variable_type_inconsistent : Error<
diff --git a/include/clang/Basic/DiagnosticCommentKinds.td b/include/clang/Basic/DiagnosticCommentKinds.td
index 6dc8b27..ab24582 100644
--- a/include/clang/Basic/DiagnosticCommentKinds.td
+++ b/include/clang/Basic/DiagnosticCommentKinds.td
@@ -166,7 +166,7 @@ def warn_unknown_comment_command_name : Warning<
def warn_correct_comment_command_name : Warning<
"unknown command tag name '%0'; did you mean '%1'?">,
- InGroup<Documentation>, DefaultIgnore;
+ InGroup<DocumentationUnknownCommand>, DefaultIgnore;
} // end of documentation issue category
} // end of AST component
diff --git a/include/clang/Basic/DiagnosticCommonKinds.td b/include/clang/Basic/DiagnosticCommonKinds.td
index ff9ed69..afdd926 100644
--- a/include/clang/Basic/DiagnosticCommonKinds.td
+++ b/include/clang/Basic/DiagnosticCommonKinds.td
@@ -81,8 +81,13 @@ def err_deleted_non_function : Error<
"only functions can have deleted definitions">;
def err_module_not_found : Error<"module '%0' not found">, DefaultFatal;
def err_module_not_built : Error<"could not build module '%0'">, DefaultFatal;
+def err_module_build_disabled: Error<
+ "module '%0' is needed but has not been provided, and implicit use of module "
+ "files is disabled">, DefaultFatal;
def err_module_lock_failure : Error<
"could not acquire lock file for module '%0'">, DefaultFatal;
+def err_module_lock_timeout : Error<
+ "timed out waiting to acquire lock file for module '%0'">, DefaultFatal;
def err_module_cycle : Error<"cyclic dependency in module '%0': %1">,
DefaultFatal;
def note_pragma_entered_here : Note<"#pragma entered here">;
@@ -112,6 +117,16 @@ def ext_integer_literal_too_large_for_signed : ExtWarn<
"interpreting as unsigned">,
InGroup<DiagGroup<"implicitly-unsigned-literal">>;
+// SEH
+def err_seh_expected_handler : Error<
+ "expected '__except' or '__finally' block">;
+def err_seh___except_block : Error<
+ "%0 only allowed in __except block or filter expression">;
+def err_seh___except_filter : Error<
+ "%0 only allowed in __except filter expression">;
+def err_seh___finally_block : Error<
+ "%0 only allowed in __finally block">;
+
// Sema && AST
def note_invalid_subexpr_in_const_expr : Note<
"subexpression not valid in a constant expression">;
diff --git a/include/clang/Basic/DiagnosticDriverKinds.td b/include/clang/Basic/DiagnosticDriverKinds.td
index 41c78ee..7c0696a 100644
--- a/include/clang/Basic/DiagnosticDriverKinds.td
+++ b/include/clang/Basic/DiagnosticDriverKinds.td
@@ -142,6 +142,8 @@ def warn_drv_empty_joined_argument : Warning<
InGroup<UnusedCommandLineArgument>;
def warn_drv_clang_unsupported : Warning<
"the clang compiler does not support '%0'">;
+def warn_drv_deprecated_arg : Warning<
+ "argument '%0' is deprecated, use '%1' instead">, InGroup<Deprecated>;
def warn_drv_assuming_mfloat_abi_is : Warning<
"unknown platform, assuming -mfloat-abi=%0">;
def warn_ignoring_ftabstop_value : Warning<
@@ -160,6 +162,12 @@ def warn_missing_sysroot : Warning<"no such sysroot directory: '%0'">,
InGroup<DiagGroup<"missing-sysroot">>;
def warn_debug_compression_unavailable : Warning<"cannot compress debug sections (zlib not installed)">,
InGroup<DiagGroup<"debug-compression-unavailable">>;
+def warn_drv_enabling_rtti_with_exceptions : Warning<
+ "implicitly enabling rtti for exception handling">,
+ InGroup<DiagGroup<"rtti-for-exceptions">>;
+def warn_drv_disabling_vptr_no_rtti_default : Warning<
+ "implicitly disabling vptr sanitizer because rtti wasn't enabled">,
+ InGroup<DiagGroup<"auto-disable-vptr-sanitizer">>;
def note_drv_command_failed_diag_msg : Note<
"diagnostic msg: %0">;
@@ -179,4 +187,11 @@ def err_drv_modules_validate_once_requires_timestamp : Error<
def warn_drv_invoking_fallback : Warning<"falling back to %0">,
InGroup<Fallback>;
+
+def warn_target_unsupported_nan2008 : Warning<
+ "ignoring '-mnan=2008' option because the '%0' architecture does not support it">,
+ InGroup<UnsupportedNan>;
+def warn_target_unsupported_nanlegacy : Warning<
+ "ignoring '-mnan=legacy' option because the '%0' architecture does not support it">,
+ InGroup<UnsupportedNan>;
}
diff --git a/include/clang/Basic/DiagnosticFrontendKinds.td b/include/clang/Basic/DiagnosticFrontendKinds.td
index 15f74b11..f4ab480 100644
--- a/include/clang/Basic/DiagnosticFrontendKinds.td
+++ b/include/clang/Basic/DiagnosticFrontendKinds.td
@@ -35,6 +35,10 @@ def err_fe_backend_plugin: Error<"%0">, BackendInfo;
def remark_fe_backend_plugin: Remark<"%0">, BackendInfo, InGroup<RemarkBackendPlugin>;
def note_fe_backend_plugin: Note<"%0">, BackendInfo;
+def warn_fe_override_module : Warning<
+ "overriding the module target triple with %0">,
+ InGroup<DiagGroup<"override-module">>;
+
def remark_fe_backend_optimization_remark : Remark<"%0">, BackendInfo,
InGroup<BackendOptimizationRemark>;
def remark_fe_backend_optimization_remark_missed : Remark<"%0">, BackendInfo,
@@ -193,7 +197,11 @@ def err_conflicting_module_names : Error<
def err_conflicting_module_files : Error<
"module '%0' is defined in both '%1' and '%2'">;
def err_module_file_not_found : Error<
- "file '%0' is not a precompiled module file">, DefaultFatal;
+ "module file '%0' not found">, DefaultFatal;
+def err_module_file_invalid : Error<
+ "file '%0' is not a valid precompiled module file">, DefaultFatal;
+def note_module_file_imported_by : Note<
+ "imported by %select{|module '%2' in }1'%0'">;
def err_module_file_not_module : Error<
"AST file '%0' was not built as a module">, DefaultFatal;
diff --git a/include/clang/Basic/DiagnosticGroups.td b/include/clang/Basic/DiagnosticGroups.td
index 2681ada..61436ea 100644
--- a/include/clang/Basic/DiagnosticGroups.td
+++ b/include/clang/Basic/DiagnosticGroups.td
@@ -45,6 +45,7 @@ def IntConversion : DiagGroup<"int-conversion">;
def EnumConversion : DiagGroup<"enum-conversion">;
def FloatConversion : DiagGroup<"float-conversion">;
def EnumTooLarge : DiagGroup<"enum-too-large">;
+def UnsupportedNan : DiagGroup<"unsupported-nan">;
def NonLiteralNullConversion : DiagGroup<"non-literal-null-conversion">;
def NullConversion : DiagGroup<"null-conversion">;
def ImplicitConversionFloatingPointToBool :
@@ -80,6 +81,7 @@ def CXX11CompatDeprecatedWritableStr :
def DeprecatedDeclarations : DiagGroup<"deprecated-declarations">;
def UnavailableDeclarations : DiagGroup<"unavailable-declarations">;
+def PartialAvailability : DiagGroup<"partial-availability">;
def DeprecatedImplementations :DiagGroup<"deprecated-implementations">;
def DeprecatedIncrementBool : DiagGroup<"deprecated-increment-bool">;
def DeprecatedRegister : DiagGroup<"deprecated-register">;
@@ -106,6 +108,8 @@ def Documentation : DiagGroup<"documentation",
DocumentationDeprecatedSync]>;
def EmptyBody : DiagGroup<"empty-body">;
+def Exceptions : DiagGroup<"exceptions">;
+
def GNUEmptyInitializer : DiagGroup<"gnu-empty-initializer">;
def GNUEmptyStruct : DiagGroup<"gnu-empty-struct">;
def ExtraTokens : DiagGroup<"extra-tokens">;
@@ -190,6 +194,7 @@ def OverloadedShiftOpParentheses: DiagGroup<"overloaded-shift-op-parentheses">;
def DanglingElse: DiagGroup<"dangling-else">;
def DanglingField : DiagGroup<"dangling-field">;
def DistributedObjectModifiers : DiagGroup<"distributed-object-modifiers">;
+def FlagEnum : DiagGroup<"flag-enum">;
def InfiniteRecursion : DiagGroup<"infinite-recursion">;
def GNUImaginaryConstant : DiagGroup<"gnu-imaginary-constant">;
def IgnoredQualifiers : DiagGroup<"ignored-qualifiers">;
@@ -218,7 +223,10 @@ def GNULabelsAsValue : DiagGroup<"gnu-label-as-value">;
def LiteralRange : DiagGroup<"literal-range">;
def LocalTypeTemplateArgs : DiagGroup<"local-type-template-args",
[CXX98CompatLocalTypeTemplateArgs]>;
-def LoopAnalysis : DiagGroup<"loop-analysis">;
+def RangeLoopAnalysis : DiagGroup<"range-loop-analysis">;
+def ForLoopAnalysis : DiagGroup<"for-loop-analysis">;
+def LoopAnalysis : DiagGroup<"loop-analysis", [ForLoopAnalysis,
+ RangeLoopAnalysis]>;
def MalformedWarningCheck : DiagGroup<"malformed-warning-check">;
def Main : DiagGroup<"main">;
def MainReturnType : DiagGroup<"main-return-type">;
@@ -278,6 +286,7 @@ def DeprecatedObjCIsaUsage : DiagGroup<"deprecated-objc-isa-usage">;
def ExplicitInitializeCall : DiagGroup<"explicit-initialize-call">;
def Packed : DiagGroup<"packed">;
def Padded : DiagGroup<"padded">;
+def PessimizingMove : DiagGroup<"pessimizing-move">;
def PointerArith : DiagGroup<"pointer-arith">;
def PoundWarning : DiagGroup<"#warnings">;
def PoundPragmaMessage : DiagGroup<"#pragma-messages">,
@@ -286,6 +295,7 @@ def : DiagGroup<"pointer-to-int-cast">;
def : DiagGroup<"redundant-decls">;
def RedeclaredClassMember : DiagGroup<"redeclared-class-member">;
def GNURedeclaredEnum : DiagGroup<"gnu-redeclared-enum">;
+def RedundantMove : DiagGroup<"redundant-move">;
def ReturnStackAddress : DiagGroup<"return-stack-address">;
def ReturnTypeCLinkage : DiagGroup<"return-type-c-linkage">;
def ReturnType : DiagGroup<"return-type", [ReturnTypeCLinkage]>;
@@ -386,10 +396,12 @@ def IgnoredPragmas : DiagGroup<"ignored-pragmas">;
def Pragmas : DiagGroup<"pragmas", [UnknownPragmas, IgnoredPragmas]>;
def UnknownWarningOption : DiagGroup<"unknown-warning-option">;
def NSobjectAttribute : DiagGroup<"NSObject-attribute">;
+def IndependentClassAttribute : DiagGroup<"IndependentClass-attribute">;
def UnknownAttributes : DiagGroup<"unknown-attributes">;
def IgnoredAttributes : DiagGroup<"ignored-attributes">;
def Attributes : DiagGroup<"attributes", [UnknownAttributes,
IgnoredAttributes]>;
+def UnknownSanitizers : DiagGroup<"unknown-sanitizers">;
def UnnamedTypeTemplateArgs : DiagGroup<"unnamed-type-template-args",
[CXX98CompatUnnamedTypeTemplateArgs]>;
def UnsupportedFriend : DiagGroup<"unsupported-friend">;
@@ -550,6 +562,7 @@ def FormatInvalidSpecifier : DiagGroup<"format-invalid-specifier">;
def FormatSecurity : DiagGroup<"format-security">;
def FormatNonStandard : DiagGroup<"format-non-iso">;
def FormatY2K : DiagGroup<"format-y2k">;
+def FormatPedantic : DiagGroup<"format-pedantic">;
def Format : DiagGroup<"format",
[FormatExtraArgs, FormatZeroLength, NonNull,
FormatSecurity, FormatY2K, FormatInvalidSpecifier]>,
@@ -564,6 +577,8 @@ def IntToVoidPointerCast : DiagGroup<"int-to-void-pointer-cast">;
def IntToPointerCast : DiagGroup<"int-to-pointer-cast",
[IntToVoidPointerCast]>;
+def Move : DiagGroup<"move", [PessimizingMove, RedundantMove, SelfMove]>;
+
def Extra : DiagGroup<"extra", [
MissingFieldInitializers,
IgnoredQualifiers,
@@ -582,6 +597,7 @@ def Most : DiagGroup<"most", [
Implicit,
MismatchedTags,
MissingBraces,
+ Move,
MultiChar,
Reorder,
ReturnType,
diff --git a/include/clang/Basic/DiagnosticIDs.h b/include/clang/Basic/DiagnosticIDs.h
index 99b469d..a675dfa 100644
--- a/include/clang/Basic/DiagnosticIDs.h
+++ b/include/clang/Basic/DiagnosticIDs.h
@@ -34,7 +34,7 @@ namespace clang {
DIAG_START_LEX = DIAG_START_SERIALIZATION + 120,
DIAG_START_PARSE = DIAG_START_LEX + 300,
DIAG_START_AST = DIAG_START_PARSE + 500,
- DIAG_START_COMMENT = DIAG_START_AST + 100,
+ DIAG_START_COMMENT = DIAG_START_AST + 110,
DIAG_START_SEMA = DIAG_START_COMMENT + 100,
DIAG_START_ANALYSIS = DIAG_START_SEMA + 3000,
DIAG_UPPER_LIMIT = DIAG_START_ANALYSIS + 100
diff --git a/include/clang/Basic/DiagnosticLexKinds.td b/include/clang/Basic/DiagnosticLexKinds.td
index 93cc7c2..3d568e8 100644
--- a/include/clang/Basic/DiagnosticLexKinds.td
+++ b/include/clang/Basic/DiagnosticLexKinds.td
@@ -579,7 +579,9 @@ def err_mmap_module_id : Error<
def err_mmap_expected_library_name : Error<
"expected %select{library|framework}0 name as a string">;
def err_mmap_config_macro_submodule : Error<
- "configuration macros are only allowed on top-level modules">;
+ "configuration macros are only allowed in top-level modules">;
+def err_mmap_use_decl_submodule : Error<
+ "use declarations are only allowed in top-level modules">;
def err_mmap_expected_config_macro : Error<
"expected configuration macro name after ','">;
def err_mmap_expected_conflicts_comma : Error<
@@ -625,9 +627,10 @@ def warn_uncovered_module_header : Warning<
InGroup<IncompleteUmbrella>;
def err_expected_id_building_module : Error<
"expected a module name in '__building_module' expression">;
-def error_use_of_private_header_outside_module : Error<
- "use of private header from outside its module: '%0'">;
-def error_undeclared_use_of_module : Error<
+def warn_use_of_private_header_outside_module : Warning<
+ "use of private header from outside its module: '%0'">,
+ InGroup<DiagGroup<"private-header">>, DefaultError;
+def err_undeclared_use_of_module : Error<
"module %0 does not depend on a module exporting '%1'">;
def warn_non_modular_include_in_framework_module : Warning<
"include of non-modular header inside framework module '%0'">,
@@ -635,7 +638,9 @@ def warn_non_modular_include_in_framework_module : Warning<
def warn_non_modular_include_in_module : Warning<
"include of non-modular header inside module '%0'">,
InGroup<NonModularIncludeInModule>, DefaultIgnore;
-
+def warn_module_conflict : Warning<
+ "module '%0' conflicts with already-imported module '%1': %2">,
+ InGroup<ModuleConflict>;
def warn_header_guard : Warning<
"%0 is used as a header guard here, followed by #define of a different macro">,
diff --git a/include/clang/Basic/DiagnosticOptions.h b/include/clang/Basic/DiagnosticOptions.h
index 058e00f..a16c774 100644
--- a/include/clang/Basic/DiagnosticOptions.h
+++ b/include/clang/Basic/DiagnosticOptions.h
@@ -27,7 +27,7 @@ enum OverloadsShown : unsigned {
/// \brief Options for controlling the compiler diagnostics engine.
class DiagnosticOptions : public RefCountedBase<DiagnosticOptions>{
public:
- enum TextDiagnosticFormat { Clang, Msvc, Vi };
+ enum TextDiagnosticFormat { Clang, MSVC, Vi };
// Default values.
enum { DefaultTabStop = 8, MaxTabStop = 100,
diff --git a/include/clang/Basic/DiagnosticParseKinds.td b/include/clang/Basic/DiagnosticParseKinds.td
index eca5f13..f00a3b3 100644
--- a/include/clang/Basic/DiagnosticParseKinds.td
+++ b/include/clang/Basic/DiagnosticParseKinds.td
@@ -25,6 +25,8 @@ def err_msasm_unsupported_arch : Error<
"Unsupported architecture '%0' for MS-style inline assembly">;
def err_msasm_unable_to_create_target : Error<
"MS-style inline assembly is not available: %0">;
+def err_gnu_inline_asm_disabled : Error<
+ "GNU-style inline assembly is disabled">;
}
let CategoryName = "Parse Issue" in {
@@ -168,6 +170,7 @@ def err_function_declared_typedef : Error<
"function definition declared 'typedef'">;
def err_at_defs_cxx : Error<"@defs is not supported in Objective-C++">;
def err_at_in_class : Error<"unexpected '@' in member specification">;
+def err_unexpected_semi : Error<"unexpected ';' before %0">;
def err_expected_fn_body : Error<
"expected function body after function declarator">;
@@ -181,6 +184,8 @@ def warn_attribute_no_decl : Warning<
"attribute %0 ignored, because it is not attached to a declaration">,
InGroup<IgnoredAttributes>;
def err_expected_method_body : Error<"expected method body">;
+def err_declspec_after_virtspec : Error<
+ "'%0' qualifier may not appear after the virtual specifier '%1'">;
def err_invalid_token_after_toplevel_declarator : Error<
"expected ';' after top level declarator">;
def err_invalid_token_after_declarator_suggest_equal : Error<
@@ -350,7 +355,12 @@ def err_invalid_pixel_decl_spec_combination : Error<
def err_invalid_vector_bool_decl_spec : Error<
"cannot use '%0' with '__vector bool'">;
def err_invalid_vector_double_decl_spec : Error <
- "use of 'double' with '__vector' requires VSX support to be enabled (available on the POWER7 or later)">;
+ "use of 'double' with '__vector' requires VSX support to be enabled "
+ "(available on POWER7 or later)">;
+def err_invalid_vector_long_long_decl_spec : Error <
+ "use of 'long long' with '__vector bool' requires VSX support (available on "
+ "POWER7 or later) or extended Altivec support (available on POWER8 or later) "
+ "to be enabled">;
def err_invalid_vector_long_double_decl_spec : Error<
"cannot use 'long double' with '__vector'">;
def warn_vector_long_decl_spec_combination : Warning<
@@ -468,7 +478,8 @@ def err_invalid_operator_on_type : Error<
def err_expected_unqualified_id : Error<
"expected %select{identifier|unqualified-id}0">;
def err_brackets_go_after_unqualified_id : Error<
- "brackets go after the %select{identifier|unqualified-id}0">;
+ "brackets are not allowed here; to declare an array, "
+ "place the brackets after the %select{identifier|name}0">;
def err_unexpected_unqualified_id : Error<"type-id cannot have a name">;
def err_func_def_no_params : Error<
"function definition does not declare parameters">;
@@ -924,6 +935,9 @@ def err_pragma_fp_contract_scope : Error<
def err_pragma_comment_malformed : Error<
"pragma comment requires parenthesized identifier and optional string">;
def err_pragma_comment_unknown_kind : Error<"unknown kind of pragma comment">;
+// PS4 recognizes only #pragma comment(lib)
+def warn_pragma_comment_ignored : Warning<"'#pragma comment %0' ignored">,
+ InGroup<Microsoft>;
// - #pragma detect_mismatch
def err_pragma_detect_mismatch_malformed : Error<
"pragma detect_mismatch is malformed; it requires two comma-separated "
@@ -951,18 +965,6 @@ def warn_pragma_expected_enable_disable : Warning<
def warn_pragma_unknown_extension : Warning<
"unknown OpenCL extension %0 - ignoring">, InGroup<IgnoredPragmas>;
-def err_seh_expected_handler : Error<
- "expected '__except' or '__finally' block">;
-
-def err_seh___except_block : Error<
- "%0 only allowed in __except block">;
-
-def err_seh___except_filter : Error<
- "%0 only allowed in __except filter expression">;
-
-def err_seh___finally_block : Error<
- "%0 only allowed in __finally block">;
-
// OpenMP support.
def warn_pragma_omp_ignored : Warning<
"unexpected '#pragma omp ...' in program">, InGroup<SourceUsesOpenMP>, DefaultIgnore;
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 1a27e7c..9ccd5ad 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -1,3 +1,4 @@
+
//==--- DiagnosticSemaKinds.td - libsema diagnostics ----------------------===//
//
// The LLVM Compiler Infrastructure
@@ -23,13 +24,30 @@ def note_defined_here : Note<"%0 defined here">;
def warn_variables_not_in_loop_body : Warning<
"variable%select{s| %1|s %1 and %2|s %1, %2, and %3|s %1, %2, %3, and %4}0 "
"used in loop condition not modified in loop body">,
- InGroup<LoopAnalysis>, DefaultIgnore;
+ InGroup<ForLoopAnalysis>, DefaultIgnore;
def warn_redundant_loop_iteration : Warning<
"variable %0 is %select{decremented|incremented}1 both in the loop header "
"and in the loop body">,
- InGroup<LoopAnalysis>, DefaultIgnore;
+ InGroup<ForLoopAnalysis>, DefaultIgnore;
def note_loop_iteration_here : Note<"%select{decremented|incremented}0 here">;
+def warn_for_range_const_reference_copy : Warning<
+ "loop variable %0 "
+ "%diff{has type $ but is initialized with type $"
+ "| is initialized with a value of a different type}1,2 resulting in a copy">,
+ InGroup<RangeLoopAnalysis>, DefaultIgnore;
+def note_use_type_or_non_reference : Note<
+ "use non-reference type %0 to keep the copy or type %1 to prevent copying">;
+def warn_for_range_variable_always_copy : Warning<
+ "loop variable %0 is always a copy because the range of type %1 does not "
+ "return a reference">,
+ InGroup<RangeLoopAnalysis>, DefaultIgnore;
+def note_use_non_reference_type : Note<"use non-reference type %0">;
+def warn_for_range_copy : Warning<
+ "loop variable %0 of type %1 creates a copy from type %2">,
+ InGroup<RangeLoopAnalysis>, DefaultIgnore;
+def note_use_reference_type : Note<"use reference type %0 to prevent copying">;
+
def warn_duplicate_enum_values : Warning<
"element %0 has been implicitly assigned %1 which another element has "
"been assigned">, InGroup<DiagGroup<"duplicate-enum">>, DefaultIgnore;
@@ -467,6 +485,8 @@ def warn_static_main : Warning<"'main' should not be declared static">,
InGroup<Main>;
def err_static_main : Error<"'main' is not allowed to be declared static">;
def err_inline_main : Error<"'main' is not allowed to be declared inline">;
+def ext_variadic_main : ExtWarn<
+ "'main' is not allowed to be declared variadic">, InGroup<Main>;
def ext_noreturn_main : ExtWarn<
"'main' is not allowed to be declared _Noreturn">, InGroup<Main>;
def note_main_remove_noreturn : Note<"remove '_Noreturn'">;
@@ -730,7 +750,7 @@ def warn_accessor_property_type_mismatch : Warning<
def not_conv_function_declared_at : Note<"type conversion function declared here">;
def note_method_declared_at : Note<"method %0 declared here">;
def note_property_attribute : Note<"property %0 is declared "
- "%select{deprecated|unavailable}1 here">;
+ "%select{deprecated|unavailable|partial}1 here">;
def err_setter_type_void : Error<"type of setter must be void">;
def err_duplicate_method_decl : Error<"duplicate declaration of method %0">;
def warn_duplicate_method_decl :
@@ -797,6 +817,12 @@ def warn_cocoa_naming_owned_rule : Warning<
"property follows Cocoa naming"
" convention for returning 'owned' objects">,
InGroup<DiagGroup<"objc-property-matches-cocoa-ownership-rule">>;
+def err_cocoa_naming_owned_rule : Error<
+ "property follows Cocoa naming"
+ " convention for returning 'owned' objects">;
+def note_cocoa_naming_declare_family : Note<
+ "explicitly declare getter %objcinstance0 with '%1' to return an 'unowned' "
+ "object">;
def warn_auto_synthesizing_protocol_property :Warning<
"auto property synthesis will not synthesize property %0"
" declared in protocol %1">,
@@ -828,9 +854,6 @@ def warn_property_getter_owning_mismatch : Warning<
def error_property_setter_ambiguous_use : Error<
"synthesized properties %0 and %1 both claim setter %2 -"
" use of this setter will cause unexpected behavior">;
-def err_cocoa_naming_owned_rule : Error<
- "property follows Cocoa naming"
- " convention for returning 'owned' objects">;
def warn_default_atomic_custom_getter_setter : Warning<
"atomic by default property %0 has a user defined %select{getter|setter}1 "
"(property should be marked 'atomic' if this is intended)">,
@@ -889,8 +912,6 @@ def warn_receiver_is_weak : Warning <
"weak %select{receiver|property|implicit property}0 may be "
"unpredictably set to nil">,
InGroup<DiagGroup<"receiver-is-weak">>, DefaultIgnore;
-def note_arc_assign_to_strong : Note<
- "assign the value to a strong variable to keep the object alive during use">;
def warn_arc_repeated_use_of_weak : Warning <
"weak %select{variable|property|implicit property|instance variable}0 %1 is "
"accessed multiple times in this %select{function|method|block|lambda}2 "
@@ -1227,13 +1248,19 @@ def warn_cxx98_compat_enum_nested_name_spec : Warning<
InGroup<CXX98Compat>, DefaultIgnore;
def err_nested_name_spec_is_not_class : Error<
"%0 cannot appear before '::' because it is not a class"
- "%select{ or namespace|, namespace, or scoped enumeration}1; did you mean ':'?">;
+ "%select{ or namespace|, namespace, or enumeration}1; did you mean ':'?">;
+def ext_nested_name_spec_is_enum : ExtWarn<
+ "use of enumeration in a nested name specifier is a C++11 extension">,
+ InGroup<CXX11>;
// C++ class members
def err_storageclass_invalid_for_member : Error<
"storage class specified for a member declaration">;
def err_mutable_function : Error<"'mutable' cannot be applied to functions">;
def err_mutable_reference : Error<"'mutable' cannot be applied to references">;
+def ext_mutable_reference : ExtWarn<
+ "'mutable' on a reference type is a Microsoft extension">,
+ InGroup<Microsoft>;
def err_mutable_const : Error<"'mutable' and 'const' cannot be mixed">;
def err_mutable_nonmember : Error<
"'mutable' can only be applied to member variables">;
@@ -1292,6 +1319,8 @@ def err_missing_default_ctor : Error<
"%select{|implicit default |inheriting }0constructor for %1 must explicitly "
"initialize the %select{base class|member}2 %3 which does not have a default "
"constructor">;
+def note_due_to_dllexported_class : Note<
+ "due to '%0' being dllexported%select{|; try compiling in C++11 mode}1">;
def err_illegal_union_or_anon_struct_member : Error<
"%select{anonymous struct|union}0 member %1 has a non-trivial "
@@ -1461,8 +1490,10 @@ def err_lvalue_reference_bind_to_unrelated : Error<
"%diff{to type $ cannot bind to a value of unrelated type $|"
"cannot bind to a value of unrelated type}1,2">;
def err_reference_bind_drops_quals : Error<
- "binding of reference %diff{to type $ to a value of type $ drops qualifiers|"
- "drops qualifiers}0,1">;
+ "binding value %diff{of type $ to reference to type $|to reference}0,1 "
+ "drops %select{<<ERROR>>|'const'|'restrict'|'const' and 'restrict'|"
+ "'volatile'|'const' and 'volatile'|'restrict' and 'volatile'|"
+ "'const', 'restrict', and 'volatile'}2 qualifier%plural{1:|2:|4:|:s}2">;
def err_reference_bind_failed : Error<
"reference %diff{to type $ could not bind to an %select{rvalue|lvalue}1 of "
"type $|could not bind to %select{rvalue|lvalue}1 of incompatible type}0,2">;
@@ -1543,7 +1574,7 @@ def warn_uninit_byref_blockvar_captured_by_block : Warning<
"block pointer variable %0 is uninitialized when captured by block">,
InGroup<Uninitialized>, DefaultIgnore;
def note_block_var_fixit_add_initialization : Note<
- "maybe you meant to use __block %0">;
+ "did you mean to use __block %0?">;
def note_in_omitted_aggregate_initializer : Note<
"in implicit initialization of %select{array element %1|field %1}0 "
"with omitted initializer">;
@@ -2025,6 +2056,8 @@ def err_typecheck_vector_not_convertable : Error<
"can't convert between vector values of different size (%0 and %1)">;
def err_typecheck_vector_not_convertable_non_scalar : Error<
"can't convert between vector and non-scalar values (%0 and %1)">;
+def err_typecheck_vector_lengths_not_equal : Error<
+ "vector operands do not have the same number of elements (%0 and %1)">;
def err_ext_vector_component_exceeds_length : Error<
"vector component access exceeds type %0">;
def err_ext_vector_component_name_illegal : Error<
@@ -2091,6 +2124,9 @@ def note_objc_literal_comparison_isequal : Note<
"use 'isEqual:' instead">;
def err_attribute_argument_is_zero : Error<
"%0 attribute must be greater than 0">;
+def warn_attribute_argument_n_negative : Warning<
+ "%0 attribute parameter %1 is negative and will be ignored">,
+ InGroup<CudaCompat>;
def err_property_function_in_objc_container : Error<
"use of Objective-C property in function nested in Objective-C "
"container not supported, move function outside its container">;
@@ -2122,6 +2158,8 @@ def error_cannot_find_suitable_accessor : Error<
def err_alignment_not_power_of_two : Error<
"requested alignment is not a power of 2">;
+def err_alignment_dependent_typedef_name : Error<
+ "requested alignment is dependent but declaration is not dependent">;
def err_attribute_aligned_too_great : Error<
"requested alignment must be %0 bytes or smaller">;
@@ -2169,6 +2207,14 @@ def warn_gc_attribute_weak_on_local : Warning<
def warn_nsobject_attribute : Warning<
"'NSObject' attribute may be put on a typedef only; attribute is ignored">,
InGroup<NSobjectAttribute>;
+def warn_independentclass_attribute : Warning<
+ "'objc_independent_class' attribute may be put on a typedef only; "
+ "attribute is ignored">,
+ InGroup<IndependentClassAttribute>;
+def warn_ptr_independentclass_attribute : Warning<
+ "'objc_independent_class' attribute may be put on Objective-C object "
+ "pointer type only; attribute is ignored">,
+ InGroup<IndependentClassAttribute>;
def warn_attribute_weak_on_local : Warning<
"__weak attribute cannot be specified on an automatic variable when ARC "
"is not enabled">,
@@ -2205,6 +2251,9 @@ def err_attribute_dllimport_static_field_definition : Error<
def warn_attribute_dllimport_static_field_definition : Warning<
"definition of dllimport static field">,
InGroup<DiagGroup<"dllimport-static-field-def">>;
+def warn_attribute_dllexport_explicit_instantiation_decl : Warning<
+ "explicit instantiation declaration should not be 'dllexport'">,
+ InGroup<DiagGroup<"dllexport-explicit-instantation-decl">>;
def warn_invalid_initializer_from_system_header : Warning<
"invalid constructor form class in system header, should not be explicit">,
InGroup<DiagGroup<"invalid-initializer-from-system-header">>;
@@ -2240,7 +2289,7 @@ def warn_attribute_wrong_decl_type : Warning<
"%0 attribute only applies to %select{functions|unions|"
"variables and functions|functions and methods|parameters|"
"functions, methods and blocks|functions, methods, and classes|"
- "functions, methods, and parameters|classes|variables|methods|"
+ "functions, methods, and parameters|classes|enums|variables|methods|"
"variables, functions and labels|fields and global variables|structs|"
"variables and typedefs|thread-local variables|"
"variables and fields|variables, data members and tag types|"
@@ -2248,7 +2297,7 @@ def warn_attribute_wrong_decl_type : Warning<
"struct or union|struct, union or class|types|"
"Objective-C instance methods|init methods of interface or class extension declarations|"
"variables, functions and classes|Objective-C protocols|"
- "functions and global variables|structs or typedefs|"
+ "functions and global variables|structs, unions, and typedefs|structs and typedefs|"
"interface or protocol declarations|kernel functions}1">,
InGroup<IgnoredAttributes>;
def err_attribute_wrong_decl_type : Error<warn_attribute_wrong_decl_type.Text>;
@@ -2388,6 +2437,13 @@ def warn_fun_excludes_mutex : Warning<
def warn_cannot_resolve_lock : Warning<
"cannot resolve lock expression">,
InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
+def warn_acquired_before : Warning<
+ "%0 '%1' must be acquired before '%2'">,
+ InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
+def warn_acquired_before_after_cycle : Warning<
+ "Cycle in acquired_before/after dependencies, starting with '%0'">,
+ InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
+
// Thread safety warnings negative capabilities
def warn_acquire_requires_negative_cap : Warning<
@@ -2465,6 +2521,10 @@ def warn_param_typestate_mismatch : Warning<
"argument not in expected state; expected '%0', observed '%1'">,
InGroup<Consumed>, DefaultIgnore;
+// no_sanitize attribute
+def warn_unknown_sanitizer_ignored : Warning<
+ "unknown sanitizer '%0' ignored">, InGroup<UnknownSanitizers>;
+
def warn_impcast_vector_scalar : Warning<
"implicit conversion turns vector to scalar: %0 to %1">,
InGroup<Conversion>, DefaultIgnore;
@@ -2633,9 +2693,6 @@ def warn_attribute_nonnull_no_pointers : Warning<
def warn_attribute_nonnull_parm_no_args : Warning<
"'nonnull' attribute when used on parameters takes no arguments">,
InGroup<IgnoredAttributes>;
-def warn_attribute_malloc_pointer_only : Warning<
- "'malloc' attribute only applies to functions returning a pointer type">,
- InGroup<IgnoredAttributes>;
def warn_attribute_sentinel_named_arguments : Warning<
"'sentinel' attribute requires named arguments">,
InGroup<IgnoredAttributes>;
@@ -2728,6 +2785,10 @@ def warn_objc_implementation_missing_designated_init_override : Warning<
// objc_bridge attribute diagnostics.
def err_objc_attr_not_id : Error<
"parameter of %0 attribute must be a single name of an Objective-C %select{class|protocol}1">;
+def err_objc_attr_typedef_not_id : Error<
+ "parameter of %0 attribute must be 'id' when used on a typedef">;
+def err_objc_attr_typedef_not_void_pointer : Error<
+ "'objc_bridge(id)' is only allowed on structs and typedefs of void pointers">;
def err_objc_cf_bridged_not_interface : Error<
"CF object of type %0 is bridged to %1, which is not an Objective-C class">;
def err_objc_ns_bridged_invalid_cfobject : Error<
@@ -2785,6 +2846,8 @@ def err_param_default_argument_member_template_redecl : Error<
"default arguments cannot be added to an out-of-line definition of a member "
"of a %select{class template|class template partial specialization|nested "
"class in a template}0">;
+def err_param_default_argument_on_parameter_pack : Error<
+ "parameter pack cannot have a default argument">;
def err_uninitialized_member_for_assign : Error<
"cannot define the implicit copy assignment operator for %0, because "
"non-static %select{reference|const}1 member %2 can't use copy "
@@ -3424,6 +3487,12 @@ def err_template_spec_redecl_out_of_scope : Error<
"variable template partial|function template|member "
"function|static data member|member class|member enumeration}0 "
"specialization of %1 not in a namespace enclosing %2">;
+def ext_ms_template_spec_redecl_out_of_scope: ExtWarn<
+ "%select{class template|class template partial|variable template|"
+ "variable template partial|function template|member "
+ "function|static data member|member class|member enumeration}0 "
+ "specialization of %1 outside namespace enclosing %2 "
+ "is a Microsoft extension">, InGroup<Microsoft>;
def err_template_spec_redecl_global_scope : Error<
"%select{class template|class template partial|variable template|"
"variable template partial|function template|member "
@@ -3770,34 +3839,14 @@ def note_template_parameter_pack_here : Note<
"previous %select{template type|non-type template|template template}0 "
"parameter%select{| pack}1 declared here">;
-def err_unexpanded_parameter_pack_0 : Error<
- "%select{expression|base type|declaration type|data member type|bit-field "
- "size|static assertion|fixed underlying type|enumerator value|"
- "using declaration|friend declaration|qualifier|initializer|default argument|"
- "non-type template parameter type|exception type|partial specialization|"
- "__if_exists name|__if_not_exists name|lambda|block}0 "
- "contains an unexpanded parameter pack">;
-def err_unexpanded_parameter_pack_1 : Error<
+def err_unexpanded_parameter_pack : Error<
"%select{expression|base type|declaration type|data member type|bit-field "
"size|static assertion|fixed underlying type|enumerator value|"
"using declaration|friend declaration|qualifier|initializer|default argument|"
"non-type template parameter type|exception type|partial specialization|"
- "__if_exists name|__if_not_exists name|lambda|block}0 "
- "contains unexpanded parameter pack %1">;
-def err_unexpanded_parameter_pack_2 : Error<
- "%select{expression|base type|declaration type|data member type|bit-field "
- "size|static assertion|fixed underlying type|enumerator value|"
- "using declaration|friend declaration|qualifier|initializer|default argument|"
- "non-type template parameter type|exception type|partial specialization|"
- "__if_exists name|__if_not_exists name|lambda|block}0 "
- "contains unexpanded parameter packs %1 and %2">;
-def err_unexpanded_parameter_pack_3_or_more : Error<
- "%select{expression|base type|declaration type|data member type|bit-field "
- "size|static assertion|fixed underlying type|enumerator value|"
- "using declaration|friend declaration|qualifier|initializer|default argument|"
- "non-type template parameter type|exception type|partial specialization|"
- "__if_exists name|__if_not_exists name|lambda|block}0 "
- "contains unexpanded parameter packs %1, %2, ...">;
+ "__if_exists name|__if_not_exists name|lambda|block}0 contains"
+ "%plural{0: an|:}1 unexpanded parameter pack"
+ "%plural{0:|1: %2|2:s %2 and %3|:s %2, %3, ...}1">;
def err_pack_expansion_without_parameter_packs : Error<
"pack expansion does not contain any unexpanded parameter packs">;
@@ -3846,6 +3895,15 @@ def err_not_found_by_two_phase_lookup : Error<"call to function %0 that is neith
def note_not_found_by_two_phase_lookup : Note<"%0 should be declared prior to the "
"call site%select{| or in %2| or in an associated namespace of one of its arguments}1">;
def err_undeclared_use : Error<"use of undeclared %0">;
+def warn_partial_availability : Warning<"%0 is only available conditionally">,
+ InGroup<PartialAvailability>, DefaultIgnore;
+def note_partial_availability_silence : Note<
+ "explicitly redeclare %0 to silence this warning">;
+def warn_partial_message : Warning<"%0 is partial: %1">,
+ InGroup<PartialAvailability>, DefaultIgnore;
+def warn_partial_fwdclass_message : Warning<
+ "%0 may be partial because the receiver type is unknown">,
+ InGroup<PartialAvailability>, DefaultIgnore;
def warn_deprecated : Warning<"%0 is deprecated">,
InGroup<DeprecatedDeclarations>;
def warn_property_method_deprecated :
@@ -3871,7 +3929,7 @@ def warn_unavailable_fwdclass_message : Warning<
InGroup<UnavailableDeclarations>;
def note_availability_specified_here : Note<
"%0 has been explicitly marked "
- "%select{unavailable|deleted|deprecated}1 here">;
+ "%select{unavailable|deleted|deprecated|partial}1 here">;
def note_implicitly_deleted : Note<
"explicitly defaulted function was implicitly deleted here">;
def note_inherited_deleted_here : Note<
@@ -3899,8 +3957,8 @@ def err_static_data_member_reinitialization :
def err_redefinition : Error<"redefinition of %0">;
def err_alias_after_tentative :
Error<"alias definition of %0 after tentative definition">;
-def err_tentative_after_alias :
- Error<"tentative definition of %0 after alias definition">;
+def err_alias_is_definition :
+ Error<"definition %0 cannot also be an alias">;
def err_definition_of_implicitly_declared_member : Error<
"definition of implicitly declared %select{default constructor|copy "
"constructor|move constructor|copy assignment operator|move assignment "
@@ -4063,6 +4121,9 @@ def ext_enum_too_large : ExtWarn<
def ext_enumerator_increment_too_large : ExtWarn<
"incremented enumerator value %0 is not representable in the "
"largest integer type">, InGroup<EnumTooLarge>;
+def warn_flag_enum_constant_out_of_range : Warning<
+ "enumeration value %0 is out of range of flags in enumeration type %1">,
+ InGroup<FlagEnum>;
def warn_illegal_constant_array_size : Extension<
"size of static array must be an integer constant expression">;
@@ -4100,8 +4161,11 @@ def err_typecheck_negative_array_size : Error<"array size is negative">;
def warn_typecheck_negative_array_new_size : Warning<"array size is negative">,
// FIXME PR11644: ", will throw std::bad_array_new_length at runtime"
InGroup<BadArrayNewLength>;
-def warn_typecheck_function_qualifiers : Warning<
- "qualifier on function type %0 has unspecified behavior">;
+def warn_typecheck_function_qualifiers_ignored : Warning<
+ "'%0' qualifier on function type %1 has no effect">,
+ InGroup<IgnoredQualifiers>;
+def warn_typecheck_function_qualifiers_unspecified : Warning<
+ "'%0' qualifier on function type %1 has unspecified behavior">;
def warn_typecheck_reference_qualifiers : Warning<
"'%0' qualifier on reference type %1 has no effect">,
InGroup<IgnoredQualifiers>;
@@ -4147,9 +4211,10 @@ def warn_missing_field_initializers : Warning<
"missing field %0 initializer">,
InGroup<MissingFieldInitializers>, DefaultIgnore;
def warn_braces_around_scalar_init : Warning<
- "braces around scalar initializer">;
+ "braces around scalar initializer">, InGroup<DiagGroup<"braced-scalar-init">>;
def ext_many_braces_around_scalar_init : ExtWarn<
- "too many braces around scalar initializer">;
+ "too many braces around scalar initializer">,
+ InGroup<DiagGroup<"many-braces-around-scalar-init">>;
def ext_complex_component_init : Extension<
"complex initialization specifying real and imaginary components "
"is an extension">, InGroup<DiagGroup<"complex-component-init">>;
@@ -4278,6 +4343,12 @@ def note_protected_by_cxx_try : Note<
"jump bypasses initialization of try block">;
def note_protected_by_cxx_catch : Note<
"jump bypasses initialization of catch block">;
+def note_protected_by_seh_try : Note<
+ "jump bypasses initialization of __try block">;
+def note_protected_by_seh_except : Note<
+ "jump bypasses initialization of __except block">;
+def note_protected_by_seh_finally : Note<
+ "jump bypasses initialization of __finally block">;
def note_protected_by___block : Note<
"jump bypasses setup of __block variable">;
def note_protected_by_objc_ownership : Note<
@@ -4310,6 +4381,12 @@ def note_exits_cxx_try : Note<
"jump exits try block">;
def note_exits_cxx_catch : Note<
"jump exits catch block">;
+def note_exits_seh_try : Note<
+ "jump exits __try block">;
+def note_exits_seh_except : Note<
+ "jump exits __except block">;
+def note_exits_seh_finally : Note<
+ "jump exits __finally block">;
def note_exits_objc_autoreleasepool : Note<
"jump exits autoreleasepool block">;
def note_exits_objc_ownership : Note<
@@ -4321,6 +4398,9 @@ def note_exits_block_captures_strong : Note<
def note_exits_block_captures_weak : Note<
"jump exits lifetime of block which weakly captures a variable">;
+def err_func_returning_qualified_void : ExtWarn<
+ "function cannot return qualified void type %0">,
+ InGroup<DiagGroup<"qualified-void-return-type">>;
def err_func_returning_array_function : Error<
"function cannot return %select{array|function}0 type %1">;
def err_field_declared_as_function : Error<"field %0 declared as a function">;
@@ -4706,6 +4786,17 @@ def warn_self_move : Warning<
"explicitly moving variable of type %0 to itself">,
InGroup<SelfMove>, DefaultIgnore;
+def warn_redundant_move_on_return : Warning<
+ "redundant move in return statement">,
+ InGroup<RedundantMove>, DefaultIgnore;
+def warn_pessimizing_move_on_return : Warning<
+ "moving a local object in a return statement prevents copy elision">,
+ InGroup<PessimizingMove>, DefaultIgnore;
+def warn_pessimizing_move_on_initialization : Warning<
+ "moving a temporary object prevents copy elision">,
+ InGroup<PessimizingMove>, DefaultIgnore;
+def note_remove_move : Note<"remove std::move call here">;
+
def warn_string_plus_int : Warning<
"adding %0 to a string does not append to the string">,
InGroup<StringPlusInt>;
@@ -4761,7 +4852,7 @@ def error_arc_weak_ivar_access : Error<
def err_typecheck_member_reference_arrow : Error<
"member reference type %0 is not a pointer">;
def err_typecheck_member_reference_suggestion : Error<
- "member reference type %0 is %select{a|not a}1 pointer; maybe you meant to use '%select{->|.}1'?">;
+ "member reference type %0 is %select{a|not a}1 pointer; did you mean to use '%select{->|.}1'?">;
def note_typecheck_member_reference_suggestion : Note<
"did you mean to use '.' instead?">;
def note_member_reference_arrow_from_operator_arrow : Note<
@@ -4849,6 +4940,8 @@ def err_ivar_reference_type : Error<
"instance variables cannot be of reference type">;
def err_typecheck_illegal_increment_decrement : Error<
"cannot %select{decrement|increment}1 value of type %0">;
+def err_typecheck_expect_int : Error<
+ "used type %0 where integer is required">;
def err_typecheck_arithmetic_incomplete_type : Error<
"arithmetic on a pointer to an incomplete type %0">;
def err_typecheck_pointer_arith_function_type : Error<
@@ -4937,7 +5030,7 @@ def err_typecheck_unary_expr : Error<
"invalid argument type %0 to unary expression">;
def err_typecheck_indirection_requires_pointer : Error<
"indirection requires pointer operand (%0 invalid)">;
-def ext_typecheck_indirection_through_void_pointer : Extension<
+def ext_typecheck_indirection_through_void_pointer : ExtWarn<
"ISO C++ does not allow indirection on operand of type %0">,
InGroup<DiagGroup<"void-ptr-dereference">>;
def warn_indirection_through_null : Warning<
@@ -4987,7 +5080,23 @@ def err_typecheck_op_on_nonoverlapping_address_space_pointers : Error<
"%select{comparison between %diff{ ($ and $)|}0,1"
"|arithmetic operation with operands of type %diff{ ($ and $)|}0,1}2"
" which are pointers to non-overlapping address spaces">;
-def err_typecheck_assign_const : Error<"read-only variable is not assignable">;
+
+def err_typecheck_assign_const : Error<
+ "%select{"
+ "cannot assign to return value because function %1 returns a const value|"
+ "cannot assign to variable %1 with const-qualified type %2|"
+ "cannot assign to %select{non-|}1static data member %2 "
+ "with const-qualified type %3|"
+ "cannot assign to non-static data member within const member function %1|"
+ "read-only variable is not assignable}0">;
+
+def note_typecheck_assign_const : Note<
+ "%select{"
+ "function %1 which returns const-qualified type %2 declared here|"
+ "variable %1 declared const here|"
+ "%select{non-|}1static data member %2 declared const here|"
+ "member function %q1 is declared const here}0">;
+
def warn_mixed_sign_comparison : Warning<
"comparison of integers of different signs: %0 and %1">,
InGroup<SignCompare>, DefaultIgnore;
@@ -5012,6 +5121,9 @@ def warn_null_in_comparison_operation : Warning<
"comparison between NULL and non-pointer "
"%select{(%1 and NULL)|(NULL and %1)}0">,
InGroup<NullArithmetic>;
+def err_shift_rhs_only_vector : Error<
+ "requested shift is a vector of type %0 but the first operand is not a "
+ "vector (%1)">;
def warn_logical_not_on_lhs_of_comparison : Warning<
"logical not is only applied to the left hand side of this comparison">,
@@ -5214,6 +5326,10 @@ def err_objc_object_catch : Error<
"can't catch an Objective-C object by value">;
def err_incomplete_type_objc_at_encode : Error<
"'@encode' of incomplete type %0">;
+def warn_objc_circular_container : Warning<
+ "adding '%0' to '%0' might cause circular dependency in container">,
+ InGroup<DiagGroup<"objc-circular-container">>;
+def note_objc_circular_container_declared_here : Note<"'%0' declared here">;
def warn_setter_getter_impl_required : Warning<
"property %0 requires method %1 to be defined - "
@@ -5255,6 +5371,11 @@ def err_bad_cstyle_cast_overload : Error<
def err_bad_cxx_cast_generic : Error<
"%select{const_cast|static_cast|reinterpret_cast|dynamic_cast|C-style cast|"
"functional-style cast}0 from %1 to %2 is not allowed">;
+def err_bad_cxx_cast_unrelated_class : Error<
+ "%select{const_cast|static_cast|reinterpret_cast|dynamic_cast|C-style cast|"
+ "functional-style cast}0 from %1 to %2, which are not related by "
+ "inheritance, is not allowed">;
+def note_type_incomplete : Note<"%0 is incomplete">;
def err_bad_cxx_cast_rvalue : Error<
"%select{const_cast|static_cast|reinterpret_cast|dynamic_cast|C-style cast|"
"functional-style cast}0 from rvalue to reference type %2">;
@@ -5374,8 +5495,11 @@ def err_address_space_qualified_delete : Error<
def err_default_init_const : Error<
"default initialization of an object of const type %0"
"%select{| without a user-provided default constructor}1">;
-def note_add_initializer : Note<
- "add an explicit initializer to initialize %0">;
+def ext_default_init_const : ExtWarn<
+ "default initialization of an object of const type %0"
+ "%select{| without a user-provided default constructor}1 "
+ "is a Microsoft extension">,
+ InGroup<Microsoft>;
def err_delete_operand : Error<"cannot delete expression of type %0">;
def ext_delete_void_ptr_operand : ExtWarn<
"cannot delete expression with pointer-to-'void' type %0">,
@@ -5392,7 +5516,12 @@ def err_delete_explicit_conversion : Error<
"conversion function">;
def note_delete_conversion : Note<"conversion to pointer type %0">;
def warn_delete_array_type : Warning<
- "'delete' applied to a pointer-to-array type %0 treated as delete[]">;
+ "'delete' applied to a pointer-to-array type %0 treated as 'delete[]'">;
+def warn_mismatched_delete_new : Warning<
+ "'delete%select{|[]}0' applied to a pointer that was allocated with "
+ "'new%select{[]|}0'; did you mean 'delete%select{[]|}0'?">,
+ InGroup<DiagGroup<"mismatched-new-delete">>;
+def note_allocated_here : Note<"allocated with 'new%select{[]|}0' here">;
def err_no_suitable_delete_member_function_found : Error<
"no suitable member %0 in %1">;
def err_ambiguous_suitable_delete_member_function_found : Error<
@@ -5420,12 +5549,22 @@ def err_bad_memptr_lhs : Error<
"left hand operand to %0 must be a %select{|pointer to }1class "
"compatible with the right hand operand, but is %2">;
def warn_exception_caught_by_earlier_handler : Warning<
- "exception of type %0 will be caught by earlier handler">;
+ "exception of type %0 will be caught by earlier handler">,
+ InGroup<Exceptions>;
def note_previous_exception_handler : Note<"for type %0">;
def err_exceptions_disabled : Error<
"cannot use '%0' with exceptions disabled">;
def err_objc_exceptions_disabled : Error<
"cannot use '%0' with Objective-C exceptions disabled">;
+def err_seh_try_outside_functions : Error<
+ "cannot use SEH '__try' in blocks, captured regions, or Obj-C method decls">;
+def err_mixing_cxx_try_seh_try : Error<
+ "cannot use C++ 'try' in the same function as SEH '__try'">;
+def note_conflicting_try_here : Note<
+ "conflicting %0 here">;
+def warn_jump_out_of_seh_finally : Warning<
+ "jump out of __finally block has undefined behavior">,
+ InGroup<DiagGroup<"jump-seh-finally">>;
def warn_non_virtual_dtor : Warning<
"%0 has virtual functions but non-virtual destructor">,
InGroup<NonVirtualDtor>, DefaultIgnore;
@@ -5467,6 +5606,12 @@ def err_conditional_ambiguous : Error<
def err_conditional_ambiguous_ovl : Error<
"conditional expression is ambiguous; %diff{$ and $|types}0,1 "
"can be converted to several common types">;
+def err_conditional_vector_size : Error<
+ "vector condition type %0 and result type %1 do not have the same number "
+ "of elements">;
+def err_conditional_vector_element_size : Error<
+ "vector condition type %0 and result type %1 do not have elements of the "
+ "same size">;
def err_throw_incomplete : Error<
"cannot throw object of incomplete type %0">;
@@ -5579,8 +5724,8 @@ def err_pseudo_dtor_type_mismatch : Error<
def err_pseudo_dtor_call_with_args : Error<
"call to pseudo-destructor cannot have any arguments">;
def err_dtor_expr_without_call : Error<
- "%select{destructor reference|pseudo-destructor expression}0 must be "
- "called immediately with '()'">;
+ "reference to %select{destructor|pseudo-destructor}0 must be called"
+ "%select{|; did you mean to call it with no arguments?}1">;
def err_pseudo_dtor_destructor_non_type : Error<
"%0 does not refer to a type name in pseudo-destructor expression; expected "
"the name of type %1">;
@@ -5602,7 +5747,7 @@ def err_typecheck_deleted_function : Error<
"invokes a deleted function">;
def err_expected_class_or_namespace : Error<"%0 is not a class"
- "%select{ or namespace|, namespace, or scoped enumeration}1">;
+ "%select{ or namespace|, namespace, or enumeration}1">;
def err_invalid_declarator_scope : Error<"cannot define or redeclare %0 here "
"because namespace %1 does not enclose namespace %2">;
def err_invalid_declarator_global_scope : Error<
@@ -6008,6 +6153,9 @@ def err_global_call_not_config : Error<
def err_ref_bad_target : Error<
"reference to %select{__device__|__global__|__host__|__host__ __device__}0 "
"function %1 in %select{__device__|__global__|__host__|__host__ __device__}2 function">;
+def warn_host_calls_from_host_device : Warning<
+ "calling __host__ function %0 from __host__ __device__ function %1 can lead to runtime errors">,
+ InGroup<CudaCompat>;
def warn_non_pod_vararg_with_format_string : Warning<
"cannot pass %select{non-POD|non-trivial}0 object of type %1 to variadic "
@@ -6049,12 +6197,14 @@ def err_typecheck_call_invalid_ordered_compare : Error<
def err_typecheck_call_invalid_unary_fp : Error<
"floating point classification requires argument of floating point type "
"(passed in %0)">;
+def err_typecheck_cond_expect_int_float : Error<
+ "used type %0 where integer or floating point type is required">;
def err_typecheck_cond_expect_scalar : Error<
"used type %0 where arithmetic or pointer type is required">;
+def err_typecheck_cond_expect_nonfloat : Error<
+ "used type %0 where floating point type is not allowed">;
def ext_typecheck_cond_one_void : Extension<
"C99 forbids conditional expressions with only one void side">;
-def err_typecheck_cond_expect_scalar_or_vector : Error<
- "used type %0 where arithmetic, pointer, or vector type is required">;
def err_typecheck_cast_to_incomplete : Error<
"cast to incomplete type %0">;
def ext_typecheck_cast_nonscalar : Extension<
@@ -6349,6 +6499,9 @@ def err_base_class_has_flexible_array_member : Error<
def err_incomplete_base_class : Error<"base class has incomplete type">;
def err_duplicate_base_class : Error<
"base class %0 specified more than once as a direct base class">;
+def warn_inaccessible_base_class : Warning<
+ "direct base %0 is inaccessible due to ambiguity:%1">,
+ InGroup<DiagGroup<"inaccessible-base">>;
// FIXME: better way to display derivation? Pass entire thing into diagclient?
def err_ambiguous_derived_to_base_conv : Error<
"ambiguous conversion from derived class %0 to base class %1:%2">;
@@ -6570,6 +6723,10 @@ def warn_format_conversion_argument_type_mismatch : Warning<
"format specifies type %0 but the argument has "
"%select{type|underlying type}2 %1">,
InGroup<Format>;
+def warn_format_conversion_argument_type_mismatch_pedantic : Extension<
+ "format specifies type %0 but the argument has "
+ "%select{type|underlying type}2 %1">,
+ InGroup<FormatPedantic>;
def warn_format_argument_needs_cast : Warning<
"%select{values of type|enum values with underlying type}2 '%0' should not "
"be used as format arguments; add an explicit cast to %1 instead">,
@@ -6778,29 +6935,18 @@ def warn_case_empty_range : Warning<"empty case range specified">;
def warn_missing_case_for_condition :
Warning<"no case matching constant switch condition '%0'">;
-def warn_def_missing_case1 : Warning<
- "enumeration value %0 not explicitly handled in switch">,
- InGroup<SwitchEnum>, DefaultIgnore;
-def warn_def_missing_case2 : Warning<
- "enumeration values %0 and %1 not explicitly handled in switch">,
- InGroup<SwitchEnum>, DefaultIgnore;
-def warn_def_missing_case3 : Warning<
- "enumeration values %0, %1, and %2 not explicitly handled in switch">,
- InGroup<SwitchEnum>, DefaultIgnore;
-def warn_def_missing_cases : Warning<
- "%0 enumeration values not explicitly handled in switch: %1, %2, %3...">,
+def warn_def_missing_case : Warning<"%plural{"
+ "1:enumeration value %1 not explicitly handled in switch|"
+ "2:enumeration values %1 and %2 not explicitly handled in switch|"
+ "3:enumeration values %1, %2, and %3 not explicitly handled in switch|"
+ ":%0 enumeration values not explicitly handled in switch: %1, %2, %3...}0">,
InGroup<SwitchEnum>, DefaultIgnore;
-def warn_missing_case1 : Warning<"enumeration value %0 not handled in switch">,
- InGroup<Switch>;
-def warn_missing_case2 : Warning<
- "enumeration values %0 and %1 not handled in switch">,
- InGroup<Switch>;
-def warn_missing_case3 : Warning<
- "enumeration values %0, %1, and %2 not handled in switch">,
- InGroup<Switch>;
-def warn_missing_cases : Warning<
- "%0 enumeration values not handled in switch: %1, %2, %3...">,
+def warn_missing_case : Warning<"%plural{"
+ "1:enumeration value %1 not handled in switch|"
+ "2:enumeration values %1 and %2 not handled in switch|"
+ "3:enumeration values %1, %2, and %3 not handled in switch|"
+ ":%0 enumeration values not handled in switch: %1, %2, %3...}0">,
InGroup<Switch>;
def warn_unannotated_fallthrough : Warning<
@@ -6971,6 +7117,12 @@ def note_neon_vector_initializer_non_portable_q : Note<
"consider using vld1q_%0%1() to initialize a vector from memory, or "
"vcombine_%0%1(vcreate_%0%1(), vcreate_%0%1()) to initialize from integer "
"constants">;
+def err_systemz_invalid_tabort_code : Error<
+ "invalid transaction abort code">;
+def err_64_bit_builtin_32_bit_tgt : Error<
+ "this builtin is only available on 64-bit targets">;
+def err_ppc_builtin_only_on_pwr7 : Error<
+ "this builtin is only valid on POWER7 or later CPUs">;
def err_builtin_longjmp_unsupported : Error<
"__builtin_longjmp is not supported for the current target">;
@@ -7043,8 +7195,8 @@ def ext_c99_array_usage : Extension<
def err_c99_array_usage_cxx : Error<
"%select{qualifier in |static |}0array size %select{||'[*] '}0is a C99 "
"feature, not permitted in C++">;
-def err_double_requires_fp64 : Error<
- "use of type 'double' requires cl_khr_fp64 extension to be enabled">;
+ def err_type_requires_extension : Error<
+ "use of type %0 requires %1 extension to be enabled">;
def err_int128_unsupported : Error<
"__int128 is not supported on this target">;
def err_nsconsumed_attribute_mismatch : Error<
@@ -7169,9 +7321,14 @@ def err_filter_expression_integral : Error<
def err_non_asm_stmt_in_naked_function : Error<
"non-ASM statement in naked function is not supported">;
+def err_asm_naked_this_ref : Error<
+ "'this' pointer references not allowed in naked functions">;
def err_asm_naked_parm_ref : Error<
"parameter references not allowed in naked functions">;
+def ext_deprecated_attr_is_a_cxx14_extension : ExtWarn<
+ "use of the 'deprecated' attribute is a C++14 extension">, InGroup<CXX14>;
+
// OpenCL warnings and errors.
def err_invalid_astype_of_different_size : Error<
"invalid reinterpretation: sizes of %0 and %1 must match">;
@@ -7261,6 +7418,8 @@ def err_omp_no_dsa_for_variable : Error<
"variable %0 must have explicitly specified data sharing attributes">;
def err_omp_wrong_dsa : Error<
"%0 variable cannot be %1">;
+def err_omp_variably_modified_type_not_supported : Error<
+ "arguments of OpenMP clause '%0' in '#pragma omp %2' directive cannot be of variably-modified type %1">;
def note_omp_explicit_dsa : Note<
"defined as %0">;
def note_omp_predetermined_dsa : Note<
@@ -7278,8 +7437,6 @@ def note_omp_implicit_dsa : Note<
"implicitly determined as %0">;
def err_omp_loop_var_dsa : Error<
"loop iteration variable in the associated loop of 'omp %1' directive may not be %0, predetermined as %2">;
-def err_omp_global_loop_var_dsa : Error<
- "loop iteration variable in the associated loop of 'omp %1' directive may not be a variable with global storage without being explicitly marked as %0">;
def err_omp_not_for : Error<
"%select{statement after '#pragma omp %1' must be a for loop|"
"expected %2 for loops after '#pragma omp %1'%select{|, but found only %4}3}0">;
@@ -7368,7 +7525,7 @@ def note_omp_referenced : Note<
def err_omp_reduction_in_task : Error<
"reduction variables may not be accessed in an explicit task">;
def err_omp_reduction_id_not_compatible : Error<
- "variable of type %0 is not valid for specified reduction operation">;
+ "variable of type %0 is not valid for specified reduction operation: unable to provide default initialization value">;
def err_omp_prohibited_region : Error<
"region cannot be%select{| closely}0 nested inside '%1' region"
"%select{|; perhaps you forget to enclose 'omp %3' directive into a parallel region?|"
@@ -7404,8 +7561,15 @@ def err_omp_atomic_write_not_expression_statement : Error<
"the statement for 'atomic write' must be an expression statement of form 'x = expr;',"
" where x is a lvalue expression with scalar type">;
def err_omp_atomic_update_not_expression_statement : Error<
- "the statement for 'atomic%select{| update}0' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x',"
+ "the statement for 'atomic update' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x',"
+ " where x is an l-value expression with scalar type">;
+def err_omp_atomic_not_expression_statement : Error<
+ "the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x',"
" where x is an l-value expression with scalar type">;
+def note_omp_atomic_update: Note<
+ "%select{expected an expression statement|expected built-in binary or unary operator|expected unary decrement/increment operation|"
+ "expected expression of scalar type|expected assignment expression|expected built-in binary operator|"
+ "expected one of '+', '*', '-', '/', '&', '^', '%|', '<<', or '>>' built-in operations|expected in right hand side of expression}0">;
def err_omp_atomic_capture_not_expression_statement : Error<
"the statement for 'atomic capture' must be an expression statement of form 'v = ++x;', 'v = --x;', 'v = x++;', 'v = x--;', 'v = x binop= expr;', 'v = x = x binop expr' or 'v = x = expr binop x',"
" where x and v are both l-value expressions with scalar type">;
@@ -7414,6 +7578,8 @@ def err_omp_atomic_capture_not_compound_statement : Error<
" '{v = x; x = x binop expr;}', '{v = x; x = expr binop x;}', '{x = x binop expr; v = x;}', '{x = expr binop x; v = x;}' or '{v = x; x = expr;}',"
" '{v = x; x++;}', '{v = x; ++x;}', '{++x; v = x;}', '{x++; v = x;}', '{v = x; x--;}', '{v = x; --x;}', '{--x; v = x;}', '{x--; v = x;}'"
" where x is an l-value expression with scalar type">;
+def note_omp_atomic_capture: Note<
+ "%select{expected assignment expression|expected compound statement|expected exactly two expression statements|expected in right hand side of the first expression}0">;
def err_omp_atomic_several_clauses : Error<
"directive '#pragma omp atomic' cannot contain more than one 'read', 'write', 'update' or 'capture' clause">;
def note_omp_atomic_previous_clause : Note<
@@ -7424,6 +7590,10 @@ def note_omp_nested_teams_construct_here : Note<
"nested teams construct here">;
def note_omp_nested_statement_here : Note<
"%select{statement|directive}0 outside teams construct here">;
+def err_omp_single_copyprivate_with_nowait : Error<
+ "the 'copyprivate' clause must not be used with the 'nowait' clause">;
+def note_omp_nowait_clause_here : Note<
+ "'nowait' clause is here">;
} // end of OpenMP category
let CategoryName = "Related Result Type Issue" in {
diff --git a/include/clang/Basic/DiagnosticSerializationKinds.td b/include/clang/Basic/DiagnosticSerializationKinds.td
index a685db0..796027e 100644
--- a/include/clang/Basic/DiagnosticSerializationKinds.td
+++ b/include/clang/Basic/DiagnosticSerializationKinds.td
@@ -41,6 +41,8 @@ def err_pch_langopt_value_mismatch : Error<
"%0 differs in PCH file vs. current file">;
def err_pch_diagopt_mismatch : Error<"%0 is currently enabled, but was not in "
"the PCH file">;
+def err_pch_modulecache_mismatch : Error<"PCH was compiled with module cache "
+ "path '%0', but the path is currently '%1'">;
def err_pch_version_too_old : Error<
"PCH file uses an older PCH format that is no longer supported">;
@@ -64,9 +66,6 @@ def err_imported_module_relocated : Error<
def err_module_different_modmap : Error<
"module '%0' %select{uses|does not use}1 additional module map '%2'"
"%select{| not}1 used when the module was built">;
-def warn_module_conflict : Warning<
- "module '%0' conflicts with already-imported module '%1': %2">,
- InGroup<ModuleConflict>;
def err_pch_macro_def_undef : Error<
"macro '%0' was %select{defined|undef'd}1 in the precompiled header but "
diff --git a/include/clang/Basic/FileManager.h b/include/clang/Basic/FileManager.h
index bd3f27a..37e19e1 100644
--- a/include/clang/Basic/FileManager.h
+++ b/include/clang/Basic/FileManager.h
@@ -73,11 +73,7 @@ class FileEntry {
mutable std::unique_ptr<vfs::File> File;
friend class FileManager;
- void closeFile() const {
- File.reset(); // rely on destructor to close File
- }
-
- void operator=(const FileEntry &) LLVM_DELETED_FUNCTION;
+ void operator=(const FileEntry &) = delete;
public:
FileEntry()
@@ -109,6 +105,10 @@ public:
/// \brief Check whether the file is a named pipe (and thus can't be opened by
/// the native FileManager methods).
bool isNamedPipe() const { return IsNamedPipe; }
+
+ void closeFile() const {
+ File.reset(); // rely on destructor to close File
+ }
};
struct FileData;
diff --git a/include/clang/Basic/IdentifierTable.h b/include/clang/Basic/IdentifierTable.h
index 1de9dd1..bc586e4 100644
--- a/include/clang/Basic/IdentifierTable.h
+++ b/include/clang/Basic/IdentifierTable.h
@@ -53,7 +53,8 @@ class IdentifierInfo {
bool HasMacro : 1; // True if there is a #define for this.
bool HadMacro : 1; // True if there was a #define for this.
bool IsExtension : 1; // True if identifier is a lang extension.
- bool IsCXX11CompatKeyword : 1; // True if identifier is a keyword in C++11.
+ bool IsFutureCompatKeyword : 1; // True if identifier is a keyword in a
+ // newer Standard or proposed Standard.
bool IsPoisoned : 1; // True if identifier is poisoned.
bool IsCPPOperatorKeyword : 1; // True if ident is a C++ operator keyword.
bool NeedsHandleIdentifier : 1; // See "RecomputeNeedsHandleIdentifier".
@@ -73,8 +74,8 @@ class IdentifierInfo {
void *FETokenInfo; // Managed by the language front-end.
llvm::StringMapEntry<IdentifierInfo*> *Entry;
- IdentifierInfo(const IdentifierInfo&) LLVM_DELETED_FUNCTION;
- void operator=(const IdentifierInfo&) LLVM_DELETED_FUNCTION;
+ IdentifierInfo(const IdentifierInfo&) = delete;
+ void operator=(const IdentifierInfo&) = delete;
friend class IdentifierTable;
@@ -124,6 +125,7 @@ public:
}
/// \brief Return true if this identifier is \#defined to some other value.
+ /// \note The current definition may be in a module and not currently visible.
bool hasMacroDefinition() const {
return HasMacro;
}
@@ -212,13 +214,14 @@ public:
RecomputeNeedsHandleIdentifier();
}
- /// is/setIsCXX11CompatKeyword - Initialize information about whether or not
- /// this language token is a keyword in C++11. This controls compatibility
- /// warnings, and is only true when not parsing C++11. Once a compatibility
- /// problem has been diagnosed with this keyword, the flag will be cleared.
- bool isCXX11CompatKeyword() const { return IsCXX11CompatKeyword; }
- void setIsCXX11CompatKeyword(bool Val) {
- IsCXX11CompatKeyword = Val;
+ /// is/setIsFutureCompatKeyword - Initialize information about whether or not
+ /// this language token is a keyword in a newer or proposed Standard. This
+ /// controls compatibility warnings, and is only true when not parsing the
+ /// corresponding Standard. Once a compatibility problem has been diagnosed
+ /// with this keyword, the flag will be cleared.
+ bool isFutureCompatKeyword() const { return IsFutureCompatKeyword; }
+ void setIsFutureCompatKeyword(bool Val) {
+ IsFutureCompatKeyword = Val;
if (Val)
NeedsHandleIdentifier = 1;
else
@@ -308,7 +311,12 @@ public:
else
RecomputeNeedsHandleIdentifier();
}
-
+
+ /// \brief Provide less than operator for lexicographical sorting.
+ bool operator<(const IdentifierInfo &RHS) const {
+ return getName() < RHS.getName();
+ }
+
private:
/// The Preprocessor::HandleIdentifier does several special (but rare)
/// things to identifiers of various sorts. For example, it changes the
@@ -319,7 +327,7 @@ private:
void RecomputeNeedsHandleIdentifier() {
NeedsHandleIdentifier =
(isPoisoned() | hasMacroDefinition() | isCPlusPlusOperatorKeyword() |
- isExtensionToken() | isCXX11CompatKeyword() || isOutOfDate() ||
+ isExtensionToken() | isFutureCompatKeyword() || isOutOfDate() ||
isModulesImport());
}
};
@@ -356,8 +364,8 @@ public:
/// actual functionality.
class IdentifierIterator {
private:
- IdentifierIterator(const IdentifierIterator &) LLVM_DELETED_FUNCTION;
- void operator=(const IdentifierIterator &) LLVM_DELETED_FUNCTION;
+ IdentifierIterator(const IdentifierIterator &) = delete;
+ void operator=(const IdentifierIterator &) = delete;
protected:
IdentifierIterator() { }
@@ -727,8 +735,8 @@ public:
/// multi-keyword caching.
class SelectorTable {
void *Impl; // Actually a SelectorTableImpl
- SelectorTable(const SelectorTable &) LLVM_DELETED_FUNCTION;
- void operator=(const SelectorTable &) LLVM_DELETED_FUNCTION;
+ SelectorTable(const SelectorTable &) = delete;
+ void operator=(const SelectorTable &) = delete;
public:
SelectorTable();
~SelectorTable();
diff --git a/include/clang/Basic/LLVM.h b/include/clang/Basic/LLVM.h
index 3e01d25..0e6ff92 100644
--- a/include/clang/Basic/LLVM.h
+++ b/include/clang/Basic/LLVM.h
@@ -45,6 +45,7 @@ namespace llvm {
class RefCountedBaseVPTR;
class raw_ostream;
+ class raw_pwrite_stream;
// TODO: DenseMap, ...
}
@@ -76,6 +77,7 @@ namespace clang {
using llvm::RefCountedBaseVPTR;
using llvm::raw_ostream;
+ using llvm::raw_pwrite_stream;
} // end namespace clang.
#endif
diff --git a/include/clang/Basic/LangOptions.def b/include/clang/Basic/LangOptions.def
index cf9638d..95d3f06 100644
--- a/include/clang/Basic/LangOptions.def
+++ b/include/clang/Basic/LangOptions.def
@@ -84,6 +84,7 @@ BENIGN_LANGOPT(EncodeExtendedBlockSig , 1, 0,
"Encoding extended block type signature")
BENIGN_LANGOPT(ObjCInferRelatedResultType , 1, 1,
"Objective-C related result type inference")
+LANGOPT(AppExt , 1, 0, "Objective-C App Extension")
LANGOPT(Trigraphs , 1, 0,"trigraphs")
LANGOPT(LineComment , 1, 0, "'//' comments")
LANGOPT(Bool , 1, 0, "bool, true, and false keywords")
@@ -114,6 +115,7 @@ LANGOPT(MSBitfields , 1, 0, "Microsoft-compatible structure layout")
LANGOPT(Freestanding, 1, 0, "freestanding implementation")
LANGOPT(NoBuiltin , 1, 0, "disable builtin functions")
LANGOPT(NoMathBuiltin , 1, 0, "disable math builtin functions")
+LANGOPT(GNUAsm , 1, 1, "GNU-style inline assembly")
BENIGN_LANGOPT(ThreadsafeStatics , 1, 1, "thread-safe static initializers")
LANGOPT(POSIXThreads , 1, 0, "POSIX thread support")
@@ -122,11 +124,13 @@ BENIGN_LANGOPT(EmitAllDecls , 1, 0, "support for emitting all declarations"
LANGOPT(MathErrno , 1, 1, "errno support for math functions")
BENIGN_LANGOPT(HeinousExtensions , 1, 0, "Extensions that we really don't like and may be ripped out at any time")
LANGOPT(Modules , 1, 0, "modules extension to C")
-LANGOPT(ModulesDeclUse , 1, 0, "require declaration of module uses")
+COMPATIBLE_LANGOPT(ModulesDeclUse , 1, 0, "require declaration of module uses")
LANGOPT(ModulesSearchAll , 1, 1, "search even non-imported modules to find unresolved references")
-LANGOPT(ModulesStrictDeclUse, 1, 0, "require declaration of module uses and all headers to be in modules")
+COMPATIBLE_LANGOPT(ModulesStrictDeclUse, 1, 0, "require declaration of module uses and all headers to be in modules")
LANGOPT(ModulesErrorRecovery, 1, 1, "automatically import modules as needed when performing error recovery")
BENIGN_LANGOPT(ModulesImplicitMaps, 1, 1, "use files called module.modulemap implicitly as module maps")
+BENIGN_LANGOPT(ImplicitModules, 1, 1, "build modules that are not specified via -fmodule-file")
+COMPATIBLE_LANGOPT(ModulesLocalVisibility, 1, 0, "local submodule visibility")
COMPATIBLE_LANGOPT(Optimize , 1, 0, "__OPTIMIZE__ predefined macro")
COMPATIBLE_LANGOPT(OptimizeSize , 1, 0, "__OPTIMIZE_SIZE__ predefined macro")
LANGOPT(Static , 1, 0, "__STATIC__ predefined macro (as opposed to __DYNAMIC__)")
@@ -158,9 +162,12 @@ LANGOPT(HalfArgsAndReturns, 1, 0, "half args and returns")
LANGOPT(CUDA , 1, 0, "CUDA")
LANGOPT(OpenMP , 1, 0, "OpenMP support")
LANGOPT(CUDAIsDevice , 1, 0, "Compiling for CUDA device")
+LANGOPT(CUDAAllowHostCallsFromHostDevice, 1, 0, "Allow host device functions to call host functions")
+LANGOPT(CUDADisableTargetCallChecks, 1, 0, "Disable checks for call targets (host, device, etc.)")
LANGOPT(AssumeSaneOperatorNew , 1, 1, "implicit __attribute__((malloc)) for C++'s new operators")
LANGOPT(SizedDeallocation , 1, 0, "enable sized deallocation functions")
+LANGOPT(ConceptsTS , 1, 0, "enable C++ Extensions for Concepts")
BENIGN_LANGOPT(ElideConstructors , 1, 1, "C++ copy constructor elision")
BENIGN_LANGOPT(DumpRecordLayouts , 1, 0, "dumping the layout of IRgen'd records")
BENIGN_LANGOPT(DumpRecordLayoutsSimple , 1, 0, "dumping the layout of IRgen'd records in a simple form")
diff --git a/include/clang/Basic/LangOptions.h b/include/clang/Basic/LangOptions.h
index 5ac96c5..84836eb 100644
--- a/include/clang/Basic/LangOptions.h
+++ b/include/clang/Basic/LangOptions.h
@@ -21,6 +21,7 @@
#include "clang/Basic/Sanitizers.h"
#include "clang/Basic/Visibility.h"
#include <string>
+#include <vector>
namespace clang {
@@ -66,13 +67,20 @@ public:
enum AddrSpaceMapMangling { ASMM_Target, ASMM_On, ASMM_Off };
+ enum MSVCMajorVersion {
+ MSVC2010 = 16,
+ MSVC2012 = 17,
+ MSVC2013 = 18,
+ MSVC2015 = 19
+ };
+
public:
/// \brief Set of enabled sanitizers.
SanitizerSet Sanitize;
- /// \brief Path to blacklist file specifying which objects
+ /// \brief Paths to blacklist files specifying which objects
/// (files, functions, variables) should not be instrumented.
- std::string SanitizerBlacklistFile;
+ std::vector<std::string> SanitizerBlacklistFiles;
clang::ObjCRuntime ObjCRuntime;
@@ -92,6 +100,10 @@ public:
/// treat this as the CurrentModule.
std::string ImplementationOfModule;
+ /// \brief The names of any features to enable in module 'requires' decls
+ /// in addition to the hard-coded list in Module.cpp and the target features.
+ std::vector<std::string> ModuleFeatures;
+
/// \brief Options for parsing comments.
CommentOptions CommentOpts;
@@ -113,6 +125,10 @@ public:
!ObjCSubscriptingLegacyRuntime;
}
+ bool isCompatibleWithMSVC(MSVCMajorVersion MajorVersion) const {
+ return MSCompatibilityVersion >= MajorVersion * 10000000U;
+ }
+
/// \brief Reset all of the options that are not considered when building a
/// module.
void resetNonModularOptions();
diff --git a/include/clang/Basic/Linkage.h b/include/clang/Basic/Linkage.h
index f3b4769..8b15c8e 100644
--- a/include/clang/Basic/Linkage.h
+++ b/include/clang/Basic/Linkage.h
@@ -14,6 +14,10 @@
#ifndef LLVM_CLANG_BASIC_LINKAGE_H
#define LLVM_CLANG_BASIC_LINKAGE_H
+#include <assert.h>
+#include <stdint.h>
+#include <utility>
+
namespace clang {
/// \brief Describes the different kinds of linkage
diff --git a/include/clang/Basic/Module.h b/include/clang/Basic/Module.h
index e3953a4..7470610 100644
--- a/include/clang/Basic/Module.h
+++ b/include/clang/Basic/Module.h
@@ -16,11 +16,13 @@
#define LLVM_CLANG_BASIC_MODULE_H
#include "clang/Basic/SourceLocation.h"
+#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/PointerIntPair.h"
#include "llvm/ADT/PointerUnion.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include <string>
@@ -63,6 +65,9 @@ public:
/// \brief The umbrella header or directory.
llvm::PointerUnion<const DirectoryEntry *, const FileEntry *> Umbrella;
+
+ /// \brief The name of the umbrella entry, as written in the module map.
+ std::string UmbrellaAsWritten;
private:
/// \brief The submodules of this module, indexed by name.
@@ -85,6 +90,9 @@ private:
/// \brief Cache of modules visible to lookup in this module.
mutable llvm::DenseSet<const Module*> VisibleModulesCache;
+ /// The ID used when referencing this module within a VisibleModuleSet.
+ unsigned VisibilityID;
+
public:
enum HeaderKind {
HK_Normal,
@@ -100,6 +108,17 @@ public:
struct Header {
std::string NameAsWritten;
const FileEntry *Entry;
+
+ explicit operator bool() { return Entry; }
+ };
+
+ /// \brief Information about a directory name as found in the module map
+ /// file.
+ struct DirectoryName {
+ std::string NameAsWritten;
+ const DirectoryEntry *Entry;
+
+ explicit operator bool() { return Entry; }
};
/// \brief The headers that are part of this module.
@@ -182,10 +201,7 @@ public:
/// particular module.
enum NameVisibilityKind {
/// \brief All of the names in this module are hidden.
- ///
Hidden,
- /// \brief Only the macro names in this module are visible.
- MacrosVisible,
/// \brief All of the names in this module are visible.
AllVisible
};
@@ -193,15 +209,12 @@ public:
/// \brief The visibility of names within this particular module.
NameVisibilityKind NameVisibility;
- /// \brief The location at which macros within this module became visible.
- SourceLocation MacroVisibilityLoc;
-
/// \brief The location of the inferred submodule.
SourceLocation InferredSubmoduleLoc;
/// \brief The set of modules imported by this module, and on which this
/// module depends.
- SmallVector<Module *, 2> Imports;
+ llvm::SmallSetVector<Module *, 2> Imports;
/// \brief Describes an exported module.
///
@@ -288,7 +301,7 @@ public:
/// \brief Construct a new module or submodule.
Module(StringRef Name, SourceLocation DefinitionLoc, Module *Parent,
- bool IsFramework, bool IsExplicit);
+ bool IsFramework, bool IsExplicit, unsigned VisibilityID);
~Module();
@@ -371,12 +384,14 @@ public:
/// \brief Retrieve the directory for which this module serves as the
/// umbrella.
- const DirectoryEntry *getUmbrellaDir() const;
+ DirectoryName getUmbrellaDir() const;
/// \brief Retrieve the header that serves as the umbrella header for this
/// module.
- const FileEntry *getUmbrellaHeader() const {
- return Umbrella.dyn_cast<const FileEntry *>();
+ Header getUmbrellaHeader() const {
+ if (auto *E = Umbrella.dyn_cast<const FileEntry *>())
+ return Header{UmbrellaAsWritten, E};
+ return Header{};
}
/// \brief Determine whether this module has an umbrella directory that is
@@ -399,6 +414,10 @@ public:
/// \brief The top-level headers associated with this module.
ArrayRef<const FileEntry *> getTopHeaders(FileManager &FileMgr);
+ /// \brief Determine whether this module has declared its intention to
+ /// directly use another module.
+ bool directlyUses(const Module *Requested) const;
+
/// \brief Add the given feature requirement to the list of features
/// required by this module.
///
@@ -437,6 +456,8 @@ public:
return VisibleModulesCache.count(M);
}
+ unsigned getVisibilityID() const { return VisibilityID; }
+
typedef std::vector<Module *>::iterator submodule_iterator;
typedef std::vector<Module *>::const_iterator submodule_const_iterator;
@@ -466,6 +487,65 @@ private:
void buildVisibleModulesCache() const;
};
+/// \brief A set of visible modules.
+class VisibleModuleSet {
+public:
+ VisibleModuleSet() : Generation(0) {}
+ VisibleModuleSet(VisibleModuleSet &&O)
+ : ImportLocs(std::move(O.ImportLocs)), Generation(O.Generation ? 1 : 0) {
+ O.ImportLocs.clear();
+ ++O.Generation;
+ }
+
+ /// Move from another visible modules set. Guaranteed to leave the source
+ /// empty and bump the generation on both.
+ VisibleModuleSet &operator=(VisibleModuleSet &&O) {
+ ImportLocs = std::move(O.ImportLocs);
+ O.ImportLocs.clear();
+ ++O.Generation;
+ ++Generation;
+ return *this;
+ }
+
+ /// \brief Get the current visibility generation. Incremented each time the
+ /// set of visible modules changes in any way.
+ unsigned getGeneration() const { return Generation; }
+
+ /// \brief Determine whether a module is visible.
+ bool isVisible(const Module *M) const {
+ return getImportLoc(M).isValid();
+ }
+
+ /// \brief Get the location at which the import of a module was triggered.
+ SourceLocation getImportLoc(const Module *M) const {
+ return M->getVisibilityID() < ImportLocs.size()
+ ? ImportLocs[M->getVisibilityID()]
+ : SourceLocation();
+ }
+
+ /// \brief A callback to call when a module is made visible (directly or
+ /// indirectly) by a call to \ref setVisible.
+ typedef llvm::function_ref<void(Module *M)> VisibleCallback;
+ /// \brief A callback to call when a module conflict is found. \p Path
+ /// consists of a sequence of modules from the conflicting module to the one
+ /// made visible, where each was exported by the next.
+ typedef llvm::function_ref<void(ArrayRef<Module *> Path,
+ Module *Conflict, StringRef Message)>
+ ConflictCallback;
+ /// \brief Make a specific module visible.
+ void setVisible(Module *M, SourceLocation Loc,
+ VisibleCallback Vis = [](Module *) {},
+ ConflictCallback Cb = [](ArrayRef<Module *>, Module *,
+ StringRef) {});
+
+private:
+ /// Import locations for each visible module. Indexed by the module's
+ /// VisibilityID.
+ std::vector<SourceLocation> ImportLocs;
+ /// Visibility generation, bumped every time the visibility state changes.
+ unsigned Generation;
+};
+
} // end namespace clang
diff --git a/include/clang/Basic/PlistSupport.h b/include/clang/Basic/PlistSupport.h
index 081f22d..84dd291 100644
--- a/include/clang/Basic/PlistSupport.h
+++ b/include/clang/Basic/PlistSupport.h
@@ -12,7 +12,6 @@
#include "clang/Basic/FileManager.h"
#include "clang/Basic/SourceManager.h"
-#include "clang/Lex/Lexer.h"
#include "llvm/Support/raw_ostream.h"
namespace clang {
@@ -89,31 +88,29 @@ inline raw_ostream &EmitString(raw_ostream &o, StringRef s) {
}
inline void EmitLocation(raw_ostream &o, const SourceManager &SM,
- const LangOptions &LangOpts, SourceLocation L,
- const FIDMap &FM, unsigned indent,
- bool extend = false) {
- FullSourceLoc Loc(SM.getExpansionLoc(L), const_cast<SourceManager &>(SM));
+ SourceLocation L, const FIDMap &FM, unsigned indent) {
+ if (L.isInvalid()) return;
- // Add in the length of the token, so that we cover multi-char tokens.
- unsigned offset =
- extend ? Lexer::MeasureTokenLength(Loc, SM, LangOpts) - 1 : 0;
+ FullSourceLoc Loc(SM.getExpansionLoc(L), const_cast<SourceManager &>(SM));
Indent(o, indent) << "<dict>\n";
Indent(o, indent) << " <key>line</key>";
EmitInteger(o, Loc.getExpansionLineNumber()) << '\n';
Indent(o, indent) << " <key>col</key>";
- EmitInteger(o, Loc.getExpansionColumnNumber() + offset) << '\n';
+ EmitInteger(o, Loc.getExpansionColumnNumber()) << '\n';
Indent(o, indent) << " <key>file</key>";
EmitInteger(o, GetFID(FM, SM, Loc)) << '\n';
Indent(o, indent) << "</dict>\n";
}
inline void EmitRange(raw_ostream &o, const SourceManager &SM,
- const LangOptions &LangOpts, CharSourceRange R,
- const FIDMap &FM, unsigned indent) {
+ CharSourceRange R, const FIDMap &FM, unsigned indent) {
+ if (R.isInvalid()) return;
+
+ assert(R.isCharRange() && "cannot handle a token range");
Indent(o, indent) << "<array>\n";
- EmitLocation(o, SM, LangOpts, R.getBegin(), FM, indent + 1);
- EmitLocation(o, SM, LangOpts, R.getEnd(), FM, indent + 1, R.isTokenRange());
+ EmitLocation(o, SM, R.getBegin(), FM, indent + 1);
+ EmitLocation(o, SM, R.getEnd(), FM, indent + 1);
Indent(o, indent) << "</array>\n";
}
}
diff --git a/include/clang/Basic/SanitizerBlacklist.h b/include/clang/Basic/SanitizerBlacklist.h
index 2ce268a..e651e18 100644
--- a/include/clang/Basic/SanitizerBlacklist.h
+++ b/include/clang/Basic/SanitizerBlacklist.h
@@ -28,7 +28,8 @@ class SanitizerBlacklist {
SourceManager &SM;
public:
- SanitizerBlacklist(StringRef BlacklistPath, SourceManager &SM);
+ SanitizerBlacklist(const std::vector<std::string> &BlacklistPaths,
+ SourceManager &SM);
bool isBlacklistedGlobal(StringRef GlobalName,
StringRef Category = StringRef()) const;
bool isBlacklistedType(StringRef MangledTypeName,
diff --git a/include/clang/Basic/Sanitizers.def b/include/clang/Basic/Sanitizers.def
index 91a1ef4..65ababd 100644
--- a/include/clang/Basic/Sanitizers.def
+++ b/include/clang/Basic/Sanitizers.def
@@ -64,7 +64,9 @@ SANITIZER("null", Null)
SANITIZER("object-size", ObjectSize)
SANITIZER("return", Return)
SANITIZER("returns-nonnull-attribute", ReturnsNonnullAttribute)
-SANITIZER("shift", Shift)
+SANITIZER("shift-base", ShiftBase)
+SANITIZER("shift-exponent", ShiftExponent)
+SANITIZER_GROUP("shift", Shift, ShiftBase | ShiftExponent)
SANITIZER("signed-integer-overflow", SignedIntegerOverflow)
SANITIZER("unreachable", Unreachable)
SANITIZER("vla-bound", VLABound)
@@ -76,18 +78,17 @@ SANITIZER("unsigned-integer-overflow", UnsignedIntegerOverflow)
// DataFlowSanitizer
SANITIZER("dataflow", DataFlow)
-// -fsanitize=undefined includes all the sanitizers which have low overhead, no
-// ABI or address space layout implications, and only catch undefined behavior.
-SANITIZER_GROUP("undefined", Undefined,
- Alignment | Bool | ArrayBounds | Enum | FloatCastOverflow |
- FloatDivideByZero | Function | IntegerDivideByZero |
- NonnullAttribute | Null | ObjectSize | Return |
- ReturnsNonnullAttribute | Shift | SignedIntegerOverflow |
- Unreachable | VLABound | Vptr)
-
-// -fsanitize=undefined-trap includes
-// all sanitizers included by -fsanitize=undefined, except those that require
-// runtime support. This group is generally used in conjunction with the
+// Control Flow Integrity
+SANITIZER("cfi-cast-strict", CFICastStrict)
+SANITIZER("cfi-derived-cast", CFIDerivedCast)
+SANITIZER("cfi-unrelated-cast", CFIUnrelatedCast)
+SANITIZER("cfi-nvcall", CFINVCall)
+SANITIZER("cfi-vcall", CFIVCall)
+SANITIZER_GROUP("cfi", CFI,
+ CFIDerivedCast | CFIUnrelatedCast | CFINVCall | CFIVCall)
+
+// -fsanitize=undefined-trap includes sanitizers from -fsanitize=undefined
+// that can be used without runtime support, generally by providing extra
// -fsanitize-undefined-trap-on-error flag.
SANITIZER_GROUP("undefined-trap", UndefinedTrap,
Alignment | Bool | ArrayBounds | Enum | FloatCastOverflow |
@@ -95,6 +96,10 @@ SANITIZER_GROUP("undefined-trap", UndefinedTrap,
Null | ObjectSize | Return | ReturnsNonnullAttribute |
Shift | SignedIntegerOverflow | Unreachable | VLABound)
+// -fsanitize=undefined includes all the sanitizers which have low overhead, no
+// ABI or address space layout implications, and only catch undefined behavior.
+SANITIZER_GROUP("undefined", Undefined, UndefinedTrap | Function | Vptr)
+
SANITIZER_GROUP("integer", Integer,
SignedIntegerOverflow | UnsignedIntegerOverflow | Shift |
IntegerDivideByZero)
@@ -104,7 +109,7 @@ SANITIZER_GROUP("bounds", Bounds, ArrayBounds | LocalBounds)
// Magic group, containing all sanitizers. For example, "-fno-sanitize=all"
// can be used to disable all the sanitizers.
-SANITIZER_GROUP("all", All, ~0)
+SANITIZER_GROUP("all", All, ~0ULL)
#undef SANITIZER
#undef SANITIZER_GROUP
diff --git a/include/clang/Basic/Sanitizers.h b/include/clang/Basic/Sanitizers.h
index 868b331..3b1797e 100644
--- a/include/clang/Basic/Sanitizers.h
+++ b/include/clang/Basic/Sanitizers.h
@@ -15,33 +15,64 @@
#ifndef LLVM_CLANG_BASIC_SANITIZERS_H
#define LLVM_CLANG_BASIC_SANITIZERS_H
+#include "clang/Basic/LLVM.h"
+#include "llvm/ADT/StringRef.h"
+
+#include <stdint.h>
+
namespace clang {
-enum class SanitizerKind {
-#define SANITIZER(NAME, ID) ID,
+typedef uint64_t SanitizerMask;
+
+namespace SanitizerKind {
+
+// Assign ordinals to possible values of -fsanitize= flag, which we will use as
+// bit positions.
+enum SanitizerOrdinal : uint64_t {
+#define SANITIZER(NAME, ID) SO_##ID,
+#define SANITIZER_GROUP(NAME, ID, ALIAS) SO_##ID##Group,
#include "clang/Basic/Sanitizers.def"
- Unknown
+ SO_Count
};
-class SanitizerSet {
- /// \brief Bitmask of enabled sanitizers.
- unsigned Kinds;
-public:
+// Define the set of sanitizer kinds, as well as the set of sanitizers each
+// sanitizer group expands into.
+#define SANITIZER(NAME, ID) \
+ const SanitizerMask ID = 1ULL << SO_##ID;
+#define SANITIZER_GROUP(NAME, ID, ALIAS) \
+ const SanitizerMask ID = ALIAS; \
+ const SanitizerMask ID##Group = 1ULL << SO_##ID##Group;
+#include "clang/Basic/Sanitizers.def"
+
+}
+
+struct SanitizerSet {
SanitizerSet();
- /// \brief Check if a certain sanitizer is enabled.
- bool has(SanitizerKind K) const;
+ /// \brief Check if a certain (single) sanitizer is enabled.
+ bool has(SanitizerMask K) const;
- /// \brief Enable or disable a certain sanitizer.
- void set(SanitizerKind K, bool Value);
+ /// \brief Enable or disable a certain (single) sanitizer.
+ void set(SanitizerMask K, bool Value);
/// \brief Disable all sanitizers.
void clear();
/// \brief Returns true if at least one sanitizer is enabled.
bool empty() const;
+
+ /// \brief Bitmask of enabled sanitizers.
+ SanitizerMask Mask;
};
+/// Parse a single value from a -fsanitize= or -fno-sanitize= value list.
+/// Returns a non-zero SanitizerMask, or \c 0 if \p Value is not known.
+SanitizerMask parseSanitizerValue(StringRef Value, bool AllowGroups);
+
+/// For each sanitizer group bit set in \p Kinds, set the bits for sanitizers
+/// this group enables.
+SanitizerMask expandSanitizerGroups(SanitizerMask Kinds);
+
} // end namespace clang
#endif
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h
index 717258d..3aea5ea 100644
--- a/include/clang/Basic/SourceManager.h
+++ b/include/clang/Basic/SourceManager.h
@@ -82,7 +82,7 @@ namespace SrcMgr {
/// \brief One instance of this struct is kept for every file loaded or used.
///
/// This object owns the MemoryBuffer object.
- class ContentCache {
+ class LLVM_ALIGNAS(8) ContentCache {
enum CCFlags {
/// \brief Whether the buffer is invalid.
InvalidFlag = 0x01,
@@ -90,15 +90,6 @@ namespace SrcMgr {
DoNotFreeFlag = 0x02
};
- // Note that the first member of this class is an aligned character buffer
- // to ensure that this class has an alignment of 8 bytes. This wastes
- // 8 bytes for every ContentCache object, but each of these corresponds to
- // a file loaded into memory, so the 8 bytes doesn't seem terribly
- // important. It is quite awkward to fit this aligner into any other part
- // of the class due to the lack of portable ways to combine it with other
- // members.
- llvm::AlignedCharArray<8, 1> NonceAligner;
-
/// \brief The actual buffer containing the characters from the input
/// file.
///
@@ -142,14 +133,9 @@ namespace SrcMgr {
/// \brief True if this content cache was initially created for a source
/// file considered as a system one.
unsigned IsSystemFile : 1;
-
- ContentCache(const FileEntry *Ent = nullptr)
- : Buffer(nullptr, false), OrigEntry(Ent), ContentsEntry(Ent),
- SourceLineCache(nullptr), NumLines(0), BufferOverridden(false),
- IsSystemFile(false) {
- (void)NonceAligner; // Silence warnings about unused member.
- }
-
+
+ ContentCache(const FileEntry *Ent = nullptr) : ContentCache(Ent, Ent) {}
+
ContentCache(const FileEntry *Ent, const FileEntry *contentEnt)
: Buffer(nullptr, false), OrigEntry(Ent), ContentsEntry(contentEnt),
SourceLineCache(nullptr), NumLines(0), BufferOverridden(false),
@@ -231,7 +217,7 @@ namespace SrcMgr {
private:
// Disable assignments.
- ContentCache &operator=(const ContentCache& RHS) LLVM_DELETED_FUNCTION;
+ ContentCache &operator=(const ContentCache& RHS) = delete;
};
// Assert that the \c ContentCache objects will always be 8-byte aligned so
@@ -705,8 +691,8 @@ class SourceManager : public RefCountedBase<SourceManager> {
SmallVector<std::pair<std::string, FullSourceLoc>, 2> StoredModuleBuildStack;
// SourceManager doesn't support copy construction.
- explicit SourceManager(const SourceManager&) LLVM_DELETED_FUNCTION;
- void operator=(const SourceManager&) LLVM_DELETED_FUNCTION;
+ explicit SourceManager(const SourceManager&) = delete;
+ void operator=(const SourceManager&) = delete;
public:
SourceManager(DiagnosticsEngine &Diag, FileManager &FileMgr,
bool UserFilesAreVolatile = false);
@@ -1057,10 +1043,16 @@ public:
getImmediateExpansionRange(SourceLocation Loc) const;
/// \brief Given a SourceLocation object, return the range of
- /// tokens covered by the expansion the ultimate file.
+ /// tokens covered by the expansion in the ultimate file.
std::pair<SourceLocation,SourceLocation>
getExpansionRange(SourceLocation Loc) const;
+ /// \brief Given a SourceRange object, return the range of
+ /// tokens covered by the expansion in the ultimate file.
+ SourceRange getExpansionRange(SourceRange Range) const {
+ return SourceRange(getExpansionRange(Range.getBegin()).first,
+ getExpansionRange(Range.getEnd()).second);
+ }
/// \brief Given a SourceLocation object, return the spelling
/// location referenced by the ID.
diff --git a/include/clang/Basic/SourceManagerInternals.h b/include/clang/Basic/SourceManagerInternals.h
index f31d604..27dea9f 100644
--- a/include/clang/Basic/SourceManagerInternals.h
+++ b/include/clang/Basic/SourceManagerInternals.h
@@ -88,17 +88,12 @@ class LineTableInfo {
/// at which they occur in the file).
std::map<FileID, std::vector<LineEntry> > LineEntries;
public:
- LineTableInfo() {
- }
-
void clear() {
FilenameIDs.clear();
FilenamesByID.clear();
LineEntries.clear();
}
- ~LineTableInfo() {}
-
unsigned getLineTableFilenameID(StringRef Str);
const char *getFilename(unsigned ID) const {
assert(ID < FilenamesByID.size() && "Invalid FilenameID");
diff --git a/include/clang/Basic/Specifiers.h b/include/clang/Basic/Specifiers.h
index a968d00..7569c16 100644
--- a/include/clang/Basic/Specifiers.h
+++ b/include/clang/Basic/Specifiers.h
@@ -209,8 +209,9 @@ namespace clang {
CC_X86_64SysV, // __attribute__((sysv_abi))
CC_AAPCS, // __attribute__((pcs("aapcs")))
CC_AAPCS_VFP, // __attribute__((pcs("aapcs-vfp")))
- CC_PnaclCall, // __attribute__((pnaclcall))
- CC_IntelOclBicc // __attribute__((intel_ocl_bicc))
+ CC_IntelOclBicc, // __attribute__((intel_ocl_bicc))
+ CC_SpirFunction, // default for OpenCL functions on SPIR target
+ CC_SpirKernel // inferred for OpenCL kernels on SPIR target
};
/// \brief Checks whether the given calling convention supports variadic
@@ -222,6 +223,8 @@ namespace clang {
case CC_X86ThisCall:
case CC_X86Pascal:
case CC_X86VectorCall:
+ case CC_SpirFunction:
+ case CC_SpirKernel:
return false;
default:
return true;
diff --git a/include/clang/Basic/TargetBuiltins.h b/include/clang/Basic/TargetBuiltins.h
index e112c65..eece4e8 100644
--- a/include/clang/Basic/TargetBuiltins.h
+++ b/include/clang/Basic/TargetBuiltins.h
@@ -16,6 +16,7 @@
#ifndef LLVM_CLANG_BASIC_TARGETBUILTINS_H
#define LLVM_CLANG_BASIC_TARGETBUILTINS_H
+#include <stdint.h>
#include "clang/Basic/Builtins.h"
#undef PPC
@@ -175,6 +176,15 @@ namespace clang {
};
}
+ /// \brief SystemZ builtins
+ namespace SystemZ {
+ enum {
+ LastTIBuiltin = clang::Builtin::FirstTSBuiltin-1,
+#define BUILTIN(ID, TYPE, ATTRS) BI##ID,
+#include "clang/Basic/BuiltinsSystemZ.def"
+ LastTSBuiltin
+ };
+ }
} // end namespace clang.
#endif
diff --git a/include/clang/Basic/TargetInfo.h b/include/clang/Basic/TargetInfo.h
index 7a6462c..8406205 100644
--- a/include/clang/Basic/TargetInfo.h
+++ b/include/clang/Basic/TargetInfo.h
@@ -66,6 +66,7 @@ protected:
unsigned char LongWidth, LongAlign;
unsigned char LongLongWidth, LongLongAlign;
unsigned char SuitableAlign;
+ unsigned char DefaultAlignForAttributeAligned;
unsigned char MinGlobalAlign;
unsigned char MaxAtomicPromoteWidth, MaxAtomicInlineWidth;
unsigned short MaxVectorAlign;
@@ -314,6 +315,12 @@ public:
/// object with a fundamental alignment requirement.
unsigned getSuitableAlign() const { return SuitableAlign; }
+ /// \brief Return the default alignment for __attribute__((aligned)) on
+ /// this target, to be used if no alignment value is specified.
+ unsigned getDefaultAlignForAttributeAligned() const {
+ return DefaultAlignForAttributeAligned;
+ }
+
/// getMinGlobalAlign - Return the minimum alignment of a global variable,
/// unless its alignment is explicitly reduced via attributes.
unsigned getMinGlobalAlign() const { return MinGlobalAlign; }
@@ -638,6 +645,12 @@ public:
return std::string(1, *Constraint);
}
+ /// \brief Returns true if NaN encoding is IEEE 754-2008.
+ /// Only MIPS allows a different encoding.
+ virtual bool isNan2008() const {
+ return true;
+ }
+
/// \brief Returns a string of target-specific clobbers, in LLVM format.
virtual const char *getClobbers() const = 0;
@@ -836,7 +849,8 @@ public:
enum CallingConvCheckResult {
CCCR_OK,
- CCCR_Warning
+ CCCR_Warning,
+ CCCR_Ignore,
};
/// \brief Determines whether a given calling convention is valid for the
diff --git a/include/clang/Basic/TokenKinds.def b/include/clang/Basic/TokenKinds.def
index 3319d4e..28aafca 100644
--- a/include/clang/Basic/TokenKinds.def
+++ b/include/clang/Basic/TokenKinds.def
@@ -10,7 +10,7 @@
// This file defines the TokenKind database. This includes normal tokens like
// tok::ampamp (corresponding to the && token) as well as keywords for various
// languages. Users of this file must optionally #define the TOK, KEYWORD,
-// ALIAS, or PPKEYWORD macros to make use of this file.
+// CXX11_KEYWORD, ALIAS, or PPKEYWORD macros to make use of this file.
//
//===----------------------------------------------------------------------===//
@@ -23,6 +23,9 @@
#ifndef KEYWORD
#define KEYWORD(X,Y) TOK(kw_ ## X)
#endif
+#ifndef CXX11_KEYWORD
+#define CXX11_KEYWORD(X,Y) KEYWORD(X,KEYCXX11|(Y))
+#endif
#ifndef TYPE_TRAIT
#define TYPE_TRAIT(N,I,K) KEYWORD(I,K)
#endif
@@ -225,9 +228,10 @@ PUNCTUATOR(greatergreatergreater, ">>>")
// KEYCXX11 - This is a C++ keyword introduced to C++ in C++11
// KEYGNU - This is a keyword if GNU extensions are enabled
// KEYMS - This is a keyword if Microsoft extensions are enabled
-// KEYNOMS - This is a keyword that must never be enabled under
-// Microsoft mode
+// KEYNOMS18 - This is a keyword that must never be enabled under
+// MSVC <= v18.
// KEYOPENCL - This is a keyword in OpenCL
+// KEYNOOPENCL - This is a keyword that is not supported in OpenCL
// KEYALTIVEC - This is a keyword in AltiVec
// KEYBORLAND - This is a keyword if Borland extensions are enabled
// BOOLSUPPORT - This is a keyword if 'bool' is a built-in type
@@ -270,7 +274,7 @@ KEYWORD(volatile , KEYALL)
KEYWORD(while , KEYALL)
KEYWORD(_Alignas , KEYALL)
KEYWORD(_Alignof , KEYALL)
-KEYWORD(_Atomic , KEYALL|KEYNOMS)
+KEYWORD(_Atomic , KEYALL|KEYNOMS18|KEYNOOPENCL)
KEYWORD(_Bool , KEYNOCXX)
KEYWORD(_Complex , KEYALL)
KEYWORD(_Generic , KEYALL)
@@ -329,16 +333,16 @@ CXX_KEYWORD_OPERATOR(xor , caret)
CXX_KEYWORD_OPERATOR(xor_eq , caretequal)
// C++11 keywords
-KEYWORD(alignas , KEYCXX11)
-KEYWORD(alignof , KEYCXX11)
-KEYWORD(char16_t , KEYCXX11|KEYNOMS)
-KEYWORD(char32_t , KEYCXX11|KEYNOMS)
-KEYWORD(constexpr , KEYCXX11)
-KEYWORD(decltype , KEYCXX11)
-KEYWORD(noexcept , KEYCXX11)
-KEYWORD(nullptr , KEYCXX11)
-KEYWORD(static_assert , KEYCXX11)
-KEYWORD(thread_local , KEYCXX11)
+CXX11_KEYWORD(alignas , 0)
+CXX11_KEYWORD(alignof , 0)
+CXX11_KEYWORD(char16_t , KEYNOMS18)
+CXX11_KEYWORD(char32_t , KEYNOMS18)
+CXX11_KEYWORD(constexpr , 0)
+CXX11_KEYWORD(decltype , 0)
+CXX11_KEYWORD(noexcept , 0)
+CXX11_KEYWORD(nullptr , 0)
+CXX11_KEYWORD(static_assert , 0)
+CXX11_KEYWORD(thread_local , 0)
// GNU Extensions (in impl-reserved namespace)
KEYWORD(_Decimal32 , KEYALL)
@@ -454,7 +458,7 @@ KEYWORD(__private_extern__ , KEYALL)
KEYWORD(__module_private__ , KEYALL)
// Microsoft Extension.
-KEYWORD(__declspec , KEYALL)
+KEYWORD(__declspec , KEYMS|KEYBORLAND)
KEYWORD(__cdecl , KEYALL)
KEYWORD(__stdcall , KEYALL)
KEYWORD(__fastcall , KEYALL)
@@ -734,6 +738,7 @@ ANNOTATION(module_end)
#undef TYPE_TRAIT_2
#undef TYPE_TRAIT_1
#undef TYPE_TRAIT
+#undef CXX11_KEYWORD
#undef KEYWORD
#undef PUNCTUATOR
#undef TOK
diff --git a/include/clang/Basic/VersionTuple.h b/include/clang/Basic/VersionTuple.h
index 77fd947..784f3f3 100644
--- a/include/clang/Basic/VersionTuple.h
+++ b/include/clang/Basic/VersionTuple.h
@@ -22,40 +22,48 @@
namespace clang {
-/// \brief Represents a version number in the form major[.minor[.subminor]].
+/// \brief Represents a version number in the form major[.minor[.subminor[.build]]].
class VersionTuple {
unsigned Major : 31;
unsigned Minor : 31;
unsigned Subminor : 31;
+ unsigned Build : 31;
unsigned HasMinor : 1;
unsigned HasSubminor : 1;
+ unsigned HasBuild : 1;
unsigned UsesUnderscores : 1;
public:
- VersionTuple()
- : Major(0), Minor(0), Subminor(0), HasMinor(false), HasSubminor(false),
- UsesUnderscores(false) { }
+ VersionTuple()
+ : Major(0), Minor(0), Subminor(0), Build(0), HasMinor(false),
+ HasSubminor(false), HasBuild(false), UsesUnderscores(false) {}
explicit VersionTuple(unsigned Major)
- : Major(Major), Minor(0), Subminor(0), HasMinor(false), HasSubminor(false),
- UsesUnderscores(false)
- { }
+ : Major(Major), Minor(0), Subminor(0), Build(0), HasMinor(false),
+ HasSubminor(false), HasBuild(false), UsesUnderscores(false) {}
explicit VersionTuple(unsigned Major, unsigned Minor,
bool UsesUnderscores = false)
- : Major(Major), Minor(Minor), Subminor(0), HasMinor(true),
- HasSubminor(false), UsesUnderscores(UsesUnderscores)
- { }
+ : Major(Major), Minor(Minor), Subminor(0), Build(0), HasMinor(true),
+ HasSubminor(false), HasBuild(false), UsesUnderscores(UsesUnderscores) {}
explicit VersionTuple(unsigned Major, unsigned Minor, unsigned Subminor,
bool UsesUnderscores = false)
- : Major(Major), Minor(Minor), Subminor(Subminor), HasMinor(true),
- HasSubminor(true), UsesUnderscores(UsesUnderscores)
- { }
-
+ : Major(Major), Minor(Minor), Subminor(Subminor), Build(0),
+ HasMinor(true), HasSubminor(true), HasBuild(false),
+ UsesUnderscores(UsesUnderscores) {}
+
+ explicit VersionTuple(unsigned Major, unsigned Minor, unsigned Subminor,
+ unsigned Build, bool UsesUnderscores = false)
+ : Major(Major), Minor(Minor), Subminor(Subminor), Build(Build),
+ HasMinor(true), HasSubminor(true), HasBuild(true),
+ UsesUnderscores(UsesUnderscores) {}
+
/// \brief Determine whether this version information is empty
/// (e.g., all version components are zero).
- bool empty() const { return Major == 0 && Minor == 0 && Subminor == 0; }
+ bool empty() const {
+ return Major == 0 && Minor == 0 && Subminor == 0 && Build == 0;
+ }
/// \brief Retrieve the major version number.
unsigned getMajor() const { return Major; }
@@ -74,6 +82,13 @@ public:
return Subminor;
}
+ /// \brief Retrieve the build version number, if provided.
+ Optional<unsigned> getBuild() const {
+ if (!HasBuild)
+ return None;
+ return Build;
+ }
+
bool usesUnderscores() const {
return UsesUnderscores;
}
@@ -85,7 +100,8 @@ public:
/// \brief Determine if two version numbers are equivalent. If not
/// provided, minor and subminor version numbers are considered to be zero.
friend bool operator==(const VersionTuple& X, const VersionTuple &Y) {
- return X.Major == Y.Major && X.Minor == Y.Minor && X.Subminor == Y.Subminor;
+ return X.Major == Y.Major && X.Minor == Y.Minor &&
+ X.Subminor == Y.Subminor && X.Build == Y.Build;
}
/// \brief Determine if two version numbers are not equivalent.
@@ -101,8 +117,8 @@ public:
/// If not provided, minor and subminor version numbers are considered to be
/// zero.
friend bool operator<(const VersionTuple &X, const VersionTuple &Y) {
- return std::tie(X.Major, X.Minor, X.Subminor) <
- std::tie(Y.Major, Y.Minor, Y.Subminor);
+ return std::tie(X.Major, X.Minor, X.Subminor, X.Build) <
+ std::tie(Y.Major, Y.Minor, Y.Subminor, Y.Build);
}
/// \brief Determine whether one version number follows another.
@@ -136,7 +152,7 @@ public:
/// \brief Try to parse the given string as a version number.
/// \returns \c true if the string does not match the regular expression
- /// [0-9]+(\.[0-9]+(\.[0-9]+))
+ /// [0-9]+(\.[0-9]+){0,3}
bool tryParse(StringRef string);
};
OpenPOWER on IntegriCloud