diff options
author | Mike Stump <mrs@apple.com> | 2009-07-27 00:44:23 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-07-27 00:44:23 +0000 |
commit | 2d3c191e1d5545e1724ee6e0550c70eef54beff2 (patch) | |
tree | 2d57b03235a9528ce38d9b5cab218707a24c741d | |
parent | 1b68f71da2fc9e3771f81e8aa72d59bb26158bec (diff) |
Fix PR4624.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77176 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/AST/ASTContext.cpp | 4 | ||||
-rw-r--r-- | test/Sema/return.c | 3 |
2 files changed, 5 insertions, 2 deletions
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) { } } |