Skip to content
Snippets Groups Projects
  1. May 26, 2015
  2. May 12, 2015
    • Daniel Jasper's avatar
      clang-format: Make member introduced in r237108 const. · 6fb68d80
      Daniel Jasper authored
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@237114 91177308-0d34-0410-b5e6-96231b3b80d8
      6fb68d80
    • Daniel Jasper's avatar
      clang-format: Fix hanging nested blocks in macros. · ea22a3f1
      Daniel Jasper authored
      Before:
        #define MACRO()                     \
          Debug(aaa, /* force line break */ \
                {                           \
            int i;                          \
            int j;                          \
                })
      
      After:
        #define MACRO()                     \
          Debug(aaa, /* force line break */ \
                {                           \
                  int i;                    \
                  int j;                    \
                })
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@237108 91177308-0d34-0410-b5e6-96231b3b80d8
      ea22a3f1
    • Manuel Klimek's avatar
      Refactor clang-format's formatter. · 54f26dc4
      Manuel Klimek authored
      Summary:
      a) Pull out a class LevelIndentTracker whose responsibility is to keep track
         of the indent of levels across multiple annotated lines.
      b) Put all responsibility for merging lines into the LineJoiner; make the
         LineJoiner iterate over the lines so we never operate on a line that might
         be merged later; this makes the interface safer to use.
      c) Move formatting of the end-of-file whitespace into formatFirstToken.
      
      Fix bugs that became obvious after the refactoring:
      1. We would not format lines with offsets correctly inside nested blocks if
         only the outer expression was affected:
         int x = s({ // clang-format only this line
           class X {
             public:
          // ^ this starts at the non-modified indnent level; previously we would
          //   not fix this, now we correctly outdent it.
             void f();
           };
         });
      2. We would incorrectly align comments across lines that do not have comments
         for lines with nested blocks:
         int expression; // with comment
         int x = s({
           int y; // comment
           int z; // we would incorrectly align this comment with the comment on
                  // 'expression'
         });
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@237104 91177308-0d34-0410-b5e6-96231b3b80d8
      54f26dc4
  3. May 11, 2015
  4. May 07, 2015
  5. May 05, 2015
  6. Apr 30, 2015
  7. Apr 29, 2015
  8. Apr 23, 2015
  9. Mar 13, 2015
  10. Mar 09, 2015
  11. Feb 07, 2015
    • Nico Weber's avatar
      clang-format: Format Objective-C try blocks like all the other try blocks. · e2dff4ce
      Nico Weber authored
      Before:
      
        @try {
          // ...
        }
        @finally {
          // ...
        }
      
      Now:
      
        @try {
          // ...
        } @finally {
          // ...
        }
      
      This is consistent with how we format C++ try blocks and SEH try blocks.
      clang-format not doing this before was an implementation oversight.
      
      This is dependent on BraceBreakingStyle.  The snippet above is with the
      Attach style.  Style Stroustrip for example still results in the "Before:"
      snippet, which makes sense since other blocks (try, else) break after '}' too.
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@228483 91177308-0d34-0410-b5e6-96231b3b80d8
      e2dff4ce
  12. Feb 04, 2015
  13. Jan 29, 2015
  14. Jan 23, 2015
  15. Dec 17, 2014
  16. Dec 12, 2014
  17. Dec 10, 2014
Loading