diff options
author | Daniel Jasper <djasper@google.com> | 2015-05-19 12:29:27 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-05-19 12:29:27 +0000 |
commit | 9310166a63cbc40cdb3bdbea3724030af66ae1b3 (patch) | |
tree | ec7d441779fcdc43cf57d572b9971c890897e9c1 /clang/unittests/Format/FormatTest.cpp | |
parent | c8cd58fa265a982ddcacb8181fdab64873ef2f55 (diff) | |
download | bcm5719-llvm-9310166a63cbc40cdb3bdbea3724030af66ae1b3.tar.gz bcm5719-llvm-9310166a63cbc40cdb3bdbea3724030af66ae1b3.zip |
clang-format: Improve *-detection.
Before:
S << a *(10);
After:
S << a * (10);
This fixes llvm.org/PR16500.
llvm-svn: 237690
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 5a568f4c0ba..ead063fe41d 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -5468,6 +5468,8 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) { verifyIndependentOfContext("int a = *b;"); verifyIndependentOfContext("int a = *b * c;"); verifyIndependentOfContext("int a = b * *c;"); + verifyIndependentOfContext("int a = b * (10);"); + verifyIndependentOfContext("S << b * (10);"); verifyIndependentOfContext("return 10 * b;"); verifyIndependentOfContext("return *b * *c;"); verifyIndependentOfContext("return a & ~b;"); |