From: Mike Stump Date: Mon, 27 Jul 2009 00:44:23 +0000 (+0000) Subject: Fix PR4624. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2d3c191e1d5545e1724ee6e0550c70eef54beff2;p=clang Fix PR4624. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77176 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index ff9b7215bc..61dbf24b45 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -3442,8 +3442,8 @@ QualType ASTContext::mergeFunctionTypes(QualType lhs, QualType rhs) { if (allLTypes) return lhs; if (allRTypes) return rhs; return getFunctionType(retType, proto->arg_type_begin(), - proto->getNumArgs(), lproto->isVariadic(), - lproto->getTypeQuals(), NoReturn); + proto->getNumArgs(), proto->isVariadic(), + proto->getTypeQuals(), NoReturn); } if (allLTypes) return lhs; diff --git a/test/Sema/return.c b/test/Sema/return.c index db83a06d2a..be5130f854 100644 --- a/test/Sema/return.c +++ b/test/Sema/return.c @@ -187,3 +187,6 @@ int test27() { } done: ; } + +void test28() __attribute__((noreturn)); +void test28(x) { while (1) { } }