]> granicus.if.org Git - clang/commit
clang-format: More eagerly wrap trailing return types.
authorDaniel Jasper <djasper@google.com>
Fri, 5 Jun 2015 13:18:09 +0000 (13:18 +0000)
committerDaniel Jasper <djasper@google.com>
Fri, 5 Jun 2015 13:18:09 +0000 (13:18 +0000)
commitecbdb36dbad2327d638d16f23f4bf0b09fb669dd
tree7d5fd4b53dd5e2ea4232406a505d2a654ed95db1
parentc2756d261926b76307544b82874325e01e850925
clang-format: More eagerly wrap trailing return types.

Before:
  template <typename T>
  auto aaaaaaaaaaaaaaaaaaaaaa(T t) -> decltype(eaaaaaaaaaaaaaaa<T>(t.a)
                                                   .aaaaaaaa());

After:
  template <typename T>
  auto aaaaaaaaaaaaaaaaaaaaaa(T t)
      -> decltype(eaaaaaaaaaaaaaaa<T>(t.a).aaaaaaaa());

Also add a test case for a difficult template parsing case I stumbled accross.
Needs fixing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239149 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/ContinuationIndenter.cpp
lib/Format/TokenAnnotator.cpp
lib/Format/UnwrappedLineParser.cpp
unittests/Format/FormatTest.cpp