]> granicus.if.org Git - clang/commit
Allow splitting between string literals and identifiers.
authorDaniel Jasper <djasper@google.com>
Sat, 23 Feb 2013 07:46:38 +0000 (07:46 +0000)
committerDaniel Jasper <djasper@google.com>
Sat, 23 Feb 2013 07:46:38 +0000 (07:46 +0000)
commit3a204418482c9ae70ad482e781132c54306c3aa6
tree3e3ae9f1d077aaed04020e436e6ebd4dfe30a67e
parenta8f7a97a22d1ed92fd3309f071c0121c22e52aa3
Allow splitting between string literals and identifiers.

Also don't break in long include directives as that is not desired.

We can now format:

  #include "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
  #define LL_FORMAT "ll"
  printf("aaaaa: %d, bbbbbbbbb: %" LL_FORMAT "d, cccccccc: %" LL_FORMAT
         "d, ddddddddd: %" LL_FORMAT "d\n");

Before, this led to weird results.

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