summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/TokenAnnotator.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-10-21 11:13:31 +0000
committerDaniel Jasper <djasper@google.com>2014-10-21 11:13:31 +0000
commit5ffcb7fe908166911891c697d56a582b4a836bf0 (patch)
treea63371096bcbe42e1cb49117eb827bd233d3509d /clang/lib/Format/TokenAnnotator.cpp
parentfd68191db4ae3ec5b2626cc5414fc6772efc1d7c (diff)
downloadbcm5719-llvm-5ffcb7fe908166911891c697d56a582b4a836bf0.tar.gz
bcm5719-llvm-5ffcb7fe908166911891c697d56a582b4a836bf0.zip
clang-format: [Java] Fix space in generic method calls.
Before: A.<B>doSomething(); After: A.<B>doSomething(); llvm-svn: 220285
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index 9adec611f28..4b39b507359 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -1628,6 +1628,11 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line,
return false;
if (Right.is(tok::hash) && Left.is(tok::identifier) && Left.TokenText == "L")
return false;
+ if (Left.Type == TT_TemplateCloser && Left.MatchingParen &&
+ Left.MatchingParen->Previous &&
+ Left.MatchingParen->Previous->is(tok::period))
+ // A.<B>DoSomething();
+ return false;
return true;
}
OpenPOWER on IntegriCloud