diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index e6171eb708..d3f8ac0f82 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -510,7 +510,7 @@ std::string PredefinedExpr::ComputeName(IdentType IT, const Decl *CurrentDecl) { POut << ")"; if (const CXXMethodDecl *MD = dyn_cast(FD)) { - const FunctionType *FT = cast(MD->getType().getTypePtr()); + const FunctionType *FT = MD->getType()->castAs(); if (FT->isConst()) POut << " const"; if (FT->isVolatile()) diff --git a/test/CodeGenCXX/predefined-expr.cpp b/test/CodeGenCXX/predefined-expr.cpp index 1795ec8b46..24ead8f8f4 100644 --- a/test/CodeGenCXX/predefined-expr.cpp +++ b/test/CodeGenCXX/predefined-expr.cpp @@ -142,7 +142,7 @@ public: printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); } - inline void inlineFunction() { + inline void (inlineFunction)() { printf("__func__ %s\n", __func__); printf("__FUNCTION__ %s\n", __FUNCTION__); printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__);