diff options
author | Daniel Jasper <djasper@google.com> | 2014-11-23 19:15:35 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2014-11-23 19:15:35 +0000 |
commit | bb86d847ba53d52e110bf94d38266a9f4d286996 (patch) | |
tree | 0c99bde5079e0346d0739442d90767adafd5df4f /clang/lib/Format/TokenAnnotator.cpp | |
parent | 7198b0c77897f32f4ae28e3eee48b09f99876293 (diff) | |
download | bcm5719-llvm-bb86d847ba53d52e110bf94d38266a9f4d286996.tar.gz bcm5719-llvm-bb86d847ba53d52e110bf94d38266a9f4d286996.zip |
clang-format: Improve ObjC blocks with return type.
Before:
Block b = ^int * (A * a, B * b) {}
After:
Block b = ^int *(A *a, B *b) {}
This fixed llvm.org/PR21619.
llvm-svn: 222639
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 346af61199c..a36f9630e68 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -1033,7 +1033,7 @@ private: // It is very unlikely that we are going to find a pointer or reference type // definition on the RHS of an assignment. - if (IsExpression) + if (IsExpression && !Contexts.back().CaretFound) return TT_BinaryOperator; return TT_PointerOrReference; |