Fix canonical type construction for function types with the noreturn
attribute. Fixes PR4865. llvm-svn: 78224
This commit is contained in:
parent
d460cb4356
commit
f9bd4ecea2
|
@ -1616,7 +1616,8 @@ QualType ASTContext::getFunctionType(QualType ResultTy,const QualType *ArgArray,
|
|||
|
||||
Canonical = getFunctionType(getCanonicalType(ResultTy),
|
||||
CanonicalArgs.data(), NumArgs,
|
||||
isVariadic, TypeQuals, NoReturn);
|
||||
isVariadic, TypeQuals, false,
|
||||
false, 0, 0, NoReturn);
|
||||
|
||||
// Get the new insert position for the node we care about.
|
||||
FunctionProtoType *NewIP =
|
||||
|
|
|
@ -25,3 +25,11 @@ void f4() {
|
|||
return; // expected-warning {{function 'f4' declared 'noreturn' should not return}}
|
||||
}
|
||||
|
||||
// PR4685
|
||||
extern void f5 (unsigned long) __attribute__ ((__noreturn__));
|
||||
|
||||
void
|
||||
f5 (unsigned long size)
|
||||
{
|
||||
|
||||
}
|
Loading…
Reference in New Issue