diff options
author | Daniel Jasper <djasper@google.com> | 2013-01-14 12:18:19 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-01-14 12:18:19 +0000 |
commit | 13f23e17c713114c9aeb686c482666b2477047f4 (patch) | |
tree | 6ea753dbce75e9ef66e6849936a93eee165a7da4 /clang/unittests/Format/FormatTest.cpp | |
parent | 116ba682202e0e3156d2c76aef7ce6c1030f4b68 (diff) | |
download | bcm5719-llvm-13f23e17c713114c9aeb686c482666b2477047f4.tar.gz bcm5719-llvm-13f23e17c713114c9aeb686c482666b2477047f4.zip |
Improve understanding post increment and decrement.
Before: (a->f()) ++;
a[42] ++;
After: (a->f())++;
a[42]++;
llvm-svn: 172400
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 eb87a3b9657..9565e3a8553 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -978,6 +978,8 @@ TEST_F(FormatTest, UnderstandsUnaryOperators) { verifyFormat("if (i < -1) {}"); verifyFormat("++(a->f());"); verifyFormat("--(a->f());"); + verifyFormat("(a->f())++;"); + verifyFormat("a[42]++;"); verifyFormat("if (!(a->f())) {}"); verifyFormat("a-- > b;"); |