Skip to content

Commit 1b02856

Browse files
[AST] Use llvm::iterator_range::empty (NFC) (#151800)
With empty, we don't have to repeat the whole expression.
1 parent 8bc2c7c commit 1b02856

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/lib/AST/MicrosoftMangle.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,8 +1298,7 @@ void MicrosoftCXXNameMangler::mangleUnqualifiedName(GlobalDecl GD,
12981298
Name += "<unnamed-type-";
12991299
Name += TND->getName();
13001300
} else if (isa<EnumDecl>(TD) &&
1301-
cast<EnumDecl>(TD)->enumerator_begin() !=
1302-
cast<EnumDecl>(TD)->enumerator_end()) {
1301+
!cast<EnumDecl>(TD)->enumerators().empty()) {
13031302
// Anonymous non-empty enums mangle in the first enumerator.
13041303
auto *ED = cast<EnumDecl>(TD);
13051304
Name += "<unnamed-enum-";

0 commit comments

Comments
 (0)