diff --git a/clang/Sema/SemaExpr.cpp b/clang/Sema/SemaExpr.cpp index 2c40ad3281aeb34742460696532a6b82de9fc51b..8e852fbd2aff3905799e3fbf1b5994c770605948 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(t.getCanonicalType())) return Context.getPointerType(ary->getElementType()); // C99 6.3.2.1p3 return t;