diff options
Diffstat (limited to 'clang/lib/AST/PrintfFormatString.cpp')
| -rw-r--r-- | clang/lib/AST/PrintfFormatString.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/AST/PrintfFormatString.cpp b/clang/lib/AST/PrintfFormatString.cpp index 687160c6116b..855550475721 100644 --- a/clang/lib/AST/PrintfFormatString.cpp +++ b/clang/lib/AST/PrintfFormatString.cpp @@ -793,8 +793,8 @@ bool PrintfSpecifier::fixType(QualType QT, const LangOptions &LangOpt, } // If it's an enum, get its underlying type. - if (const EnumType *ETy = QT->getAs<EnumType>()) - QT = ETy->getOriginalDecl()->getDefinitionOrSelf()->getIntegerType(); + if (const auto *ED = QT->getAsEnumDecl()) + QT = ED->getIntegerType(); const BuiltinType *BT = QT->getAs<BuiltinType>(); if (!BT) { |
