[PATCH] D79582: [clangd] Fix crash in AddUsing tweak due to non-identifier DeclName
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 7 09:40:10 PDT 2020
hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.
thanks for tracking it down.
================
Comment at: clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp:214
+ if (D->getDecl()->getDeclName().getNameKind() ==
+ DeclarationName::Identifier) {
+ QualifierToRemove = D->getQualifierLoc();
----------------
nit:
```
if (const auto* II = D->getDecl()->getIdentifier()) {
...
Name = II->getName();
}
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79582/new/
https://reviews.llvm.org/D79582
More information about the cfe-commits
mailing list