This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Fix crash in AddUsing tweak due to non-identifier DeclName
ClosedPublic

Authored by adamcz on May 7 2020, 9:00 AM.

Diff Detail

Event Timeline

adamcz created this revision.May 7 2020, 9:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 7 2020, 9:00 AM
hokein accepted this revision.May 7 2020, 9:13 AM

thanks for tracking it down.

clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp
214

nit:

if (const auto* II = D->getDecl()->getIdentifier()) {
    ...
  Name = II->getName();
}
This revision is now accepted and ready to land.May 7 2020, 9:13 AM
adamcz updated this revision to Diff 262857.May 8 2020, 4:59 AM
adamcz marked an inline comment as done.

Addressed review comment

This revision was automatically updated to reflect the committed changes.