https://bugs.llvm.org/show_bug.cgi?id=38246
Bug ID: 38246
Summary: clang-format causes compilation failure by moving
#ifdef
Product: clang
Version: 6.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Formatter
Assignee: unassignedclangb...@nondot.org
Reporter: michal.ogrod...@starcounter.com
CC: djas...@google.com, kli...@google.com,
llvm-bugs@lists.llvm.org
$ cat new.cpp
void foo()
{
{
#ifdef WIN32
if ((ctime - stime) > LONG_LONG_LONG_LONG_LONG) { call_this_function();
}
#endif
}
}
$ clang-format -style=file new.cpp
void foo()
{
{
#ifdef WIN32
if ((ctime - stime) > LONG_LONG_LONG_LONG_LONG)
{ call_this_function(); } #endif
}
}
$ cat .clang-format
BasedOnStyle: Google
IndentWidth: 4
BreakBeforeBraces: Allman
AllowShortBlocksOnASingleLine: true
$ clang-format --version
clang-format version 6.0.1-svn334776-1~exp1~20180627160618.85
(branches/release_60)
system:
Ubuntu 16.04.2 LTS
$ uname -or
4.13.0-45-generic GNU/Linux
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs