[PATCH] D54878: [clangd] NFC: Eliminate the unused variable warning.

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 25 16:43:12 PST 2018


MaskRay accepted this revision.
MaskRay added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clangd/AST.cpp:98
   // The name was empty, so present an anonymous entity.
-  if (auto *NS = llvm::dyn_cast<NamespaceDecl>(&ND))
+  if (isa<NamespaceDecl>(&ND))
     return "(anonymous namespace)";
----------------
`isa<NamespaceDecl>(ND)` also works.


Repository:
  rCTE Clang Tools Extra

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54878/new/

https://reviews.llvm.org/D54878





More information about the cfe-commits mailing list