We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
DeclBaseName::compare()
1 parent a5a84f1 commit f53c6a4Copy full SHA for f53c6a4
include/swift/AST/Identifier.h
@@ -385,7 +385,11 @@ class DeclBaseName {
385
}
386
387
int compare(DeclBaseName other) const {
388
- return userFacingName().compare(other.userFacingName());
+ if (int result = userFacingName().compare(other.userFacingName()))
389
+ return result;
390
+ if (getKind() == other.getKind())
391
+ return 0;
392
+ return getKind() < other.getKind() ? -1 : 1;
393
394
395
bool operator==(StringRef Str) const {
0 commit comments