]> granicus.if.org Git - clang/commit
Improve clang-format's memoization behavior.
authorDaniel Jasper <djasper@google.com>
Thu, 25 Apr 2013 13:31:51 +0000 (13:31 +0000)
committerDaniel Jasper <djasper@google.com>
Thu, 25 Apr 2013 13:31:51 +0000 (13:31 +0000)
commitfca24bc45192c254ca92ef1d7cef71a290392f31
tree25698f3f76d524e2ae4aa614c54ede9f03cea37c
parentf49d9c9b858973eb10717f4b3936a4a4384bd355
Improve clang-format's memoization behavior.

Deeply nested expressions basically break clang-format's memoization.
This patch slightly improves the situations and makes expressions like

  aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(
      aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(
          aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(
              aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(
                  aaaaa(aaaaa())))))))))))))))))))))))))))))))))))))));

work.

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