summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/TokenAnnotator.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-06-11 07:35:16 +0000
committerDaniel Jasper <djasper@google.com>2014-06-11 07:35:16 +0000
commit4ac7de7199d431b47c6c71e6529951bb284dcb7f (patch)
tree97471e40ee8fa7907526d957f9fe276c8124943f /clang/lib/Format/TokenAnnotator.cpp
parent1918787a72070e22593402657c90cb59fb7a8026 (diff)
downloadbcm5719-llvm-4ac7de7199d431b47c6c71e6529951bb284dcb7f.tar.gz
bcm5719-llvm-4ac7de7199d431b47c6c71e6529951bb284dcb7f.zip
clang-format: Fix pointer/reference detection after decltype.
Before: [](const decltype(*a) & value) {} After: [](const decltype(*a)& value) {} llvm-svn: 210643
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-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 66060f0b834..f92a8f095b1 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -921,7 +921,8 @@ private:
if (PrevToken->is(tok::r_paren) && PrevToken->MatchingParen &&
PrevToken->MatchingParen->Previous &&
- PrevToken->MatchingParen->Previous->is(tok::kw_typeof))
+ PrevToken->MatchingParen->Previous->isOneOf(tok::kw_typeof,
+ tok::kw_decltype))
return TT_PointerOrReference;
if (PrevToken->Tok.isLiteral() ||
OpenPOWER on IntegriCloud