forked from OSchip/llvm-project
Fix and test for assertion error in P41835.
llvm-svn: 360448
This commit is contained in:
parent
d5d4df98bb
commit
dc5d975906
|
@ -2758,6 +2758,12 @@ QualType ASTContext::getFunctionTypeWithExceptionSpec(
|
|||
return getParenType(
|
||||
getFunctionTypeWithExceptionSpec(PT->getInnerType(), ESI));
|
||||
|
||||
// Might be wrapped in a macro qualified type.
|
||||
if (const auto *MQT = dyn_cast<MacroQualifiedType>(Orig))
|
||||
return getMacroQualifiedType(
|
||||
getFunctionTypeWithExceptionSpec(MQT->getUnderlyingType(), ESI),
|
||||
MQT->getMacroIdentifier());
|
||||
|
||||
// Might have a calling-convention attribute.
|
||||
if (const auto *AT = dyn_cast<AttributedType>(Orig))
|
||||
return getAttributedType(
|
||||
|
|
|
@ -13,3 +13,9 @@ void Func() {
|
|||
auto NODEREF *auto_i_ptr2 = i_ptr;
|
||||
auto NODEREF auto_i2 = i; // expected-warning{{'noderef' can only be used on an array or pointer type}}
|
||||
}
|
||||
|
||||
// Added test for fix for P41835
|
||||
#define _LIBCPP_FLOAT_ABI __attribute__((pcs("aapcs")))
|
||||
struct A {
|
||||
_LIBCPP_FLOAT_ABI int operator()() throw(); // expected-warning{{'pcs' calling convention ignored for this target}}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue