Fix a use-after-scope bug.

llvm-svn: 347970
This commit is contained in:
Haojian Wu 2018-11-30 09:23:01 +00:00
parent 260f83c426
commit ceff730fef
1 changed files with 1 additions and 1 deletions

View File

@ -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<TypedefType>())
if (const auto *RD = PT->getAsCXXRecordDecl())