diff options
author | Daniel Jasper <djasper@google.com> | 2013-01-04 20:46:38 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-01-04 20:46:38 +0000 |
commit | 9bb0d280faaedd528d2af7eeaf06c9f262345ad2 (patch) | |
tree | 8847b7547d4cae71147f92b19ebe3708f82b49ac /unittests/Format/FormatTest.cpp | |
parent | 2b721f52655bc75f8b9d5dcc761298829d5a7c8e (diff) |
Correctly format dereference and address of in array parameters.
Before: InvalidRegions[ &R] = 0;
After: InvalidRegions[&R] = 0;
This fixes llvm.org/PR14793
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171522 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 8eadb545f7..c17bc0d76b 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -768,6 +768,8 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) { verifyFormat("a * ++b;"); verifyFormat("a * --b;"); + verifyFormat("InvalidRegions[*R] = 0;"); + // FIXME: Is this desired for LLVM? Fix if not. verifyFormat("A<int *> a;"); verifyFormat("A<int **> a;"); |