PR7117: Make sure we don't lose the calling convention for K&R-style
definitions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103932 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 5a24a2c..b573e2d 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -1176,7 +1176,8 @@
QualType T = Func->getType();
QualType NoProtoType = T;
if (const FunctionProtoType *Proto = T->getAs<FunctionProtoType>())
- NoProtoType = Context.getFunctionNoProtoType(Proto->getResultType());
+ NoProtoType = Context.getFunctionNoProtoType(Proto->getResultType(),
+ Proto->getExtInfo());
return BuildDeclRefExpr(Func, NoProtoType, NameLoc, &SS);
}
}