Author: Kazu Hirata Date: 2025-08-02T08:09:33-07:00 New Revision: 1b0285671e33e7ef3d2d7a9029373acd8273a55a
URL: https://github.com/llvm/llvm-project/commit/1b0285671e33e7ef3d2d7a9029373acd8273a55a DIFF: https://github.com/llvm/llvm-project/commit/1b0285671e33e7ef3d2d7a9029373acd8273a55a.diff LOG: [AST] Use llvm::iterator_range::empty (NFC) (#151800) With empty, we don't have to repeat the whole expression. Added: Modified: clang/lib/AST/MicrosoftMangle.cpp Removed: ################################################################################ diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp index bc47e0506add0..e6ea0ada2e9ec 100644 --- a/clang/lib/AST/MicrosoftMangle.cpp +++ b/clang/lib/AST/MicrosoftMangle.cpp @@ -1298,8 +1298,7 @@ void MicrosoftCXXNameMangler::mangleUnqualifiedName(GlobalDecl GD, Name += "<unnamed-type-"; Name += TND->getName(); } else if (isa<EnumDecl>(TD) && - cast<EnumDecl>(TD)->enumerator_begin() != - cast<EnumDecl>(TD)->enumerator_end()) { + !cast<EnumDecl>(TD)->enumerators().empty()) { // Anonymous non-empty enums mangle in the first enumerator. auto *ED = cast<EnumDecl>(TD); Name += "<unnamed-enum-"; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits