56350 - Give Identifier a hasUnderscoredNaming() helper and in the places currently using str().startsWith, change it to use the new helper.

This commit is contained in:
James Brown
2024-03-02 17:09:55 -05:00
parent 104ee1336a
commit 2c281208de
7 changed files with 10 additions and 7 deletions

View File

@@ -834,7 +834,7 @@ public:
[&](const ValueDecl *vd) {
return !printer.isVisible(vd) || vd->isObjC() ||
(vd->isStdlibDecl() && !vd->getName().isSpecial() &&
vd->getBaseIdentifier().str().startswith("_")) ||
vd->getBaseIdentifier().hasUnderscoredNaming()) ||
(vd->isStdlibDecl() && isa<StructDecl>(vd)) ||
(vd->isStdlibDecl() &&
vd->getASTContext().getErrorDecl() == vd);