From f9079b1f55d056d65705c1db3e8d9123b7ce8a6e Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Thu, 18 Apr 2024 14:16:33 -0700 Subject: [PATCH] Remove `using namespace` from header in glow/glow/include/glow/Base/SliceRange.h +1 Reviewed By: palmje Differential Revision: D56222659 fbshipit-source-id: 73a288714abce5677a57d415ea29ebd245ba5ddf --- include/glow/Base/SliceRange.h | 5 ----- tests/unittests/NodeSplittingTest.cpp | 9 +++++---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/include/glow/Base/SliceRange.h b/include/glow/Base/SliceRange.h index eac1e7b5a3..3d7e447857 100644 --- a/include/glow/Base/SliceRange.h +++ b/include/glow/Base/SliceRange.h @@ -24,11 +24,6 @@ #include #include -using namespace glow; -using llvm::cast; -using llvm::dyn_cast; -using llvm::isa; - namespace glow { /// Dimension range representing a contiguous [start, stop) index interval with diff --git a/tests/unittests/NodeSplittingTest.cpp b/tests/unittests/NodeSplittingTest.cpp index fce07ed154..e754f43510 100644 --- a/tests/unittests/NodeSplittingTest.cpp +++ b/tests/unittests/NodeSplittingTest.cpp @@ -49,8 +49,8 @@ TEST(TestSplitNodeOption, CheckLLVMStyleRTTI) { SplitNodeOption::SplitNodeKind::SplitNodeByChunkWeights); std::vector orthogonalOpts = {&opt1, &opt2, &opt3, &opt4}; for (auto opt : orthogonalOpts) { - EXPECT_NE(nullptr, dyn_cast(opt)); - EXPECT_EQ(nullptr, dyn_cast(opt)); + EXPECT_NE(nullptr, llvm::dyn_cast(opt)); + EXPECT_EQ(nullptr, llvm::dyn_cast(opt)); } // Check non-orthogonal options. std::vector sliceRanges = {SliceRange({{0, 1}})}; @@ -58,8 +58,9 @@ TEST(TestSplitNodeOption, CheckLLVMStyleRTTI) { EXPECT_EQ(opt5.getKind(), SplitNodeOption::SplitNodeKind::SplitNodeBySliceRanges); SplitNodeOption *nonOrthogonalOpt = &opt5; - EXPECT_EQ(nullptr, dyn_cast(nonOrthogonalOpt)); - EXPECT_NE(nullptr, dyn_cast(nonOrthogonalOpt)); + EXPECT_EQ(nullptr, + llvm::dyn_cast(nonOrthogonalOpt)); + EXPECT_NE(nullptr, llvm::dyn_cast(nonOrthogonalOpt)); } /// Test for SplitNodeByNumChunks option.