diff options
| author | Daniel Jasper <djasper@google.com> | 2014-06-17 12:40:34 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2014-06-17 12:40:34 +0000 |
| commit | 553d4878da8855a12d03a97e2ce39b97e2a0a068 (patch) | |
| tree | faf07325145fddcfab992c6e4e7951cc72d898b4 /clang/lib/Format/TokenAnnotator.cpp | |
| parent | c1fd09ba2c9c79bfe6a2531ee482c5fb3fbcb188 (diff) | |
| download | bcm5719-llvm-553d4878da8855a12d03a97e2ce39b97e2a0a068.tar.gz bcm5719-llvm-553d4878da8855a12d03a97e2ce39b97e2a0a068.zip | |
clang-format: Introduce style with spaces on both sides of */&.
Patch by Janusz Sobczak (slightly extended).
This fixes llvm.org/19929.
llvm-svn: 211098
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
| -rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index f92a8f095b1..dd1c6819e28 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -1460,14 +1460,14 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line, if (Right.Type == TT_PointerOrReference) return Left.Tok.isLiteral() || ((Left.Type != TT_PointerOrReference) && Left.isNot(tok::l_paren) && - !Style.PointerBindsToType); + Style.PointerAlignment != FormatStyle::PAS_Left); if (Right.Type == TT_FunctionTypeLParen && Left.isNot(tok::l_paren) && - (Left.Type != TT_PointerOrReference || Style.PointerBindsToType)) + (Left.Type != TT_PointerOrReference || Style.PointerAlignment != FormatStyle::PAS_Right)) return true; if (Left.Type == TT_PointerOrReference) return Right.Tok.isLiteral() || Right.Type == TT_BlockComment || ((Right.Type != TT_PointerOrReference) && - Right.isNot(tok::l_paren) && Style.PointerBindsToType && + Right.isNot(tok::l_paren) && Style.PointerAlignment != FormatStyle::PAS_Right && Left.Previous && !Left.Previous->isOneOf(tok::l_paren, tok::coloncolon)); if (Right.is(tok::star) && Left.is(tok::l_paren)) |

