Reapply "[ConstraintSystem] C++ Interop: Binding a string literal to std.string shouldn't increase the score"

This reverts commit 6852bc9834.

In addition to the original change, this makes sure that C++ `std::string` and Swift `String` are given distinct score, in order to prevent ambiguity which was causing build failures in some projects.

rdar://158439395
This commit is contained in:
Egor Zhdan
2025-12-08 18:15:06 +00:00
parent 51c1358778
commit 84e7f82363
6 changed files with 88 additions and 4 deletions

View File

@@ -35,6 +35,7 @@ IDENTIFIER(Any)
IDENTIFIER(ArrayLiteralElement)
IDENTIFIER(asLocalActor)
IDENTIFIER(atIndexedSubscript)
IDENTIFIER(basic_string)
IDENTIFIER_(bridgeToObjectiveC)
IDENTIFIER(buildArray)
IDENTIFIER(buildBlock)

View File

@@ -1112,6 +1112,9 @@ public:
/// Check if this is a ObjCBool type from the Objective-C module.
bool isObjCBool();
/// Check if this is a std.string type from C++.
bool isCxxString();
/// Check if this is the type Unicode.Scalar from the Swift standard library.
bool isUnicodeScalar();