This is an archive of the discontinued LLVM Phabricator instance.

[NFC][clangd] fix clang-tidy finding on isa_and_nonnull
ClosedPublic

Authored by kuhnel on Nov 15 2021, 7:25 AM.

Details

Summary

This is a cleanup of the only llvm-prefer-isa-or-dyn-cast-in-conditionals finding in the clangd code base. This patch was created by automatically applying the fixes from clang-tidy.

Diff Detail

Event Timeline

kuhnel created this revision.Nov 15 2021, 7:25 AM
kadircet added inline comments.Nov 15 2021, 7:55 AM
clang-tools-extra/clangd/Selection.cpp
503

while here llvm::isa_and_nonnull we try to qualify symbols from llvm namespace.

kuhnel published this revision for review.Nov 15 2021, 8:07 AM
kuhnel added inline comments.Nov 17 2021, 5:58 AM
clang-tools-extra/clangd/Selection.cpp
503

Sorry, I'm not getting what you wanted to say.

You want me to add a llvm::?
Or is it about a operator bool()(however I didn't find one for Decl )?

kadircet accepted this revision.Nov 17 2021, 10:12 AM

thanks!

clang-tools-extra/clangd/Selection.cpp
503

You want me to add a llvm::?

right, I was asking for qualifying the symbol with llvm:: namespace specifier.

This revision is now accepted and ready to land.Nov 17 2021, 10:12 AM
This revision was automatically updated to reflect the committed changes.