usaxena95 added inline comments.
================ Comment at: clang-tools-extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp:87 + return false; + if (const Decl *ParentDecl = Node->Parent->ASTNode.get<Decl>()) + return llvm::isa<TranslationUnitDecl>(ParentDecl); ---------------- ilya-biryukov wrote: > Can we use `ASTNode.get<TranslationUnitDecl>()` to directly to check for this? > > Not sure how `DynTypedNode` works, though, maybe that's impossible. Works for the test. The doc for `get<T>` says that it returns NULL if the stored node does not have a type that is **convertible** to `T`. ================ Comment at: clang-tools-extra/clangd/unittests/TweakTests.cpp:782 + int main() { + aa::map m; + } ---------------- ilya-biryukov wrote: > This is incorrect, right? We should not be qualifying here. > See the relevant comment on `isInsideNamespace` Works fine now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68562/new/ https://reviews.llvm.org/D68562 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits