Skip to content

Commit ecf7076

Browse files
committed
[clang] Avoid unnecessary call to clang::NamespaceDecl::isRedundantInlineQualifierFor().
1 parent cff2199 commit ecf7076

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clang/lib/AST/Decl.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1738,13 +1738,12 @@ void NamedDecl::printNestedNameSpecifier(raw_ostream &OS,
17381738

17391739
// Suppress inline namespace if it doesn't make the result ambiguous.
17401740
if (Ctx->isInlineNamespace() && NameInScope) {
1741-
bool isRedundant =
1742-
cast<NamespaceDecl>(Ctx)->isRedundantInlineQualifierFor(NameInScope);
17431741
if (P.SuppressInlineNamespace ==
17441742
PrintingPolicy::SuppressInlineNamespaceMode::All ||
17451743
(P.SuppressInlineNamespace ==
17461744
PrintingPolicy::SuppressInlineNamespaceMode::Redundant &&
1747-
isRedundant)) {
1745+
cast<NamespaceDecl>(Ctx)->isRedundantInlineQualifierFor(
1746+
NameInScope))) {
17481747
continue;
17491748
}
17501749
}

0 commit comments

Comments
 (0)