diff options
| author | Daniel Jasper <djasper@google.com> | 2013-07-16 11:37:21 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2013-07-16 11:37:21 +0000 |
| commit | 655d96ab3b5f705bf82a8326b101dabe6f698cb6 (patch) | |
| tree | c870a1dfb32a23f8fcc7a1e270aa05a9235f4860 /clang/unittests/Format/FormatTest.cpp | |
| parent | 35bb463fb18d725ffb7dd852532c1d910687ea8a (diff) | |
| download | bcm5719-llvm-655d96ab3b5f705bf82a8326b101dabe6f698cb6.tar.gz bcm5719-llvm-655d96ab3b5f705bf82a8326b101dabe6f698cb6.zip | |
clang-format: Improve detection of function types.
This fixes an incorrect detection that led to a formatting error.
Before:
some_var = function (*some_pointer_var)[0];
After:
some_var = function(*some_pointer_var)[0];
llvm-svn: 186402
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 c8827c8dec6..747a140846b 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -3628,6 +3628,8 @@ TEST_F(FormatTest, FormatsFunctionTypes) { // Other constructs can look somewhat like function types: verifyFormat("A<sizeof(*x)> a;"); verifyFormat("#define DEREF_AND_CALL_F(x) f(*x)"); + verifyFormat("some_var = function(*some_pointer_var)[0];"); + verifyFormat("void f() { function(*some_pointer_var)[0] = 10; }"); } TEST_F(FormatTest, BreaksLongDeclarations) { |

