Skip to content

Commit 238eec4

Browse files
committed
PR comment
1 parent 16c1e1d commit 238eec4

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

lib/ClangImporter/ImportName.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1857,13 +1857,10 @@ ImportedName NameImporter::importNameImpl(const clang::NamedDecl *D,
18571857
case clang::OverloadedOperatorKind::OO_GreaterEqual:
18581858
case clang::OverloadedOperatorKind::OO_AmpAmp:
18591859
case clang::OverloadedOperatorKind::OO_PipePipe:
1860-
baseName =
1861-
isa<clang::CXXMethodDecl>(functionDecl)
1862-
? swiftCtx
1863-
.getIdentifier("__operator" +
1864-
std::string{getOperatorName(op)})
1865-
.str()
1866-
: swiftCtx.getIdentifier(clang::getOperatorSpelling(op)).str();
1860+
auto operatorName = isa<clang::CXXMethodDecl>(functionDecl)
1861+
? "__operator" + std::string{getOperatorName(op)}
1862+
: clang::getOperatorSpelling(op);
1863+
baseName = swiftCtx.getIdentifier(operatorName).str();
18671864
isFunction = true;
18681865
addEmptyArgNamesForClangFunction(functionDecl, argumentNames);
18691866
break;

0 commit comments

Comments
 (0)