summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-06-02 22:47:04 +0000
committerChris Lattner <sabre@nondot.org>2007-06-02 22:47:04 +0000
commitea3c20b9eb737cfb77eb8708fdc9fb6d0c4ff7a3 (patch)
tree26e84e59cb6d389a52fcdcee125803c8757f988d /clang
parent2b4e21ac3f0dcda6e9af30b941401adad28c5d56 (diff)
downloadbcm5719-llvm-ea3c20b9eb737cfb77eb8708fdc9fb6d0c4ff7a3.tar.gz
bcm5719-llvm-ea3c20b9eb737cfb77eb8708fdc9fb6d0c4ff7a3.zip
When a function decays into its address, ensure the result type keeps any
typedef information associated with the input. llvm-svn: 39562
Diffstat (limited to 'clang')
-rw-r--r--clang/Sema/SemaExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/Sema/SemaExpr.cpp b/clang/Sema/SemaExpr.cpp
index 2c40ad3281a..8e852fbd2af 100644
--- a/clang/Sema/SemaExpr.cpp
+++ b/clang/Sema/SemaExpr.cpp
@@ -559,7 +559,7 @@ QualType Sema::UsualUnaryConversion(QualType t) {
if (t->isPromotableIntegerType()) // C99 6.3.1.1p2
return Context.IntTy;
if (t->isFunctionType()) // C99 6.3.2.1p4
- return Context.getPointerType(t.getCanonicalType());
+ return Context.getPointerType(t);
if (const ArrayType *ary = dyn_cast<ArrayType>(t.getCanonicalType()))
return Context.getPointerType(ary->getElementType()); // C99 6.3.2.1p3
return t;
OpenPOWER on IntegriCloud