summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-02-26 11:30:50 +0000
committerDaniel Jasper <djasper@google.com>2015-02-26 11:30:50 +0000
commitbeaa322c36e3cc00652bac081f91feaad29b80f3 (patch)
treeed9f509971097b5b86b0925cd4d2e371c79ce129 /clang/lib
parenta36842f8370192c60eda9da6739387ab6f8854b1 (diff)
downloadbcm5719-llvm-beaa322c36e3cc00652bac081f91feaad29b80f3.tar.gz
bcm5719-llvm-beaa322c36e3cc00652bac081f91feaad29b80f3.zip
clang-format: Fix space of arrays of pointers to templated types.
Before: vector<int>(*foo_)[6]; After: vector<int> (*foo_)[6]; llvm-svn: 230625
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index e23305242a7..fa086a9773f 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -1838,7 +1838,8 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line,
if ((Right.is(TT_BinaryOperator) && !Left.is(tok::l_paren)) ||
Left.isOneOf(TT_BinaryOperator, TT_ConditionalExpr))
return true;
- if (Left.is(TT_TemplateCloser) && Right.is(tok::l_paren))
+ if (Left.is(TT_TemplateCloser) && Right.is(tok::l_paren) &&
+ Right.isNot(TT_FunctionTypeLParen))
return Style.SpaceBeforeParens == FormatStyle::SBPO_Always;
if (Right.is(TT_TemplateOpener) && Left.is(tok::r_paren) &&
Left.MatchingParen && Left.MatchingParen->is(TT_OverloadedOperatorLParen))
OpenPOWER on IntegriCloud