aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaType.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-03-09 04:22:44 +0000
committerJohn McCall <rjmccall@apple.com>2011-03-09 04:22:44 +0000
commiteecf5fa12d5426637c47d7072f0c193a8d7ff68b (patch)
tree43609da06982fb96d300f35e54a191a17b74d91b /lib/Sema/SemaType.cpp
parent6d5552131a4637f9bbe8c93386648e9bbb2c30fe (diff)
Add a bit to ParmVarDecl indicating whether the parameter undergoes
K&R-style default argument promotion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127313 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r--lib/Sema/SemaType.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp
index 20a85225a4..8e857f1a67 100644
--- a/lib/Sema/SemaType.cpp
+++ b/lib/Sema/SemaType.cpp
@@ -1873,9 +1873,12 @@ TypeSourceInfo *Sema::GetTypeForDeclarator(Declarator &D, Scope *S,
} else if (!FTI.hasPrototype) {
if (ArgTy->isPromotableIntegerType()) {
ArgTy = Context.getPromotedIntegerType(ArgTy);
+ Param->setKNRPromoted(true);
} else if (const BuiltinType* BTy = ArgTy->getAs<BuiltinType>()) {
- if (BTy->getKind() == BuiltinType::Float)
+ if (BTy->getKind() == BuiltinType::Float) {
ArgTy = Context.DoubleTy;
+ Param->setKNRPromoted(true);
+ }
}
}