[llvm-bugs] [Bug 44006] New: clang-tidy modernize-concat-nested-namespaces and llvm-namespace-comment together break file
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Nov 15 01:47:27 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=44006
Bug ID: 44006
Summary: clang-tidy modernize-concat-nested-namespaces and
llvm-namespace-comment together break file
Product: clang
Version: 9.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Tooling
Assignee: unassignedclangbugs at nondot.org
Reporter: vakevk at gmail.com
CC: llvm-bugs at lists.llvm.org
compile_commands.json:
```
[
{
"directory": "/",
"command": "/usr/bin/clang++ -std=c++17 /a.cpp",
"file": "/a.cpp"
}
]
```
a.cpp:
```
namespace outer {
namespace inner {
// here is some code
void f() {}
void g() {}
}
}
```
```
clang-tidy
"--checks=-*,modernize-concat-nested-namespaces,llvm-namespace-comment" --fix
a.cpp
```
a.cpp:
```
namespace outer::inner {
// here is some code
void f() {}
void g() {}
// namespace inner} // namespace outer
```
The file no longer compiles. Expected output is:
```
namespace outer::inner {
// here is some code
void f() {}
void g() {}
} // namespace inner::outer
```
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191115/9b8b5a52/attachment.html>
More information about the llvm-bugs
mailing list