aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/AST/ASTContext.cpp4
-rw-r--r--test/Sema/return.c3
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) { } }