]> granicus.if.org Git - clang/commit
Format */& as binary operator if followed by a unary operator.
authorDaniel Jasper <djasper@google.com>
Wed, 2 Jan 2013 17:21:36 +0000 (17:21 +0000)
committerDaniel Jasper <djasper@google.com>
Wed, 2 Jan 2013 17:21:36 +0000 (17:21 +0000)
commitba3d3074e8ef4c4c05ac062b073b2e082e6a0206
tree89ecc35d662b1e650f5c56ae12e8b9a68c07c9f6
parenta080a187fa7e538da3212c7d5e678e4b7ae03253
Format */& as binary operator if followed by a unary operator.

This fixes llvm.org/PR14687.
Also fixes segfault for lines starting with * or &.

Before:
a *~b;
*a = 1;  // <- this segfaulted

After:
a * ~b;
*a = 1;  // no segfault :-)

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