Fix PR4624.
authorMike Stump <mrs@apple.com>
Mon, 27 Jul 2009 00:44:23 +0000 (00:44 +0000)
committerMike Stump <mrs@apple.com>
Mon, 27 Jul 2009 00:44:23 +0000 (00:44 +0000)
llvm-svn: 77176

clang/lib/AST/ASTContext.cpp
clang/test/Sema/return.c

index ff9b721..61dbf24 100644 (file)
@@ -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;
index db83a06..be5130f 100644 (file)
@@ -187,3 +187,6 @@ int test27() {
   }
   done: ;
 }
+
+void test28() __attribute__((noreturn));
+void test28(x) { while (1) { } }