Skip to content

Commit 7bf33c8

Browse files
[llvm-remarkutil] filter: Fix curses.h namespace pollution (#160802)
Remove the filter namespace, because `filter` is used by `curses.h`, causing some external build failures (#159784 (comment)). We don't really need the namespace here anyways, because everything is static. This was just following what some of the other commands in llvm-remarkutil are doing.
1 parent e6174eb commit 7bf33c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/tools/llvm-remarkutil/RemarkFilter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ using namespace llvm;
2020
using namespace remarks;
2121
using namespace llvm::remarkutil;
2222

23-
namespace filter {
23+
// Note: Avoid using the identifier "filter" in this file, as it is prone to
24+
// namespace collision with headers that might get included e.g.
25+
// curses.h.
2426

2527
static cl::SubCommand FilterSub("filter",
2628
"Filter remarks based on specified criteria.");
@@ -80,5 +82,3 @@ static Error tryFilter() {
8082
}
8183

8284
static CommandRegistration FilterReg(&FilterSub, tryFilter);
83-
84-
} // namespace filter

0 commit comments

Comments
 (0)