summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/TokenAnnotator.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-08-13 13:43:51 +0000
committerDaniel Jasper <djasper@google.com>2015-08-13 13:43:51 +0000
commit033181bcd2f1c3b21515072aa8f548e7899cfec6 (patch)
treec379b6a61a994b41c3c4e6d5fe5cb53cf861d548 /clang/lib/Format/TokenAnnotator.cpp
parent5eaa009e57cf80b8808995d57e74a5aea261cdb2 (diff)
downloadbcm5719-llvm-033181bcd2f1c3b21515072aa8f548e7899cfec6.tar.gz
bcm5719-llvm-033181bcd2f1c3b21515072aa8f548e7899cfec6.zip
clang-format: Inside decltype(), there is an expression.
Before: decltype(a* b) F(); After: decltype(a * b) F(); llvm-svn: 244891
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index 25ec7e6023d..41d1811541a 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -120,8 +120,9 @@ private:
}
if (Left->Previous &&
- (Left->Previous->isOneOf(tok::kw_static_assert, tok::kw_if,
- tok::kw_while, tok::l_paren, tok::comma) ||
+ (Left->Previous->isOneOf(tok::kw_static_assert, tok::kw_decltype,
+ tok::kw_if, tok::kw_while, tok::l_paren,
+ tok::comma) ||
Left->Previous->is(TT_BinaryOperator))) {
// static_assert, if and while usually contain expressions.
Contexts.back().IsExpression = true;
OpenPOWER on IntegriCloud