Various parts of the compiler and SourceKit treat names with leading underscores a little bit specially. For example, SourceKit keeps these names out of code completion results.
To help with this, Decl has a hasUnderscoredNaming() method which checks if the method's name starts with an underscore. However, there are half a dozen places in the compiler where we need to check if plain old identifiers are underscored, and in those places, we usually write something like:
if (ModuleName.str().startswith("_") ||
It would be better if Identifier, and possibly some other name-related types like DeclName, had a helper like Decl's to standardize this check.
The text was updated successfully, but these errors were encountered: