https://bugs.llvm.org/show_bug.cgi?id=52527
Bug ID: 52527
Summary: clang-format can introduce */ outside of comment,
rejected by some compilers
Product: clang
Version: 12.0
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Formatter
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
When I use clang-format-diff.py on this:
void Foo(void (* /*fn*/)()) {}
I get this:
void Foo(void (*/*fn*/)()) {}
Which is rejected by MSVC at least under some configurations and versions.
Context:
https://app.circleci.com/pipelines/github/facebook/rocksdb/10051/workflows/cef8bc6a-faa4-45bd-9821-7fdc483985fb/jobs/241183
c:\users\circleci\project\db\db_block_cache_test.cc(395): warning C4138: '*/'
found outside of comment
c:\users\circleci\project\db\db_block_cache_test.cc(395): error C2220: warning
treated as error - no 'object' file generated
My work-around:
https://github.com/pdillinger/rocksdb/commit/c9885d2614d664f331cd998038e8e8f94a847d92
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs