Manna created this revision. Manna added a reviewer: erichkeane. Herald added subscribers: manas, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, a.sidorin, baloghadamsoftware. Herald added a project: All. Manna requested review of this revision. Herald added a project: clang.
This patch uses castAs instead of getAs which will assert if the type doesn't match. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D151947 Files: clang/lib/CodeGen/CGDebugInfo.cpp Index: clang/lib/CodeGen/CGDebugInfo.cpp =================================================================== --- clang/lib/CodeGen/CGDebugInfo.cpp +++ clang/lib/CodeGen/CGDebugInfo.cpp @@ -3307,7 +3307,7 @@ Flags); const FunctionProtoType *FPT = - Ty->getPointeeType()->getAs<FunctionProtoType>(); + Ty->getPointeeType()->castAs<FunctionProtoType>(); return DBuilder.createMemberPointerType( getOrCreateInstanceMethodType( CXXMethodDecl::getThisType(FPT, Ty->getMostRecentCXXRecordDecl()),
Index: clang/lib/CodeGen/CGDebugInfo.cpp =================================================================== --- clang/lib/CodeGen/CGDebugInfo.cpp +++ clang/lib/CodeGen/CGDebugInfo.cpp @@ -3307,7 +3307,7 @@ Flags); const FunctionProtoType *FPT = - Ty->getPointeeType()->getAs<FunctionProtoType>(); + Ty->getPointeeType()->castAs<FunctionProtoType>(); return DBuilder.createMemberPointerType( getOrCreateInstanceMethodType( CXXMethodDecl::getThisType(FPT, Ty->getMostRecentCXXRecordDecl()),
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits