diff options
Diffstat (limited to 'clang/lib/AST/ScanfFormatString.cpp')
| -rw-r--r-- | clang/lib/AST/ScanfFormatString.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/AST/ScanfFormatString.cpp b/clang/lib/AST/ScanfFormatString.cpp index 31c001d025fe..41cf71a3e042 100644 --- a/clang/lib/AST/ScanfFormatString.cpp +++ b/clang/lib/AST/ScanfFormatString.cpp @@ -430,9 +430,8 @@ bool ScanfSpecifier::fixType(QualType QT, QualType RawQT, QualType PT = QT->getPointeeType(); // If it's an enum, get its underlying type. - if (const EnumType *ETy = PT->getAs<EnumType>()) { + if (const auto *ED = PT->getAsEnumDecl()) { // Don't try to fix incomplete enums. - const EnumDecl *ED = ETy->getOriginalDecl()->getDefinitionOrSelf(); if (!ED->isComplete()) return false; PT = ED->getIntegerType(); |
