From ceff730fef35a835bfdc649806fb3bdeda907a8e Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Fri, 30 Nov 2018 09:23:01 +0000 Subject: [PATCH] Fix a use-after-scope bug. llvm-svn: 347970 --- .../Checkers/RetainCountChecker/RetainCountDiagnostics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp index cffbf58..93a37aa 100644 --- a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp @@ -31,7 +31,7 @@ static bool isNumericLiteralExpression(const Expr *E) { /// If type represents a pointer to CXXRecordDecl, /// and is not a typedef, return the decl name. /// Otherwise, return the serialization of type. -static StringRef getPrettyTypeName(QualType QT) { +static std::string getPrettyTypeName(QualType QT) { QualType PT = QT->getPointeeType(); if (!PT.isNull() && !QT->getAs()) if (const auto *RD = PT->getAsCXXRecordDecl()) -- 2.7.4