[PATCH] D54878: [clangd] NFC: Eliminate the unused variable warning.
Henry Wong via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 26 05:35:24 PST 2018
MTC updated this revision to Diff 175232.
MTC added a comment.
Use more concise form.
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54878/new/
https://reviews.llvm.org/D54878
Files:
clangd/AST.cpp
Index: clangd/AST.cpp
===================================================================
--- clangd/AST.cpp
+++ clangd/AST.cpp
@@ -95,11 +95,11 @@
return Out.str();
}
// The name was empty, so present an anonymous entity.
- if (llvm::dyn_cast<NamespaceDecl>(&ND))
+ if (isa<NamespaceDecl>(ND))
return "(anonymous namespace)";
if (auto *Cls = llvm::dyn_cast<RecordDecl>(&ND))
return ("(anonymous " + Cls->getKindName() + ")").str();
- if (llvm::dyn_cast<EnumDecl>(&ND))
+ if (isa<EnumDecl>(ND))
return "(anonymous enum)";
return "(anonymous)";
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54878.175232.patch
Type: text/x-patch
Size: 583 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181126/bff1aeb7/attachment.bin>
More information about the cfe-commits
mailing list