[SR-13953] Give Identifier a hasUnderscoredNaming() helper #56350
Labels
compiler
The Swift compiler itself
good first issue
Good for newcomers
improvement
refactoring
Area → source tooling: refactoring
Additional Detail from JIRA
md5: 2f01bbed82012d22d725137279f99626
Issue Description:
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 ahasUnderscoredNaming()
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:It would be better if
Identifier
, and possibly some other name-related types likeDeclName
, had a helper likeDecl
's to standardize this check.The text was updated successfully, but these errors were encountered: