diff options
| author | Daniel Jasper <djasper@google.com> | 2016-06-13 14:45:12 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2016-06-13 14:45:12 +0000 |
| commit | 1f5d6371fdffd449c9d3139c2736d7023749268f (patch) | |
| tree | 499ba1250503cef94e9517af8021438b75131035 /clang/lib/Format | |
| parent | daae87aa21e119f9f667e5e086018103c4b5977d (diff) | |
| download | bcm5719-llvm-1f5d6371fdffd449c9d3139c2736d7023749268f.tar.gz bcm5719-llvm-1f5d6371fdffd449c9d3139c2736d7023749268f.zip | |
clang-format: Restrict r272537 to function ref qualifiers.
Seems this isn't generally desirable.
Before:
int const * a;
After:
int const* a;
llvm-svn: 272548
Diffstat (limited to 'clang/lib/Format')
| -rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 41bf10dd800..d3a973b591b 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -1994,7 +1994,8 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line, return false; if (Right.is(TT_PointerOrReference)) return (Left.is(tok::r_paren) && Line.MightBeFunctionDecl) || - (Left.Tok.isLiteral() || Left.is(tok::kw_const) || + (Left.Tok.isLiteral() || (Left.is(tok::kw_const) && Left.Previous && + Left.Previous->is(tok::r_paren)) || (!Left.isOneOf(TT_PointerOrReference, tok::l_paren) && (Style.PointerAlignment != FormatStyle::PAS_Left || Line.IsMultiVariableDeclStmt))); |

