[llvm-bugs] [Bug 27616] New: clang-format 3.6 vs 3.7

via llvm-bugs llvm-bugs at lists.llvm.org
Tue May 3 05:14:53 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=27616

            Bug ID: 27616
           Summary: clang-format 3.6 vs 3.7
           Product: clang
           Version: 3.7
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: sbchisholm at gmail.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org
    Classification: Unclassified

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();

-- 
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/20160503/1c3f5bf7/attachment.html>


More information about the llvm-bugs mailing list