File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -125,11 +125,15 @@ bool SemaAnnotator::walkToDeclPre(Decl *D) {
125125 bool IsExtension = false ;
126126
127127 if (auto *VD = dyn_cast<ValueDecl>(D)) {
128- if (VD-> hasName () && !VD->isImplicit ()) {
128+ if (!VD->isImplicit ()) {
129129 SourceManager &SM = VD->getASTContext ().SourceMgr ;
130- NameLen = VD->getBaseName ().userFacingName ().size ();
131- if (Loc.isValid () && SM.extractText ({Loc, 1 }) == " `" )
132- NameLen += 2 ;
130+ if (VD->hasName ()) {
131+ NameLen = VD->getBaseName ().userFacingName ().size ();
132+ if (Loc.isValid () && SM.extractText ({Loc, 1 }) == " `" )
133+ NameLen += 2 ;
134+ } else if (Loc.isValid () && SM.extractText ({Loc, 1 }) == " _" ) {
135+ NameLen = 1 ;
136+ }
133137 }
134138
135139 auto ReportParamList = [&](ParameterList *PL) {
You can’t perform that action at this time.
0 commit comments