]> granicus.if.org Git - clang/commitdiff
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)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77176 91177308-0d34-0410-b5e6-96231b3b80d8

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

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