diff options
| author | Daniel Jasper <djasper@google.com> | 2014-04-28 09:19:28 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2014-04-28 09:19:28 +0000 |
| commit | 942d971c84e3089aab902756b6911bd82ccac300 (patch) | |
| tree | a73b2593d20c175c76e344465810bfdbb9bdf654 /clang/unittests/Format/FormatTest.cpp | |
| parent | f8542956d39c4a8adb81085c90af5f7f903916ca (diff) | |
| download | bcm5719-llvm-942d971c84e3089aab902756b6911bd82ccac300.tar.gz bcm5719-llvm-942d971c84e3089aab902756b6911bd82ccac300.zip | |
clang-format: Improve binary operator detection.
Before:
*(int *)(p &~3UL) = 0;
After:
*(int *)(p & ~3UL) = 0;
This fixes llvm.org/PR19464.
llvm-svn: 207405
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
| -rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index c006c399f38..084d1dd33d8 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -4523,6 +4523,7 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) { verifyIndependentOfContext("a * [self dostuff];"); verifyIndependentOfContext("int x = a * (a + b);"); verifyIndependentOfContext("(a *)(a + b);"); + verifyIndependentOfContext("*(int *)(p & ~3UL) = 0;"); verifyIndependentOfContext("int *pa = (int *)&a;"); verifyIndependentOfContext("return sizeof(int **);"); verifyIndependentOfContext("return sizeof(int ******);"); |

