[cfe-commits] r39562 - /cfe/cfe/trunk/Sema/SemaExpr.cpp

clattner at cs.uiuc.edu clattner at cs.uiuc.edu
Wed Jul 11 09:45:38 PDT 2007


Author: clattner
Date: Wed Jul 11 11:45:38 2007
New Revision: 39562

URL: http://llvm.org/viewvc/llvm-project?rev=39562&view=rev
Log:
When a function decays into its address, ensure the result type keeps any
typedef information associated with the input.

Modified:
    cfe/cfe/trunk/Sema/SemaExpr.cpp

Modified: cfe/cfe/trunk/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Sema/SemaExpr.cpp?rev=39562&r1=39561&r2=39562&view=diff

==============================================================================
--- cfe/cfe/trunk/Sema/SemaExpr.cpp (original)
+++ cfe/cfe/trunk/Sema/SemaExpr.cpp Wed Jul 11 11:45:38 2007
@@ -559,7 +559,7 @@
   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;





More information about the cfe-commits mailing list