Fix canonical type construction for function types with the noreturn

attribute. Fixes PR4865.

llvm-svn: 78224
This commit is contained in:
Douglas Gregor 2009-08-05 19:03:35 +00:00
parent d460cb4356
commit f9bd4ecea2
2 changed files with 10 additions and 1 deletions

View File

@ -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 =

View File

@ -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)
{
}