mirror of https://github.com/microsoft/clang.git
Merge commit '7391f7f03cb48c406dcd855627888b9895263be7' into HEAD
This commit is contained in:
commit
af5b7b65ac
|
@ -451,7 +451,7 @@ def Availability : InheritableAttr {
|
||||||
let Args = [IdentifierArgument<"platform">, VersionArgument<"introduced">,
|
let Args = [IdentifierArgument<"platform">, VersionArgument<"introduced">,
|
||||||
VersionArgument<"deprecated">, VersionArgument<"obsoleted">,
|
VersionArgument<"deprecated">, VersionArgument<"obsoleted">,
|
||||||
BoolArgument<"unavailable">, StringArgument<"message">,
|
BoolArgument<"unavailable">, StringArgument<"message">,
|
||||||
BoolArgument<"nopartial">];
|
BoolArgument<"strict">];
|
||||||
let AdditionalMembers =
|
let AdditionalMembers =
|
||||||
[{static llvm::StringRef getPrettyPlatformName(llvm::StringRef Platform) {
|
[{static llvm::StringRef getPrettyPlatformName(llvm::StringRef Platform) {
|
||||||
return llvm::StringSwitch<llvm::StringRef>(Platform)
|
return llvm::StringSwitch<llvm::StringRef>(Platform)
|
||||||
|
|
|
@ -685,20 +685,21 @@ are:
|
||||||
Apple's watchOS operating system. The minimum deployment target is specified by
|
Apple's watchOS operating system. The minimum deployment target is specified by
|
||||||
the ``-mwatchos-version-min=*version*`` command-line argument.
|
the ``-mwatchos-version-min=*version*`` command-line argument.
|
||||||
|
|
||||||
An optional nopartial can be placed after the platform name.
|
A declaration can typically be used even when deploying back to a platform
|
||||||
With the optional nopartial, when deploying back to a platform version prior to
|
version prior to when the declaration was introduced. When this happens, the
|
||||||
when the declaration was introduced, Clang emits an error specifying that the
|
declaration is `weakly linked
|
||||||
function is not introduced yet.
|
|
||||||
|
|
||||||
Without the optional nopartial, a declaration can be used even when deploying back
|
|
||||||
to a platform version prior to when the declaration was introduced. When this
|
|
||||||
happens, the declaration is `weakly linked
|
|
||||||
<https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html>`_,
|
<https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html>`_,
|
||||||
as if the ``weak_import`` attribute were added to the declaration. A
|
as if the ``weak_import`` attribute were added to the declaration. A
|
||||||
weakly-linked declaration may or may not be present a run-time, and a program
|
weakly-linked declaration may or may not be present a run-time, and a program
|
||||||
can determine whether the declaration is present by checking whether the
|
can determine whether the declaration is present by checking whether the
|
||||||
address of that declaration is non-NULL.
|
address of that declaration is non-NULL.
|
||||||
|
|
||||||
|
The flag ``strict`` disallows using API when deploying back to a
|
||||||
|
platform version prior to when the declaration was introduced. An
|
||||||
|
attempt to use such API before its introduction causes a hard error.
|
||||||
|
Weakly-linking is almost always a better API choice, since it allows
|
||||||
|
users to query availability at runtime.
|
||||||
|
|
||||||
If there are multiple declarations of the same entity, the availability
|
If there are multiple declarations of the same entity, the availability
|
||||||
attributes must either match on a per-platform basis or later
|
attributes must either match on a per-platform basis or later
|
||||||
declarations must not have availability attributes for that
|
declarations must not have availability attributes for that
|
||||||
|
|
|
@ -1590,6 +1590,24 @@ TARGET_BUILTIN(__builtin_ia32_pmovsxwd128_mask, "V4iV8sV4iUc","","avx512vl")
|
||||||
TARGET_BUILTIN(__builtin_ia32_pmovsxwd256_mask, "V8iV8sV8iUc","","avx512vl")
|
TARGET_BUILTIN(__builtin_ia32_pmovsxwd256_mask, "V8iV8sV8iUc","","avx512vl")
|
||||||
TARGET_BUILTIN(__builtin_ia32_pmovsxwq128_mask, "V2LLiV8sV2LLiUc","","avx512vl")
|
TARGET_BUILTIN(__builtin_ia32_pmovsxwq128_mask, "V2LLiV8sV2LLiUc","","avx512vl")
|
||||||
TARGET_BUILTIN(__builtin_ia32_pmovsxwq256_mask, "V4LLiV8sV4LLiUc","","avx512vl")
|
TARGET_BUILTIN(__builtin_ia32_pmovsxwq256_mask, "V4LLiV8sV4LLiUc","","avx512vl")
|
||||||
|
TARGET_BUILTIN(__builtin_ia32_pmovzxbw512_mask, "V32sV32cV32sUi","","avx512bw")
|
||||||
|
TARGET_BUILTIN(__builtin_ia32_pmovzxbd512_mask, "V16iV16cV16iUs","","avx512f")
|
||||||
|
TARGET_BUILTIN(__builtin_ia32_pmovzxbq512_mask, "V8LLiV16cV8LLiUc","","avx512f")
|
||||||
|
TARGET_BUILTIN(__builtin_ia32_pmovzxdq512_mask, "V8LLiV8iV8LLiUc","","avx512f")
|
||||||
|
TARGET_BUILTIN(__builtin_ia32_pmovzxwd512_mask, "V16iV16sV16iUs","","avx512f")
|
||||||
|
TARGET_BUILTIN(__builtin_ia32_pmovzxwq512_mask, "V8LLiV8sV8LLiUc","","avx512f")
|
||||||
|
TARGET_BUILTIN(__builtin_ia32_pmovzxbw128_mask, "V8sV16cV8sUc","","avx512vl,avx512bw")
|
||||||
|
TARGET_BUILTIN(__builtin_ia32_pmovzxbw256_mask, "V16sV16cV16sUs","","avx512vl,avx512bw")
|
||||||
|
TARGET_BUILTIN(__builtin_ia32_pmovzxbd128_mask, "V4iV16cV4iUc","","avx512vl")
|
||||||
|
TARGET_BUILTIN(__builtin_ia32_pmovzxbd256_mask, "V8iV16cV8iUc","","avx512vl")
|
||||||
|
TARGET_BUILTIN(__builtin_ia32_pmovzxbq128_mask, "V2LLiV16cV2LLiUc","","avx512vl")
|
||||||
|
TARGET_BUILTIN(__builtin_ia32_pmovzxbq256_mask, "V4LLiV16cV4LLiUc","","avx512vl")
|
||||||
|
TARGET_BUILTIN(__builtin_ia32_pmovzxdq128_mask, "V2LLiV4iV2LLiUc","","avx512vl")
|
||||||
|
TARGET_BUILTIN(__builtin_ia32_pmovzxdq256_mask, "V4LLiV4iV4LLiUc","","avx512vl")
|
||||||
|
TARGET_BUILTIN(__builtin_ia32_pmovzxwd128_mask, "V4iV8sV4iUc","","avx512vl")
|
||||||
|
TARGET_BUILTIN(__builtin_ia32_pmovzxwd256_mask, "V8iV8sV8iUc","","avx512vl")
|
||||||
|
TARGET_BUILTIN(__builtin_ia32_pmovzxwq128_mask, "V2LLiV8sV2LLiUc","","avx512vl")
|
||||||
|
TARGET_BUILTIN(__builtin_ia32_pmovzxwq256_mask, "V4LLiV8sV4LLiUc","","avx512vl")
|
||||||
|
|
||||||
#undef BUILTIN
|
#undef BUILTIN
|
||||||
#undef TARGET_BUILTIN
|
#undef TARGET_BUILTIN
|
||||||
|
|
|
@ -87,7 +87,6 @@ def DeprecatedAttributes : DiagGroup<"deprecated-attributes">;
|
||||||
def DeprecatedDeclarations : DiagGroup<"deprecated-declarations">;
|
def DeprecatedDeclarations : DiagGroup<"deprecated-declarations">;
|
||||||
def UnavailableDeclarations : DiagGroup<"unavailable-declarations">;
|
def UnavailableDeclarations : DiagGroup<"unavailable-declarations">;
|
||||||
def PartialAvailability : DiagGroup<"partial-availability">;
|
def PartialAvailability : DiagGroup<"partial-availability">;
|
||||||
def NotYetIntroducedDeclarations : DiagGroup<"not-yet-introduced-declarations">;
|
|
||||||
def DeprecatedImplementations :DiagGroup<"deprecated-implementations">;
|
def DeprecatedImplementations :DiagGroup<"deprecated-implementations">;
|
||||||
def DeprecatedIncrementBool : DiagGroup<"deprecated-increment-bool">;
|
def DeprecatedIncrementBool : DiagGroup<"deprecated-increment-bool">;
|
||||||
def DeprecatedRegister : DiagGroup<"deprecated-register">;
|
def DeprecatedRegister : DiagGroup<"deprecated-register">;
|
||||||
|
|
|
@ -841,7 +841,7 @@ def warn_accessor_property_type_mismatch : Warning<
|
||||||
def not_conv_function_declared_at : Note<"type conversion function declared here">;
|
def not_conv_function_declared_at : Note<"type conversion function declared here">;
|
||||||
def note_method_declared_at : Note<"method %0 declared here">;
|
def note_method_declared_at : Note<"method %0 declared here">;
|
||||||
def note_property_attribute : Note<"property %0 is declared "
|
def note_property_attribute : Note<"property %0 is declared "
|
||||||
"%select{deprecated|unavailable|partial|not-yet-introduced}1 here">;
|
"%select{deprecated|unavailable|partial}1 here">;
|
||||||
def err_setter_type_void : Error<"type of setter must be void">;
|
def err_setter_type_void : Error<"type of setter must be void">;
|
||||||
def err_duplicate_method_decl : Error<"duplicate declaration of method %0">;
|
def err_duplicate_method_decl : Error<"duplicate declaration of method %0">;
|
||||||
def warn_duplicate_method_decl :
|
def warn_duplicate_method_decl :
|
||||||
|
@ -4128,14 +4128,9 @@ def err_unavailable_message : Error<"%0 is unavailable: %1">;
|
||||||
def warn_unavailable_fwdclass_message : Warning<
|
def warn_unavailable_fwdclass_message : Warning<
|
||||||
"%0 may be unavailable because the receiver type is unknown">,
|
"%0 may be unavailable because the receiver type is unknown">,
|
||||||
InGroup<UnavailableDeclarations>;
|
InGroup<UnavailableDeclarations>;
|
||||||
def err_notyetintroduced : Error<"%0 is not introduced yet">;
|
|
||||||
def err_notyetintroduced_message : Error<"%0 is not introduced yet: %1">;
|
|
||||||
def warn_notyetintroduced_fwdclass_message : Warning<
|
|
||||||
"%0 may not be introduced because the receiver type is unknown">,
|
|
||||||
InGroup<NotYetIntroducedDeclarations>;
|
|
||||||
def note_availability_specified_here : Note<
|
def note_availability_specified_here : Note<
|
||||||
"%0 has been explicitly marked "
|
"%0 has been explicitly marked "
|
||||||
"%select{unavailable|deleted|deprecated|partial|not-yet-introduced}1 here">;
|
"%select{unavailable|deleted|deprecated|partial}1 here">;
|
||||||
def note_implicitly_deleted : Note<
|
def note_implicitly_deleted : Note<
|
||||||
"explicitly defaulted function was implicitly deleted here">;
|
"explicitly defaulted function was implicitly deleted here">;
|
||||||
def note_inherited_deleted_here : Note<
|
def note_inherited_deleted_here : Note<
|
||||||
|
|
|
@ -134,8 +134,8 @@ class Parser : public CodeCompletionHandler {
|
||||||
/// \brief Identifier for "message".
|
/// \brief Identifier for "message".
|
||||||
IdentifierInfo *Ident_message;
|
IdentifierInfo *Ident_message;
|
||||||
|
|
||||||
/// \brief Identifier for "nopartial".
|
/// \brief Identifier for "strict".
|
||||||
IdentifierInfo *Ident_nopartial;
|
IdentifierInfo *Ident_strict;
|
||||||
|
|
||||||
/// C++0x contextual keywords.
|
/// C++0x contextual keywords.
|
||||||
mutable IdentifierInfo *Ident_final;
|
mutable IdentifierInfo *Ident_final;
|
||||||
|
|
|
@ -157,13 +157,13 @@ private:
|
||||||
+ NumArgs)[index];
|
+ NumArgs)[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The location of the 'nopartial' keyword in an availability attribute.
|
/// The location of the 'strict' keyword in an availability attribute.
|
||||||
SourceLocation *getNopartialSlot() {
|
SourceLocation *getStrictSlot() {
|
||||||
return reinterpret_cast<SourceLocation*>(
|
return reinterpret_cast<SourceLocation*>(
|
||||||
&getAvailabilitySlot(ObsoletedSlot) + 1);
|
&getAvailabilitySlot(ObsoletedSlot) + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
SourceLocation const *getNopartialSlot() const {
|
SourceLocation const *getStrictSlot() const {
|
||||||
return reinterpret_cast<SourceLocation const*>(
|
return reinterpret_cast<SourceLocation const*>(
|
||||||
&getAvailabilitySlot(ObsoletedSlot) + 1);
|
&getAvailabilitySlot(ObsoletedSlot) + 1);
|
||||||
}
|
}
|
||||||
|
@ -244,7 +244,7 @@ private:
|
||||||
const AvailabilityChange &obsoleted,
|
const AvailabilityChange &obsoleted,
|
||||||
SourceLocation unavailable,
|
SourceLocation unavailable,
|
||||||
const Expr *messageExpr,
|
const Expr *messageExpr,
|
||||||
Syntax syntaxUsed, SourceLocation nopartial)
|
Syntax syntaxUsed, SourceLocation strict)
|
||||||
: AttrName(attrName), ScopeName(scopeName), AttrRange(attrRange),
|
: AttrName(attrName), ScopeName(scopeName), AttrRange(attrRange),
|
||||||
ScopeLoc(scopeLoc), EllipsisLoc(), NumArgs(1), SyntaxUsed(syntaxUsed),
|
ScopeLoc(scopeLoc), EllipsisLoc(), NumArgs(1), SyntaxUsed(syntaxUsed),
|
||||||
Invalid(false), UsedAsTypeAttr(false), IsAvailability(true),
|
Invalid(false), UsedAsTypeAttr(false), IsAvailability(true),
|
||||||
|
@ -256,7 +256,7 @@ private:
|
||||||
new (&getAvailabilitySlot(IntroducedSlot)) AvailabilityChange(introduced);
|
new (&getAvailabilitySlot(IntroducedSlot)) AvailabilityChange(introduced);
|
||||||
new (&getAvailabilitySlot(DeprecatedSlot)) AvailabilityChange(deprecated);
|
new (&getAvailabilitySlot(DeprecatedSlot)) AvailabilityChange(deprecated);
|
||||||
new (&getAvailabilitySlot(ObsoletedSlot)) AvailabilityChange(obsoleted);
|
new (&getAvailabilitySlot(ObsoletedSlot)) AvailabilityChange(obsoleted);
|
||||||
memcpy(getNopartialSlot(), &nopartial, sizeof(SourceLocation));
|
memcpy(getStrictSlot(), &strict, sizeof(SourceLocation));
|
||||||
AttrKind = getKind(getName(), getScopeName(), syntaxUsed);
|
AttrKind = getKind(getName(), getScopeName(), syntaxUsed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -424,9 +424,9 @@ public:
|
||||||
return getAvailabilitySlot(ObsoletedSlot);
|
return getAvailabilitySlot(ObsoletedSlot);
|
||||||
}
|
}
|
||||||
|
|
||||||
SourceLocation getNopartialLoc() const {
|
SourceLocation getStrictLoc() const {
|
||||||
assert(getKind() == AT_Availability && "Not an availability attribute");
|
assert(getKind() == AT_Availability && "Not an availability attribute");
|
||||||
return *getNopartialSlot();
|
return *getStrictSlot();
|
||||||
}
|
}
|
||||||
|
|
||||||
SourceLocation getUnavailableLoc() const {
|
SourceLocation getUnavailableLoc() const {
|
||||||
|
@ -624,13 +624,13 @@ public:
|
||||||
SourceLocation unavailable,
|
SourceLocation unavailable,
|
||||||
const Expr *MessageExpr,
|
const Expr *MessageExpr,
|
||||||
AttributeList::Syntax syntax,
|
AttributeList::Syntax syntax,
|
||||||
SourceLocation nopartial) {
|
SourceLocation strict) {
|
||||||
void *memory = allocate(AttributeFactory::AvailabilityAllocSize);
|
void *memory = allocate(AttributeFactory::AvailabilityAllocSize);
|
||||||
return add(new (memory) AttributeList(attrName, attrRange,
|
return add(new (memory) AttributeList(attrName, attrRange,
|
||||||
scopeName, scopeLoc,
|
scopeName, scopeLoc,
|
||||||
Param, introduced, deprecated,
|
Param, introduced, deprecated,
|
||||||
obsoleted, unavailable, MessageExpr,
|
obsoleted, unavailable, MessageExpr,
|
||||||
syntax, nopartial));
|
syntax, strict));
|
||||||
}
|
}
|
||||||
|
|
||||||
AttributeList *create(IdentifierInfo *attrName, SourceRange attrRange,
|
AttributeList *create(IdentifierInfo *attrName, SourceRange attrRange,
|
||||||
|
@ -760,11 +760,11 @@ public:
|
||||||
SourceLocation unavailable,
|
SourceLocation unavailable,
|
||||||
const Expr *MessageExpr,
|
const Expr *MessageExpr,
|
||||||
AttributeList::Syntax syntax,
|
AttributeList::Syntax syntax,
|
||||||
SourceLocation nopartial) {
|
SourceLocation strict) {
|
||||||
AttributeList *attr =
|
AttributeList *attr =
|
||||||
pool.create(attrName, attrRange, scopeName, scopeLoc, Param, introduced,
|
pool.create(attrName, attrRange, scopeName, scopeLoc, Param, introduced,
|
||||||
deprecated, obsoleted, unavailable, MessageExpr, syntax,
|
deprecated, obsoleted, unavailable, MessageExpr, syntax,
|
||||||
nopartial);
|
strict);
|
||||||
add(attr);
|
add(attr);
|
||||||
return attr;
|
return attr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,8 +113,7 @@ private:
|
||||||
/// the complete parsing of the current declaration.
|
/// the complete parsing of the current declaration.
|
||||||
class DelayedDiagnostic {
|
class DelayedDiagnostic {
|
||||||
public:
|
public:
|
||||||
enum DDKind { Deprecation, Unavailable, Access, ForbiddenType,
|
enum DDKind { Deprecation, Unavailable, Access, ForbiddenType };
|
||||||
NotYetIntroduced };
|
|
||||||
|
|
||||||
unsigned char Kind; // actually a DDKind
|
unsigned char Kind; // actually a DDKind
|
||||||
bool Triggered;
|
bool Triggered;
|
||||||
|
@ -166,15 +165,13 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
const NamedDecl *getDeprecationDecl() const {
|
const NamedDecl *getDeprecationDecl() const {
|
||||||
assert((Kind == Deprecation || Kind == Unavailable ||
|
assert((Kind == Deprecation || Kind == Unavailable) &&
|
||||||
Kind == NotYetIntroduced) &&
|
|
||||||
"Not a deprecation diagnostic.");
|
"Not a deprecation diagnostic.");
|
||||||
return DeprecationData.Decl;
|
return DeprecationData.Decl;
|
||||||
}
|
}
|
||||||
|
|
||||||
StringRef getDeprecationMessage() const {
|
StringRef getDeprecationMessage() const {
|
||||||
assert((Kind == Deprecation || Kind == Unavailable ||
|
assert((Kind == Deprecation || Kind == Unavailable) &&
|
||||||
Kind == NotYetIntroduced) &&
|
|
||||||
"Not a deprecation diagnostic.");
|
"Not a deprecation diagnostic.");
|
||||||
return StringRef(DeprecationData.Message,
|
return StringRef(DeprecationData.Message,
|
||||||
DeprecationData.MessageLen);
|
DeprecationData.MessageLen);
|
||||||
|
|
|
@ -2108,7 +2108,7 @@ public:
|
||||||
VersionTuple Obsoleted,
|
VersionTuple Obsoleted,
|
||||||
bool IsUnavailable,
|
bool IsUnavailable,
|
||||||
StringRef Message,
|
StringRef Message,
|
||||||
bool IsNopartial,
|
bool IsStrict,
|
||||||
AvailabilityMergeKind AMK,
|
AvailabilityMergeKind AMK,
|
||||||
unsigned AttrSpellingListIndex);
|
unsigned AttrSpellingListIndex);
|
||||||
TypeVisibilityAttr *mergeTypeVisibilityAttr(Decl *D, SourceRange Range,
|
TypeVisibilityAttr *mergeTypeVisibilityAttr(Decl *D, SourceRange Range,
|
||||||
|
@ -3536,8 +3536,7 @@ public:
|
||||||
|
|
||||||
void redelayDiagnostics(sema::DelayedDiagnosticPool &pool);
|
void redelayDiagnostics(sema::DelayedDiagnosticPool &pool);
|
||||||
|
|
||||||
enum AvailabilityDiagnostic { AD_Deprecation, AD_Unavailable, AD_Partial,
|
enum AvailabilityDiagnostic { AD_Deprecation, AD_Unavailable, AD_Partial };
|
||||||
AD_NotYetIntroduced };
|
|
||||||
|
|
||||||
void EmitAvailabilityWarning(AvailabilityDiagnostic AD,
|
void EmitAvailabilityWarning(AvailabilityDiagnostic AD,
|
||||||
NamedDecl *D, StringRef Message,
|
NamedDecl *D, StringRef Message,
|
||||||
|
|
|
@ -1522,6 +1522,33 @@ _mm512_maskz_cvtepi8_epi16 (__mmask32 __U, __m256i __A)
|
||||||
(__mmask32) __U);
|
(__mmask32) __U);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||||
|
_mm512_cvtepu8_epi16 (__m256i __A)
|
||||||
|
{
|
||||||
|
return (__m512i) __builtin_ia32_pmovzxbw512_mask ((__v32qi) __A,
|
||||||
|
(__v32hi)
|
||||||
|
_mm512_setzero_hi (),
|
||||||
|
(__mmask32) -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||||
|
_mm512_mask_cvtepu8_epi16 (__m512i __W, __mmask32 __U, __m256i __A)
|
||||||
|
{
|
||||||
|
return (__m512i) __builtin_ia32_pmovzxbw512_mask ((__v32qi) __A,
|
||||||
|
(__v32hi) __W,
|
||||||
|
(__mmask32) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||||
|
_mm512_maskz_cvtepu8_epi16 (__mmask32 __U, __m256i __A)
|
||||||
|
{
|
||||||
|
return (__m512i) __builtin_ia32_pmovzxbw512_mask ((__v32qi) __A,
|
||||||
|
(__v32hi)
|
||||||
|
_mm512_setzero_hi(),
|
||||||
|
(__mmask32) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#define _mm512_cmp_epi8_mask(a, b, p) __extension__ ({ \
|
#define _mm512_cmp_epi8_mask(a, b, p) __extension__ ({ \
|
||||||
(__mmask16)__builtin_ia32_cmpb512_mask((__v64qi)(__m512i)(a), \
|
(__mmask16)__builtin_ia32_cmpb512_mask((__v64qi)(__m512i)(a), \
|
||||||
(__v64qi)(__m512i)(b), \
|
(__v64qi)(__m512i)(b), \
|
||||||
|
|
|
@ -3159,6 +3159,137 @@ _mm512_maskz_cvtepi16_epi64 (__mmask8 __U, __m128i __A)
|
||||||
(__mmask8) __U);
|
(__mmask8) __U);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||||
|
_mm512_cvtepu8_epi32 (__m128i __A)
|
||||||
|
{
|
||||||
|
return (__m512i) __builtin_ia32_pmovzxbd512_mask ((__v16qi) __A,
|
||||||
|
(__v16si)
|
||||||
|
_mm512_setzero_si512 (),
|
||||||
|
(__mmask16) -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||||
|
_mm512_mask_cvtepu8_epi32 (__m512i __W, __mmask16 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m512i) __builtin_ia32_pmovzxbd512_mask ((__v16qi) __A,
|
||||||
|
(__v16si) __W,
|
||||||
|
(__mmask16) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||||
|
_mm512_maskz_cvtepu8_epi32 (__mmask16 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m512i) __builtin_ia32_pmovzxbd512_mask ((__v16qi) __A,
|
||||||
|
(__v16si)
|
||||||
|
_mm512_setzero_si512 (),
|
||||||
|
(__mmask16) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||||
|
_mm512_cvtepu8_epi64 (__m128i __A)
|
||||||
|
{
|
||||||
|
return (__m512i) __builtin_ia32_pmovzxbq512_mask ((__v16qi) __A,
|
||||||
|
(__v8di)
|
||||||
|
_mm512_setzero_si512 (),
|
||||||
|
(__mmask8) -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||||
|
_mm512_mask_cvtepu8_epi64 (__m512i __W, __mmask8 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m512i) __builtin_ia32_pmovzxbq512_mask ((__v16qi) __A,
|
||||||
|
(__v8di) __W,
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||||
|
_mm512_maskz_cvtepu8_epi64 (__mmask8 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m512i) __builtin_ia32_pmovzxbq512_mask ((__v16qi) __A,
|
||||||
|
(__v8di)
|
||||||
|
_mm512_setzero_si512 (),
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||||
|
_mm512_cvtepu32_epi64 (__m256i __X)
|
||||||
|
{
|
||||||
|
return (__m512i) __builtin_ia32_pmovzxdq512_mask ((__v8si) __X,
|
||||||
|
(__v8di)
|
||||||
|
_mm512_setzero_si512 (),
|
||||||
|
(__mmask8) -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||||
|
_mm512_mask_cvtepu32_epi64 (__m512i __W, __mmask8 __U, __m256i __X)
|
||||||
|
{
|
||||||
|
return (__m512i) __builtin_ia32_pmovzxdq512_mask ((__v8si) __X,
|
||||||
|
(__v8di) __W,
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||||
|
_mm512_maskz_cvtepu32_epi64 (__mmask8 __U, __m256i __X)
|
||||||
|
{
|
||||||
|
return (__m512i) __builtin_ia32_pmovzxdq512_mask ((__v8si) __X,
|
||||||
|
(__v8di)
|
||||||
|
_mm512_setzero_si512 (),
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||||
|
_mm512_cvtepu16_epi32 (__m256i __A)
|
||||||
|
{
|
||||||
|
return (__m512i) __builtin_ia32_pmovzxwd512_mask ((__v16hi) __A,
|
||||||
|
(__v16si)
|
||||||
|
_mm512_setzero_si512 (),
|
||||||
|
(__mmask16) -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||||
|
_mm512_mask_cvtepu16_epi32 (__m512i __W, __mmask16 __U, __m256i __A)
|
||||||
|
{
|
||||||
|
return (__m512i) __builtin_ia32_pmovzxwd512_mask ((__v16hi) __A,
|
||||||
|
(__v16si) __W,
|
||||||
|
(__mmask16) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||||
|
_mm512_maskz_cvtepu16_epi32 (__mmask16 __U, __m256i __A)
|
||||||
|
{
|
||||||
|
return (__m512i) __builtin_ia32_pmovzxwd512_mask ((__v16hi) __A,
|
||||||
|
(__v16si)
|
||||||
|
_mm512_setzero_si512 (),
|
||||||
|
(__mmask16) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||||
|
_mm512_cvtepu16_epi64 (__m128i __A)
|
||||||
|
{
|
||||||
|
return (__m512i) __builtin_ia32_pmovzxwq512_mask ((__v8hi) __A,
|
||||||
|
(__v8di)
|
||||||
|
_mm512_setzero_si512 (),
|
||||||
|
(__mmask8) -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||||
|
_mm512_mask_cvtepu16_epi64 (__m512i __W, __mmask8 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m512i) __builtin_ia32_pmovzxwq512_mask ((__v8hi) __A,
|
||||||
|
(__v8di) __W,
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||||
|
_mm512_maskz_cvtepu16_epi64 (__mmask8 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m512i) __builtin_ia32_pmovzxwq512_mask ((__v8hi) __A,
|
||||||
|
(__v8di)
|
||||||
|
_mm512_setzero_si512 (),
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#define _mm512_cmp_epi32_mask(a, b, p) __extension__ ({ \
|
#define _mm512_cmp_epi32_mask(a, b, p) __extension__ ({ \
|
||||||
(__mmask16)__builtin_ia32_cmpd512_mask((__v16si)(__m512i)(a), \
|
(__mmask16)__builtin_ia32_cmpd512_mask((__v16si)(__m512i)(a), \
|
||||||
(__v16si)(__m512i)(b), (p), \
|
(__v16si)(__m512i)(b), (p), \
|
||||||
|
|
|
@ -2286,6 +2286,41 @@ _mm256_maskz_cvtepi8_epi16 (__mmask16 __U, __m128i __A)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||||
|
_mm_mask_cvtepu8_epi16 (__m128i __W, __mmask32 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmovzxbw128_mask ((__v16qi) __A,
|
||||||
|
(__v8hi) __W,
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||||
|
_mm_maskz_cvtepu8_epi16 (__mmask8 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmovzxbw128_mask ((__v16qi) __A,
|
||||||
|
(__v8hi)
|
||||||
|
_mm_setzero_si128 (),
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __DEFAULT_FN_ATTRS
|
||||||
|
_mm256_mask_cvtepu8_epi16 (__m256i __W, __mmask32 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m256i) __builtin_ia32_pmovzxbw256_mask ((__v16qi) __A,
|
||||||
|
(__v16hi) __W,
|
||||||
|
(__mmask16) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __DEFAULT_FN_ATTRS
|
||||||
|
_mm256_maskz_cvtepu8_epi16 (__mmask16 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m256i) __builtin_ia32_pmovzxbw256_mask ((__v16qi) __A,
|
||||||
|
(__v16hi)
|
||||||
|
_mm256_setzero_si256 (),
|
||||||
|
(__mmask16) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#define _mm_cmp_epi8_mask(a, b, p) __extension__ ({ \
|
#define _mm_cmp_epi8_mask(a, b, p) __extension__ ({ \
|
||||||
(__mmask16)__builtin_ia32_cmpb128_mask((__v16qi)(__m128i)(a), \
|
(__mmask16)__builtin_ia32_cmpb128_mask((__v16qi)(__m128i)(a), \
|
||||||
(__v16qi)(__m128i)(b), \
|
(__v16qi)(__m128i)(b), \
|
||||||
|
|
|
@ -4771,6 +4771,177 @@ _mm256_maskz_cvtepi16_epi64 (__mmask8 __U, __m128i __A)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||||
|
_mm_mask_cvtepu8_epi32 (__m128i __W, __mmask8 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmovzxbd128_mask ((__v16qi) __A,
|
||||||
|
(__v4si) __W,
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||||
|
_mm_maskz_cvtepu8_epi32 (__mmask8 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmovzxbd128_mask ((__v16qi) __A,
|
||||||
|
(__v4si)
|
||||||
|
_mm_setzero_si128 (),
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __DEFAULT_FN_ATTRS
|
||||||
|
_mm256_mask_cvtepu8_epi32 (__m256i __W, __mmask8 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m256i) __builtin_ia32_pmovzxbd256_mask ((__v16qi) __A,
|
||||||
|
(__v8si) __W,
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __DEFAULT_FN_ATTRS
|
||||||
|
_mm256_maskz_cvtepu8_epi32 (__mmask8 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m256i) __builtin_ia32_pmovzxbd256_mask ((__v16qi) __A,
|
||||||
|
(__v8si)
|
||||||
|
_mm256_setzero_si256 (),
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||||
|
_mm_mask_cvtepu8_epi64 (__m128i __W, __mmask8 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmovzxbq128_mask ((__v16qi) __A,
|
||||||
|
(__v2di) __W,
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||||
|
_mm_maskz_cvtepu8_epi64 (__mmask8 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmovzxbq128_mask ((__v16qi) __A,
|
||||||
|
(__v2di)
|
||||||
|
_mm_setzero_si128 (),
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __DEFAULT_FN_ATTRS
|
||||||
|
_mm256_mask_cvtepu8_epi64 (__m256i __W, __mmask8 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m256i) __builtin_ia32_pmovzxbq256_mask ((__v16qi) __A,
|
||||||
|
(__v4di) __W,
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __DEFAULT_FN_ATTRS
|
||||||
|
_mm256_maskz_cvtepu8_epi64 (__mmask8 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m256i) __builtin_ia32_pmovzxbq256_mask ((__v16qi) __A,
|
||||||
|
(__v4di)
|
||||||
|
_mm256_setzero_si256 (),
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||||
|
_mm_mask_cvtepu32_epi64 (__m128i __W, __mmask8 __U, __m128i __X)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmovzxdq128_mask ((__v4si) __X,
|
||||||
|
(__v2di) __W,
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||||
|
_mm_maskz_cvtepu32_epi64 (__mmask8 __U, __m128i __X)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmovzxdq128_mask ((__v4si) __X,
|
||||||
|
(__v2di)
|
||||||
|
_mm_setzero_si128 (),
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __DEFAULT_FN_ATTRS
|
||||||
|
_mm256_mask_cvtepu32_epi64 (__m256i __W, __mmask8 __U, __m128i __X)
|
||||||
|
{
|
||||||
|
return (__m256i) __builtin_ia32_pmovzxdq256_mask ((__v4si) __X,
|
||||||
|
(__v4di) __W,
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __DEFAULT_FN_ATTRS
|
||||||
|
_mm256_maskz_cvtepu32_epi64 (__mmask8 __U, __m128i __X)
|
||||||
|
{
|
||||||
|
return (__m256i) __builtin_ia32_pmovzxdq256_mask ((__v4si) __X,
|
||||||
|
(__v4di)
|
||||||
|
_mm256_setzero_si256 (),
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||||
|
_mm_mask_cvtepu16_epi32 (__m128i __W, __mmask8 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmovzxwd128_mask ((__v8hi) __A,
|
||||||
|
(__v4si) __W,
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||||
|
_mm_maskz_cvtepu16_epi32 (__mmask8 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmovzxwd128_mask ((__v8hi) __A,
|
||||||
|
(__v4si)
|
||||||
|
_mm_setzero_si128 (),
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __DEFAULT_FN_ATTRS
|
||||||
|
_mm256_mask_cvtepu16_epi32 (__m256i __W, __mmask8 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m256i) __builtin_ia32_pmovzxwd256_mask ((__v8hi) __A,
|
||||||
|
(__v8si) __W,
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __DEFAULT_FN_ATTRS
|
||||||
|
_mm256_maskz_cvtepu16_epi32 (__mmask8 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m256i) __builtin_ia32_pmovzxwd256_mask ((__v8hi) __A,
|
||||||
|
(__v8si)
|
||||||
|
_mm256_setzero_si256 (),
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||||
|
_mm_mask_cvtepu16_epi64 (__m128i __W, __mmask8 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmovzxwq128_mask ((__v8hi) __A,
|
||||||
|
(__v2di) __W,
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||||
|
_mm_maskz_cvtepu16_epi64 (__mmask8 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m128i) __builtin_ia32_pmovzxwq128_mask ((__v8hi) __A,
|
||||||
|
(__v2di)
|
||||||
|
_mm_setzero_si128 (),
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __DEFAULT_FN_ATTRS
|
||||||
|
_mm256_mask_cvtepu16_epi64 (__m256i __W, __mmask8 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m256i) __builtin_ia32_pmovzxwq256_mask ((__v8hi) __A,
|
||||||
|
(__v4di) __W,
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ __m256i __DEFAULT_FN_ATTRS
|
||||||
|
_mm256_maskz_cvtepu16_epi64 (__mmask8 __U, __m128i __A)
|
||||||
|
{
|
||||||
|
return (__m256i) __builtin_ia32_pmovzxwq256_mask ((__v8hi) __A,
|
||||||
|
(__v4di)
|
||||||
|
_mm256_setzero_si256 (),
|
||||||
|
(__mmask8) __U);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#undef __DEFAULT_FN_ATTRS
|
#undef __DEFAULT_FN_ATTRS
|
||||||
#undef __DEFAULT_FN_ATTRS_BOTH
|
#undef __DEFAULT_FN_ATTRS_BOTH
|
||||||
|
|
||||||
|
|
|
@ -833,13 +833,13 @@ VersionTuple Parser::ParseVersionTuple(SourceRange &Range) {
|
||||||
/// \brief Parse the contents of the "availability" attribute.
|
/// \brief Parse the contents of the "availability" attribute.
|
||||||
///
|
///
|
||||||
/// availability-attribute:
|
/// availability-attribute:
|
||||||
/// 'availability' '(' platform ',' opt-nopartial version-arg-list, opt-message')'
|
/// 'availability' '(' platform ',' opt-strict version-arg-list, opt-message')'
|
||||||
///
|
///
|
||||||
/// platform:
|
/// platform:
|
||||||
/// identifier
|
/// identifier
|
||||||
///
|
///
|
||||||
/// opt-nopartial:
|
/// opt-strict:
|
||||||
/// 'nopartial' ','
|
/// 'strict' ','
|
||||||
///
|
///
|
||||||
/// version-arg-list:
|
/// version-arg-list:
|
||||||
/// version-arg
|
/// version-arg
|
||||||
|
@ -892,12 +892,12 @@ void Parser::ParseAvailabilityAttribute(IdentifierInfo &Availability,
|
||||||
Ident_obsoleted = PP.getIdentifierInfo("obsoleted");
|
Ident_obsoleted = PP.getIdentifierInfo("obsoleted");
|
||||||
Ident_unavailable = PP.getIdentifierInfo("unavailable");
|
Ident_unavailable = PP.getIdentifierInfo("unavailable");
|
||||||
Ident_message = PP.getIdentifierInfo("message");
|
Ident_message = PP.getIdentifierInfo("message");
|
||||||
Ident_nopartial = PP.getIdentifierInfo("nopartial");
|
Ident_strict = PP.getIdentifierInfo("strict");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse the optional "nopartial" and the set of
|
// Parse the optional "strict" and the set of
|
||||||
// introductions/deprecations/removals.
|
// introductions/deprecations/removals.
|
||||||
SourceLocation UnavailableLoc, NopartialLoc;
|
SourceLocation UnavailableLoc, StrictLoc;
|
||||||
do {
|
do {
|
||||||
if (Tok.isNot(tok::identifier)) {
|
if (Tok.isNot(tok::identifier)) {
|
||||||
Diag(Tok, diag::err_availability_expected_change);
|
Diag(Tok, diag::err_availability_expected_change);
|
||||||
|
@ -907,12 +907,12 @@ void Parser::ParseAvailabilityAttribute(IdentifierInfo &Availability,
|
||||||
IdentifierInfo *Keyword = Tok.getIdentifierInfo();
|
IdentifierInfo *Keyword = Tok.getIdentifierInfo();
|
||||||
SourceLocation KeywordLoc = ConsumeToken();
|
SourceLocation KeywordLoc = ConsumeToken();
|
||||||
|
|
||||||
if (Keyword == Ident_nopartial) {
|
if (Keyword == Ident_strict) {
|
||||||
if (NopartialLoc.isValid()) {
|
if (StrictLoc.isValid()) {
|
||||||
Diag(KeywordLoc, diag::err_availability_redundant)
|
Diag(KeywordLoc, diag::err_availability_redundant)
|
||||||
<< Keyword << SourceRange(NopartialLoc);
|
<< Keyword << SourceRange(StrictLoc);
|
||||||
}
|
}
|
||||||
NopartialLoc = KeywordLoc;
|
StrictLoc = KeywordLoc;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1037,7 +1037,7 @@ void Parser::ParseAvailabilityAttribute(IdentifierInfo &Availability,
|
||||||
Changes[Deprecated],
|
Changes[Deprecated],
|
||||||
Changes[Obsoleted],
|
Changes[Obsoleted],
|
||||||
UnavailableLoc, MessageExpr.get(),
|
UnavailableLoc, MessageExpr.get(),
|
||||||
Syntax, NopartialLoc);
|
Syntax, StrictLoc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \brief Parse the contents of the "objc_bridge_related" attribute.
|
/// \brief Parse the contents of the "objc_bridge_related" attribute.
|
||||||
|
|
|
@ -491,7 +491,7 @@ void Parser::Initialize() {
|
||||||
Ident_deprecated = nullptr;
|
Ident_deprecated = nullptr;
|
||||||
Ident_obsoleted = nullptr;
|
Ident_obsoleted = nullptr;
|
||||||
Ident_unavailable = nullptr;
|
Ident_unavailable = nullptr;
|
||||||
Ident_nopartial = nullptr;
|
Ident_strict = nullptr;
|
||||||
|
|
||||||
Ident__except = nullptr;
|
Ident__except = nullptr;
|
||||||
|
|
||||||
|
|
|
@ -35,9 +35,6 @@ DelayedDiagnostic::makeAvailability(Sema::AvailabilityDiagnostic AD,
|
||||||
case Sema::AD_Unavailable:
|
case Sema::AD_Unavailable:
|
||||||
DD.Kind = Unavailable;
|
DD.Kind = Unavailable;
|
||||||
break;
|
break;
|
||||||
case Sema::AD_NotYetIntroduced:
|
|
||||||
DD.Kind = NotYetIntroduced;
|
|
||||||
break;
|
|
||||||
case Sema::AD_Partial:
|
case Sema::AD_Partial:
|
||||||
llvm_unreachable("AD_Partial diags should not be delayed");
|
llvm_unreachable("AD_Partial diags should not be delayed");
|
||||||
}
|
}
|
||||||
|
@ -66,7 +63,6 @@ void DelayedDiagnostic::Destroy() {
|
||||||
|
|
||||||
case Deprecation:
|
case Deprecation:
|
||||||
case Unavailable:
|
case Unavailable:
|
||||||
case NotYetIntroduced:
|
|
||||||
delete [] DeprecationData.Message;
|
delete [] DeprecationData.Message;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -2196,7 +2196,7 @@ static bool mergeDeclAttribute(Sema &S, NamedDecl *D,
|
||||||
NewAttr = S.mergeAvailabilityAttr(D, AA->getRange(), AA->getPlatform(),
|
NewAttr = S.mergeAvailabilityAttr(D, AA->getRange(), AA->getPlatform(),
|
||||||
AA->getIntroduced(), AA->getDeprecated(),
|
AA->getIntroduced(), AA->getDeprecated(),
|
||||||
AA->getObsoleted(), AA->getUnavailable(),
|
AA->getObsoleted(), AA->getUnavailable(),
|
||||||
AA->getMessage(), AA->getNopartial(), AMK,
|
AA->getMessage(), AA->getStrict(), AMK,
|
||||||
AttrSpellingListIndex);
|
AttrSpellingListIndex);
|
||||||
else if (const auto *VA = dyn_cast<VisibilityAttr>(Attr))
|
else if (const auto *VA = dyn_cast<VisibilityAttr>(Attr))
|
||||||
NewAttr = S.mergeVisibilityAttr(D, VA->getRange(), VA->getVisibility(),
|
NewAttr = S.mergeVisibilityAttr(D, VA->getRange(), VA->getVisibility(),
|
||||||
|
|
|
@ -1918,7 +1918,7 @@ AvailabilityAttr *Sema::mergeAvailabilityAttr(NamedDecl *D, SourceRange Range,
|
||||||
VersionTuple Obsoleted,
|
VersionTuple Obsoleted,
|
||||||
bool IsUnavailable,
|
bool IsUnavailable,
|
||||||
StringRef Message,
|
StringRef Message,
|
||||||
bool IsNopartial,
|
bool IsStrict,
|
||||||
AvailabilityMergeKind AMK,
|
AvailabilityMergeKind AMK,
|
||||||
unsigned AttrSpellingListIndex) {
|
unsigned AttrSpellingListIndex) {
|
||||||
VersionTuple MergedIntroduced = Introduced;
|
VersionTuple MergedIntroduced = Introduced;
|
||||||
|
@ -2065,7 +2065,7 @@ AvailabilityAttr *Sema::mergeAvailabilityAttr(NamedDecl *D, SourceRange Range,
|
||||||
return ::new (Context) AvailabilityAttr(Range, Context, Platform,
|
return ::new (Context) AvailabilityAttr(Range, Context, Platform,
|
||||||
Introduced, Deprecated,
|
Introduced, Deprecated,
|
||||||
Obsoleted, IsUnavailable, Message,
|
Obsoleted, IsUnavailable, Message,
|
||||||
IsNopartial, AttrSpellingListIndex);
|
IsStrict, AttrSpellingListIndex);
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -2092,7 +2092,7 @@ static void handleAvailabilityAttr(Sema &S, Decl *D,
|
||||||
AvailabilityChange Deprecated = Attr.getAvailabilityDeprecated();
|
AvailabilityChange Deprecated = Attr.getAvailabilityDeprecated();
|
||||||
AvailabilityChange Obsoleted = Attr.getAvailabilityObsoleted();
|
AvailabilityChange Obsoleted = Attr.getAvailabilityObsoleted();
|
||||||
bool IsUnavailable = Attr.getUnavailableLoc().isValid();
|
bool IsUnavailable = Attr.getUnavailableLoc().isValid();
|
||||||
bool IsNopartial = Attr.getNopartialLoc().isValid();
|
bool IsStrict = Attr.getStrictLoc().isValid();
|
||||||
StringRef Str;
|
StringRef Str;
|
||||||
if (const StringLiteral *SE =
|
if (const StringLiteral *SE =
|
||||||
dyn_cast_or_null<StringLiteral>(Attr.getMessageExpr()))
|
dyn_cast_or_null<StringLiteral>(Attr.getMessageExpr()))
|
||||||
|
@ -2103,7 +2103,7 @@ static void handleAvailabilityAttr(Sema &S, Decl *D,
|
||||||
Deprecated.Version,
|
Deprecated.Version,
|
||||||
Obsoleted.Version,
|
Obsoleted.Version,
|
||||||
IsUnavailable, Str,
|
IsUnavailable, Str,
|
||||||
IsNopartial,
|
IsStrict,
|
||||||
Sema::AMK_None,
|
Sema::AMK_None,
|
||||||
Index);
|
Index);
|
||||||
if (NewAttr)
|
if (NewAttr)
|
||||||
|
@ -2148,7 +2148,7 @@ static void handleAvailabilityAttr(Sema &S, Decl *D,
|
||||||
NewDeprecated,
|
NewDeprecated,
|
||||||
NewObsoleted,
|
NewObsoleted,
|
||||||
IsUnavailable, Str,
|
IsUnavailable, Str,
|
||||||
IsNopartial,
|
IsStrict,
|
||||||
Sema::AMK_None,
|
Sema::AMK_None,
|
||||||
Index);
|
Index);
|
||||||
if (NewAttr)
|
if (NewAttr)
|
||||||
|
@ -2171,7 +2171,7 @@ static void handleAvailabilityAttr(Sema &S, Decl *D,
|
||||||
Deprecated.Version,
|
Deprecated.Version,
|
||||||
Obsoleted.Version,
|
Obsoleted.Version,
|
||||||
IsUnavailable, Str,
|
IsUnavailable, Str,
|
||||||
IsNopartial,
|
IsStrict,
|
||||||
Sema::AMK_None,
|
Sema::AMK_None,
|
||||||
Index);
|
Index);
|
||||||
if (NewAttr)
|
if (NewAttr)
|
||||||
|
@ -5964,14 +5964,6 @@ static void DoEmitAvailabilityWarning(Sema &S, Sema::AvailabilityDiagnostic K,
|
||||||
property_note_select = /* partial */ 2;
|
property_note_select = /* partial */ 2;
|
||||||
available_here_select_kind = /* partial */ 3;
|
available_here_select_kind = /* partial */ 3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Sema::AD_NotYetIntroduced:
|
|
||||||
diag = diag::err_notyetintroduced;
|
|
||||||
diag_message = diag::err_notyetintroduced_message;
|
|
||||||
diag_fwdclass_message = diag::warn_notyetintroduced_fwdclass_message;
|
|
||||||
property_note_select = /* deprecated */ 3;
|
|
||||||
available_here_select_kind = /* notyetintroduced */ 4;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Message.empty()) {
|
if (!Message.empty()) {
|
||||||
|
@ -5998,22 +5990,10 @@ static void DoEmitAvailabilityWarning(Sema &S, Sema::AvailabilityDiagnostic K,
|
||||||
static void handleDelayedAvailabilityCheck(Sema &S, DelayedDiagnostic &DD,
|
static void handleDelayedAvailabilityCheck(Sema &S, DelayedDiagnostic &DD,
|
||||||
Decl *Ctx) {
|
Decl *Ctx) {
|
||||||
assert(DD.Kind == DelayedDiagnostic::Deprecation ||
|
assert(DD.Kind == DelayedDiagnostic::Deprecation ||
|
||||||
DD.Kind == DelayedDiagnostic::Unavailable ||
|
DD.Kind == DelayedDiagnostic::Unavailable);
|
||||||
DD.Kind == DelayedDiagnostic::NotYetIntroduced);
|
Sema::AvailabilityDiagnostic AD = DD.Kind == DelayedDiagnostic::Deprecation
|
||||||
Sema::AvailabilityDiagnostic AD;
|
? Sema::AD_Deprecation
|
||||||
switch (DD.Kind) {
|
: Sema::AD_Unavailable;
|
||||||
case DelayedDiagnostic::Deprecation:
|
|
||||||
AD = Sema::AD_Deprecation;
|
|
||||||
break;
|
|
||||||
case DelayedDiagnostic::Unavailable:
|
|
||||||
AD = Sema::AD_Unavailable;
|
|
||||||
break;
|
|
||||||
case DelayedDiagnostic::NotYetIntroduced:
|
|
||||||
AD = Sema::AD_NotYetIntroduced;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
llvm_unreachable("Expecting: deprecated, unavailable, not-yet-introduced");
|
|
||||||
}
|
|
||||||
DD.Triggered = true;
|
DD.Triggered = true;
|
||||||
DoEmitAvailabilityWarning(
|
DoEmitAvailabilityWarning(
|
||||||
S, AD, Ctx, DD.getDeprecationDecl(), DD.getDeprecationMessage(), DD.Loc,
|
S, AD, Ctx, DD.getDeprecationDecl(), DD.getDeprecationMessage(), DD.Loc,
|
||||||
|
|
|
@ -159,12 +159,11 @@ DiagnoseAvailabilityOfDecl(Sema &S, NamedDecl *D, SourceLocation Loc,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AR_NotYetIntroduced: {
|
case AR_NotYetIntroduced: {
|
||||||
// With nopartial, the compiler will emit delayed error just like how
|
// With strict, the compiler will emit unavailable error.
|
||||||
// "deprecated, unavailable" are handled.
|
|
||||||
AvailabilityAttr *AA = D->getAttr<AvailabilityAttr>();
|
AvailabilityAttr *AA = D->getAttr<AvailabilityAttr>();
|
||||||
if (AA && AA->getNopartial() &&
|
if (AA && AA->getStrict() &&
|
||||||
S.getCurContextAvailability() != AR_NotYetIntroduced)
|
S.getCurContextAvailability() != AR_NotYetIntroduced)
|
||||||
S.EmitAvailabilityWarning(Sema::AD_NotYetIntroduced,
|
S.EmitAvailabilityWarning(Sema::AD_Unavailable,
|
||||||
D, Message, Loc, UnknownObjCClass, ObjCPDecl,
|
D, Message, Loc, UnknownObjCClass, ObjCPDecl,
|
||||||
ObjCPropertyAccess);
|
ObjCPropertyAccess);
|
||||||
|
|
||||||
|
|
|
@ -902,6 +902,32 @@ static bool IsInFnTryBlockHandler(const Scope *S) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static VarDecl *
|
||||||
|
getVarTemplateSpecialization(Sema &S, VarTemplateDecl *VarTempl,
|
||||||
|
const TemplateArgumentListInfo *TemplateArgs,
|
||||||
|
const DeclarationNameInfo &MemberNameInfo,
|
||||||
|
SourceLocation TemplateKWLoc) {
|
||||||
|
|
||||||
|
if (!TemplateArgs) {
|
||||||
|
S.Diag(MemberNameInfo.getBeginLoc(), diag::err_template_decl_ref)
|
||||||
|
<< /*Variable template*/ 1 << MemberNameInfo.getName()
|
||||||
|
<< MemberNameInfo.getSourceRange();
|
||||||
|
|
||||||
|
S.Diag(VarTempl->getLocation(), diag::note_template_decl_here);
|
||||||
|
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
DeclResult VDecl = S.CheckVarTemplateId(
|
||||||
|
VarTempl, TemplateKWLoc, MemberNameInfo.getLoc(), *TemplateArgs);
|
||||||
|
if (VDecl.isInvalid())
|
||||||
|
return nullptr;
|
||||||
|
VarDecl *Var = cast<VarDecl>(VDecl.get());
|
||||||
|
if (!Var->getTemplateSpecializationKind())
|
||||||
|
Var->setTemplateSpecializationKind(TSK_ImplicitInstantiation,
|
||||||
|
MemberNameInfo.getLoc());
|
||||||
|
return Var;
|
||||||
|
}
|
||||||
|
|
||||||
ExprResult
|
ExprResult
|
||||||
Sema::BuildMemberReferenceExpr(Expr *BaseExpr, QualType BaseExprType,
|
Sema::BuildMemberReferenceExpr(Expr *BaseExpr, QualType BaseExprType,
|
||||||
SourceLocation OpLoc, bool IsArrow,
|
SourceLocation OpLoc, bool IsArrow,
|
||||||
|
@ -1069,9 +1095,20 @@ Sema::BuildMemberReferenceExpr(Expr *BaseExpr, QualType BaseExprType,
|
||||||
// Handle the implicit-member-access case.
|
// Handle the implicit-member-access case.
|
||||||
if (!BaseExpr) {
|
if (!BaseExpr) {
|
||||||
// If this is not an instance member, convert to a non-member access.
|
// If this is not an instance member, convert to a non-member access.
|
||||||
if (!MemberDecl->isCXXInstanceMember())
|
if (!MemberDecl->isCXXInstanceMember()) {
|
||||||
|
// If this is a variable template, get the instantiated variable
|
||||||
|
// declaration corresponding to the supplied template arguments
|
||||||
|
// (while emitting diagnostics as necessary) that will be referenced
|
||||||
|
// by this expression.
|
||||||
|
if (isa<VarTemplateDecl>(MemberDecl)) {
|
||||||
|
MemberDecl = getVarTemplateSpecialization(
|
||||||
|
*this, cast<VarTemplateDecl>(MemberDecl), TemplateArgs,
|
||||||
|
R.getLookupNameInfo(), TemplateKWLoc);
|
||||||
|
if (!MemberDecl)
|
||||||
|
return ExprError();
|
||||||
|
}
|
||||||
return BuildDeclarationNameExpr(SS, R.getLookupNameInfo(), MemberDecl);
|
return BuildDeclarationNameExpr(SS, R.getLookupNameInfo(), MemberDecl);
|
||||||
|
}
|
||||||
SourceLocation Loc = R.getNameLoc();
|
SourceLocation Loc = R.getNameLoc();
|
||||||
if (SS.getRange().isValid())
|
if (SS.getRange().isValid())
|
||||||
Loc = SS.getRange().getBegin();
|
Loc = SS.getRange().getBegin();
|
||||||
|
@ -1127,6 +1164,15 @@ Sema::BuildMemberReferenceExpr(Expr *BaseExpr, QualType BaseExprType,
|
||||||
TemplateKWLoc, Enum, FoundDecl, MemberNameInfo,
|
TemplateKWLoc, Enum, FoundDecl, MemberNameInfo,
|
||||||
Enum->getType(), VK_RValue, OK_Ordinary);
|
Enum->getType(), VK_RValue, OK_Ordinary);
|
||||||
}
|
}
|
||||||
|
if (VarTemplateDecl *VarTempl = dyn_cast<VarTemplateDecl>(MemberDecl)) {
|
||||||
|
if (VarDecl *Var = getVarTemplateSpecialization(
|
||||||
|
*this, VarTempl, TemplateArgs, MemberNameInfo, TemplateKWLoc))
|
||||||
|
return BuildMemberExpr(*this, Context, BaseExpr, IsArrow, OpLoc, SS,
|
||||||
|
TemplateKWLoc, Var, FoundDecl, MemberNameInfo,
|
||||||
|
Var->getType().getNonReferenceType(), VK_LValue,
|
||||||
|
OK_Ordinary);
|
||||||
|
return ExprError();
|
||||||
|
}
|
||||||
|
|
||||||
// We found something that we didn't expect. Complain.
|
// We found something that we didn't expect. Complain.
|
||||||
if (isa<TypeDecl>(MemberDecl))
|
if (isa<TypeDecl>(MemberDecl))
|
||||||
|
|
|
@ -1058,3 +1058,21 @@ __m512i test_mm512_maskz_cvtepi8_epi16(__mmask32 __U, __m256i __A) {
|
||||||
// CHECK: @llvm.x86.avx512.mask.pmovsxb.w.512
|
// CHECK: @llvm.x86.avx512.mask.pmovsxb.w.512
|
||||||
return _mm512_maskz_cvtepi8_epi16(__U, __A);
|
return _mm512_maskz_cvtepi8_epi16(__U, __A);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__m512i test_mm512_cvtepu8_epi16(__m256i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm512_cvtepu8_epi16
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.w.512
|
||||||
|
return _mm512_cvtepu8_epi16(__A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m512i test_mm512_mask_cvtepu8_epi16(__m512i __W, __mmask32 __U, __m256i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm512_mask_cvtepu8_epi16
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.w.512
|
||||||
|
return _mm512_mask_cvtepu8_epi16(__W, __U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m512i test_mm512_maskz_cvtepu8_epi16(__mmask32 __U, __m256i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm512_maskz_cvtepu8_epi16
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.w.512
|
||||||
|
return _mm512_maskz_cvtepu8_epi16(__U, __A);
|
||||||
|
}
|
||||||
|
|
|
@ -1990,3 +1990,92 @@ __m512i test_mm512_maskz_cvtepi16_epi64(__mmask8 __U, __m128i __A) {
|
||||||
return _mm512_maskz_cvtepi16_epi64(__U, __A);
|
return _mm512_maskz_cvtepi16_epi64(__U, __A);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__m512i test_mm512_cvtepu8_epi32(__m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm512_cvtepu8_epi32
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.d.512
|
||||||
|
return _mm512_cvtepu8_epi32(__A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m512i test_mm512_mask_cvtepu8_epi32(__m512i __W, __mmask16 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm512_mask_cvtepu8_epi32
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.d.512
|
||||||
|
return _mm512_mask_cvtepu8_epi32(__W, __U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m512i test_mm512_maskz_cvtepu8_epi32(__mmask16 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm512_maskz_cvtepu8_epi32
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.d.512
|
||||||
|
return _mm512_maskz_cvtepu8_epi32(__U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m512i test_mm512_cvtepu8_epi64(__m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm512_cvtepu8_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.q.512
|
||||||
|
return _mm512_cvtepu8_epi64(__A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m512i test_mm512_mask_cvtepu8_epi64(__m512i __W, __mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm512_mask_cvtepu8_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.q.512
|
||||||
|
return _mm512_mask_cvtepu8_epi64(__W, __U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m512i test_mm512_maskz_cvtepu8_epi64(__mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm512_maskz_cvtepu8_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.q.512
|
||||||
|
return _mm512_maskz_cvtepu8_epi64(__U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m512i test_mm512_cvtepu32_epi64(__m256i __X) {
|
||||||
|
// CHECK-LABEL: @test_mm512_cvtepu32_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxd.q.512
|
||||||
|
return _mm512_cvtepu32_epi64(__X);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m512i test_mm512_mask_cvtepu32_epi64(__m512i __W, __mmask8 __U, __m256i __X) {
|
||||||
|
// CHECK-LABEL: @test_mm512_mask_cvtepu32_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxd.q.512
|
||||||
|
return _mm512_mask_cvtepu32_epi64(__W, __U, __X);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m512i test_mm512_maskz_cvtepu32_epi64(__mmask8 __U, __m256i __X) {
|
||||||
|
// CHECK-LABEL: @test_mm512_maskz_cvtepu32_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxd.q.512
|
||||||
|
return _mm512_maskz_cvtepu32_epi64(__U, __X);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m512i test_mm512_cvtepu16_epi32(__m256i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm512_cvtepu16_epi32
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxw.d.512
|
||||||
|
return _mm512_cvtepu16_epi32(__A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m512i test_mm512_mask_cvtepu16_epi32(__m512i __W, __mmask16 __U, __m256i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm512_mask_cvtepu16_epi32
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxw.d.512
|
||||||
|
return _mm512_mask_cvtepu16_epi32(__W, __U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m512i test_mm512_maskz_cvtepu16_epi32(__mmask16 __U, __m256i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm512_maskz_cvtepu16_epi32
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxw.d.512
|
||||||
|
return _mm512_maskz_cvtepu16_epi32(__U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m512i test_mm512_cvtepu16_epi64(__m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm512_cvtepu16_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxw.q.512
|
||||||
|
return _mm512_cvtepu16_epi64(__A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m512i test_mm512_mask_cvtepu16_epi64(__m512i __W, __mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm512_mask_cvtepu16_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxw.q.512
|
||||||
|
return _mm512_mask_cvtepu16_epi64(__W, __U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m512i test_mm512_maskz_cvtepu16_epi64(__mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm512_maskz_cvtepu16_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxw.q.512
|
||||||
|
return _mm512_maskz_cvtepu16_epi64(__U, __A);
|
||||||
|
}
|
|
@ -3275,3 +3275,122 @@ __m256i test_mm256_maskz_cvtepi16_epi64(__mmask8 __U, __m128i __A) {
|
||||||
return _mm256_maskz_cvtepi16_epi64(__U, __A);
|
return _mm256_maskz_cvtepi16_epi64(__U, __A);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__m128i test_mm_mask_cvtepu8_epi32(__m128i __W, __mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm_mask_cvtepu8_epi32
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.d.128
|
||||||
|
return _mm_mask_cvtepu8_epi32(__W, __U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m128i test_mm_maskz_cvtepu8_epi32(__mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm_maskz_cvtepu8_epi32
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.d.128
|
||||||
|
return _mm_maskz_cvtepu8_epi32(__U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m256i test_mm256_mask_cvtepu8_epi32(__m256i __W, __mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm256_mask_cvtepu8_epi32
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.d.256
|
||||||
|
return _mm256_mask_cvtepu8_epi32(__W, __U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m256i test_mm256_maskz_cvtepu8_epi32(__mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm256_maskz_cvtepu8_epi32
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.d.256
|
||||||
|
return _mm256_maskz_cvtepu8_epi32(__U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m128i test_mm_mask_cvtepu8_epi64(__m128i __W, __mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm_mask_cvtepu8_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.q.128
|
||||||
|
return _mm_mask_cvtepu8_epi64(__W, __U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m128i test_mm_maskz_cvtepu8_epi64(__mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm_maskz_cvtepu8_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.q.128
|
||||||
|
return _mm_maskz_cvtepu8_epi64(__U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m256i test_mm256_mask_cvtepu8_epi64(__m256i __W, __mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm256_mask_cvtepu8_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.q.256
|
||||||
|
return _mm256_mask_cvtepu8_epi64(__W, __U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m256i test_mm256_maskz_cvtepu8_epi64(__mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm256_maskz_cvtepu8_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.q.256
|
||||||
|
return _mm256_maskz_cvtepu8_epi64(__U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m128i test_mm_mask_cvtepu32_epi64(__m128i __W, __mmask8 __U, __m128i __X) {
|
||||||
|
// CHECK-LABEL: @test_mm_mask_cvtepu32_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxd.q.128
|
||||||
|
return _mm_mask_cvtepu32_epi64(__W, __U, __X);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m128i test_mm_maskz_cvtepu32_epi64(__mmask8 __U, __m128i __X) {
|
||||||
|
// CHECK-LABEL: @test_mm_maskz_cvtepu32_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxd.q.128
|
||||||
|
return _mm_maskz_cvtepu32_epi64(__U, __X);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m256i test_mm256_mask_cvtepu32_epi64(__m256i __W, __mmask8 __U, __m128i __X) {
|
||||||
|
// CHECK-LABEL: @test_mm256_mask_cvtepu32_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxd.q.256
|
||||||
|
return _mm256_mask_cvtepu32_epi64(__W, __U, __X);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m256i test_mm256_maskz_cvtepu32_epi64(__mmask8 __U, __m128i __X) {
|
||||||
|
// CHECK-LABEL: @test_mm256_maskz_cvtepu32_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxd.q.256
|
||||||
|
return _mm256_maskz_cvtepu32_epi64(__U, __X);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m128i test_mm_mask_cvtepu16_epi32(__m128i __W, __mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm_mask_cvtepu16_epi32
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxw.d.128
|
||||||
|
return _mm_mask_cvtepu16_epi32(__W, __U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m128i test_mm_maskz_cvtepu16_epi32(__mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm_maskz_cvtepu16_epi32
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxw.d.128
|
||||||
|
return _mm_maskz_cvtepu16_epi32(__U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m256i test_mm256_mask_cvtepu16_epi32(__m256i __W, __mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm256_mask_cvtepu16_epi32
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxw.d.256
|
||||||
|
return _mm256_mask_cvtepu16_epi32(__W, __U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m256i test_mm256_maskz_cvtepu16_epi32(__mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm256_maskz_cvtepu16_epi32
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxw.d.256
|
||||||
|
return _mm256_maskz_cvtepu16_epi32(__U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m128i test_mm_mask_cvtepu16_epi64(__m128i __W, __mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm_mask_cvtepu16_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxw.q.128
|
||||||
|
return _mm_mask_cvtepu16_epi64(__W, __U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m128i test_mm_maskz_cvtepu16_epi64(__mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm_maskz_cvtepu16_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxw.q.128
|
||||||
|
return _mm_maskz_cvtepu16_epi64(__U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m256i test_mm256_mask_cvtepu16_epi64(__m256i __W, __mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm256_mask_cvtepu16_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxw.q.256
|
||||||
|
return _mm256_mask_cvtepu16_epi64(__W, __U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m256i test_mm256_maskz_cvtepu16_epi64(__mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm256_maskz_cvtepu16_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxw.q.256
|
||||||
|
return _mm256_maskz_cvtepu16_epi64(__U, __A);
|
||||||
|
}
|
|
@ -1728,3 +1728,147 @@ __m256i test_mm256_maskz_cvtepi8_epi16(__mmask16 __U, __m128i __A) {
|
||||||
// CHECK: @llvm.x86.avx512.mask.pmovsxb.w.256
|
// CHECK: @llvm.x86.avx512.mask.pmovsxb.w.256
|
||||||
return _mm256_maskz_cvtepi8_epi16(__U, __A);
|
return _mm256_maskz_cvtepi8_epi16(__U, __A);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__m128i test_mm_mask_cvtepu8_epi32(__m128i __W, __mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm_mask_cvtepu8_epi32
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.d.128
|
||||||
|
return _mm_mask_cvtepu8_epi32(__W, __U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m128i test_mm_maskz_cvtepu8_epi32(__mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm_maskz_cvtepu8_epi32
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.d.128
|
||||||
|
return _mm_maskz_cvtepu8_epi32(__U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m256i test_mm256_mask_cvtepu8_epi32(__m256i __W, __mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm256_mask_cvtepu8_epi32
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.d.256
|
||||||
|
return _mm256_mask_cvtepu8_epi32(__W, __U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m256i test_mm256_maskz_cvtepu8_epi32(__mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm256_maskz_cvtepu8_epi32
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.d.256
|
||||||
|
return _mm256_maskz_cvtepu8_epi32(__U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m128i test_mm_mask_cvtepu8_epi64(__m128i __W, __mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm_mask_cvtepu8_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.q.128
|
||||||
|
return _mm_mask_cvtepu8_epi64(__W, __U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m128i test_mm_maskz_cvtepu8_epi64(__mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm_maskz_cvtepu8_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.q.128
|
||||||
|
return _mm_maskz_cvtepu8_epi64(__U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m256i test_mm256_mask_cvtepu8_epi64(__m256i __W, __mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm256_mask_cvtepu8_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.q.256
|
||||||
|
return _mm256_mask_cvtepu8_epi64(__W, __U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m256i test_mm256_maskz_cvtepu8_epi64(__mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm256_maskz_cvtepu8_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.q.256
|
||||||
|
return _mm256_maskz_cvtepu8_epi64(__U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m128i test_mm_mask_cvtepu32_epi64(__m128i __W, __mmask8 __U, __m128i __X) {
|
||||||
|
// CHECK-LABEL: @test_mm_mask_cvtepu32_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxd.q.128
|
||||||
|
return _mm_mask_cvtepu32_epi64(__W, __U, __X);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m128i test_mm_maskz_cvtepu32_epi64(__mmask8 __U, __m128i __X) {
|
||||||
|
// CHECK-LABEL: @test_mm_maskz_cvtepu32_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxd.q.128
|
||||||
|
return _mm_maskz_cvtepu32_epi64(__U, __X);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m256i test_mm256_mask_cvtepu32_epi64(__m256i __W, __mmask8 __U, __m128i __X) {
|
||||||
|
// CHECK-LABEL: @test_mm256_mask_cvtepu32_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxd.q.256
|
||||||
|
return _mm256_mask_cvtepu32_epi64(__W, __U, __X);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m256i test_mm256_maskz_cvtepu32_epi64(__mmask8 __U, __m128i __X) {
|
||||||
|
// CHECK-LABEL: @test_mm256_maskz_cvtepu32_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxd.q.256
|
||||||
|
return _mm256_maskz_cvtepu32_epi64(__U, __X);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m128i test_mm_mask_cvtepu16_epi32(__m128i __W, __mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm_mask_cvtepu16_epi32
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxw.d.128
|
||||||
|
return _mm_mask_cvtepu16_epi32(__W, __U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m128i test_mm_maskz_cvtepu16_epi32(__mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm_maskz_cvtepu16_epi32
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxw.d.128
|
||||||
|
return _mm_maskz_cvtepu16_epi32(__U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m256i test_mm256_mask_cvtepu16_epi32(__m256i __W, __mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm256_mask_cvtepu16_epi32
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxw.d.256
|
||||||
|
return _mm256_mask_cvtepu16_epi32(__W, __U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m256i test_mm256_maskz_cvtepu16_epi32(__mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm256_maskz_cvtepu16_epi32
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxw.d.256
|
||||||
|
return _mm256_maskz_cvtepu16_epi32(__U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m128i test_mm_mask_cvtepu16_epi64(__m128i __W, __mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm_mask_cvtepu16_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxw.q.128
|
||||||
|
return _mm_mask_cvtepu16_epi64(__W, __U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m128i test_mm_maskz_cvtepu16_epi64(__mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm_maskz_cvtepu16_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxw.q.128
|
||||||
|
return _mm_maskz_cvtepu16_epi64(__U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m256i test_mm256_mask_cvtepu16_epi64(__m256i __W, __mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm256_mask_cvtepu16_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxw.q.256
|
||||||
|
return _mm256_mask_cvtepu16_epi64(__W, __U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m256i test_mm256_maskz_cvtepu16_epi64(__mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm256_maskz_cvtepu16_epi64
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxw.q.256
|
||||||
|
return _mm256_maskz_cvtepu16_epi64(__U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m128i test_mm_mask_cvtepu8_epi16(__m128i __W, __mmask32 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm_mask_cvtepu8_epi16
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.w.128
|
||||||
|
return _mm_mask_cvtepu8_epi16(__W, __U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m128i test_mm_maskz_cvtepu8_epi16(__mmask8 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm_maskz_cvtepu8_epi16
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.w.128
|
||||||
|
return _mm_maskz_cvtepu8_epi16(__U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m256i test_mm256_mask_cvtepu8_epi16(__m256i __W, __mmask32 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm256_mask_cvtepu8_epi16
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.w.256
|
||||||
|
return _mm256_mask_cvtepu8_epi16(__W, __U, __A);
|
||||||
|
}
|
||||||
|
|
||||||
|
__m256i test_mm256_maskz_cvtepu8_epi16(__mmask16 __U, __m128i __A) {
|
||||||
|
// CHECK-LABEL: @test_mm256_maskz_cvtepu8_epi16
|
||||||
|
// CHECK: @llvm.x86.avx512.mask.pmovzxb.w.256
|
||||||
|
return _mm256_maskz_cvtepu8_epi16(__U, __A);
|
||||||
|
}
|
|
@ -6,7 +6,7 @@ void f2(int) __attribute__((availability(macosx,introduced=10.4,deprecated=10.5)
|
||||||
void f3(int) __attribute__((availability(macosx,introduced=10.6)));
|
void f3(int) __attribute__((availability(macosx,introduced=10.6)));
|
||||||
void f4(int) __attribute__((availability(macosx,introduced=10.1,deprecated=10.3,obsoleted=10.5), availability(ios,introduced=2.0,deprecated=3.0))); // expected-note{{explicitly marked unavailable}}
|
void f4(int) __attribute__((availability(macosx,introduced=10.1,deprecated=10.3,obsoleted=10.5), availability(ios,introduced=2.0,deprecated=3.0))); // expected-note{{explicitly marked unavailable}}
|
||||||
void f5(int) __attribute__((availability(ios,introduced=3.2), availability(macosx,unavailable))); // expected-note{{'f5' has been explicitly marked unavailable here}}
|
void f5(int) __attribute__((availability(ios,introduced=3.2), availability(macosx,unavailable))); // expected-note{{'f5' has been explicitly marked unavailable here}}
|
||||||
void f6(int) __attribute__((availability(macosx,nopartial,introduced=10.6))); //expected-note{{'f6' has been explicitly marked not-yet-introduced here}}
|
void f6(int) __attribute__((availability(macosx,strict,introduced=10.6))); //expected-note{{'f6' has been explicitly marked unavailable here}}
|
||||||
|
|
||||||
void test() {
|
void test() {
|
||||||
f0(0);
|
f0(0);
|
||||||
|
@ -15,7 +15,7 @@ void test() {
|
||||||
f3(0);
|
f3(0);
|
||||||
f4(0); // expected-error{{f4' is unavailable: obsoleted in OS X 10.5}}
|
f4(0); // expected-error{{f4' is unavailable: obsoleted in OS X 10.5}}
|
||||||
f5(0); // expected-error{{'f5' is unavailable: not available on OS X}}
|
f5(0); // expected-error{{'f5' is unavailable: not available on OS X}}
|
||||||
f6(0); // expected-error{{'f6' is not introduced yet: introduced in OS X 10.6}}
|
f6(0); // expected-error{{'f6' is unavailable: introduced in OS X 10.6}}
|
||||||
}
|
}
|
||||||
|
|
||||||
// rdar://10535640
|
// rdar://10535640
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// RUN: %clang_cc1 -verify -fsyntax-only %s -Wno-c++11-extensions -Wno-c++1y-extensions -DPRECXX11
|
// RUN: %clang_cc1 -verify -fsyntax-only %s -Wno-c++11-extensions -Wno-c++1y-extensions -DPRECXX11
|
||||||
// RUN: %clang_cc1 -std=c++11 -verify -fsyntax-only -Wno-c++1y-extensions %s
|
// RUN: %clang_cc1 -std=c++11 -verify -fsyntax-only -Wno-c++1y-extensions %s
|
||||||
// RUN: %clang_cc1 -std=c++1y -verify -fsyntax-only %s
|
// RUN: %clang_cc1 -std=c++1y -verify -fsyntax-only %s -DCPP1Y
|
||||||
|
|
||||||
#define CONST const
|
#define CONST const
|
||||||
|
|
||||||
|
@ -338,3 +338,47 @@ namespace b20896909 {
|
||||||
A<int> ai; // expected-note {{in instantiation of}}
|
A<int> ai; // expected-note {{in instantiation of}}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
namespace member_access_is_ok {
|
||||||
|
#ifdef CPP1Y
|
||||||
|
namespace ns1 {
|
||||||
|
struct A {
|
||||||
|
template<class T, T N> constexpr static T Var = N;
|
||||||
|
};
|
||||||
|
static_assert(A{}.Var<int,5> == 5,"");
|
||||||
|
} // end ns1
|
||||||
|
#endif // CPP1Y
|
||||||
|
|
||||||
|
namespace ns2 {
|
||||||
|
template<class T> struct A {
|
||||||
|
template<class U, T N, U M> static T&& Var;
|
||||||
|
};
|
||||||
|
template<class T> template<class U, T N, U M> T&& A<T>::Var = T(N + M);
|
||||||
|
int *AV = &A<int>().Var<char, 5, 'A'>;
|
||||||
|
|
||||||
|
} //end ns2
|
||||||
|
} // end ns member_access_is_ok
|
||||||
|
|
||||||
|
#ifdef CPP1Y
|
||||||
|
namespace PR24473 {
|
||||||
|
struct Value
|
||||||
|
{
|
||||||
|
template<class T>
|
||||||
|
static constexpr T value = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename TValue>
|
||||||
|
struct Something
|
||||||
|
{
|
||||||
|
void foo() {
|
||||||
|
static_assert(TValue::template value<int> == 0, ""); // error
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
Something<Value>{}.foo();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // end ns PR24473
|
||||||
|
#endif // CPP1Y
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,12 @@ def report_directory(hint, keep):
|
||||||
keep -- a boolean value to keep or delete the empty report directory. """
|
keep -- a boolean value to keep or delete the empty report directory. """
|
||||||
|
|
||||||
stamp = time.strftime('scan-build-%Y-%m-%d-%H%M%S-', time.localtime())
|
stamp = time.strftime('scan-build-%Y-%m-%d-%H%M%S-', time.localtime())
|
||||||
name = tempfile.mkdtemp(prefix=stamp, dir=hint)
|
|
||||||
|
parentdir = os.path.abspath(hint)
|
||||||
|
if not os.path.exists(parentdir):
|
||||||
|
os.makedirs(parentdir)
|
||||||
|
|
||||||
|
name = tempfile.mkdtemp(prefix=stamp, dir=parentdir)
|
||||||
|
|
||||||
logging.info('Report directory created: %s', name)
|
logging.info('Report directory created: %s', name)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue