[llvm-bugs] clang-format 3.6 vs 3.7

Stephen Chisholm via llvm-bugs llvm-bugs at lists.llvm.org
Mon May 2 11:28:59 PDT 2016


Below is an example of a source file test.cpp formatted by both
clang-format versions 3.6 and 3.7.  I like the output from 3.6 far
better than what I'm getting from 3.7. Wondering if it's a bug that
it's formatted differently in 3.7 or if there is a configuration item
that I'm missing to have it behave the same as 3.6.


$ cat test.cpp
size_t tempYLTFileCount =
  Helpers::getFiles(m_pvSimulatedUnsortedYLTFilePattern,
                    regex(".*~", regex::basic)).size() +
  Helpers::getFiles(m_lvSimulatedUnsortedYLTFilePattern,
                    regex(".*~", regex::basic)).size();


$ clang-format-3.7 -style=google test.cpp
size_t tempYLTFileCount = Helpers::getFiles(m_pvSimulatedUnsortedYLTFilePattern,
                                            regex(".*~", regex::basic))
                              .size() +
                          Helpers::getFiles(m_lvSimulatedUnsortedYLTFilePattern,
                                            regex(".*~", regex::basic))
                              .size();


$ clang-format-3.6 -style=google test.cpp
size_t tempYLTFileCount = Helpers::getFiles(m_pvSimulatedUnsortedYLTFilePattern,
                                            regex(".*~", regex::basic)).size() +
                          Helpers::getFiles(m_lvSimulatedUnsortedYLTFilePattern,
                                            regex(".*~", regex::basic)).size();



Cheers, Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160502/31f057d3/attachment.html>


More information about the llvm-bugs mailing list