From 4ac7de7199d431b47c6c71e6529951bb284dcb7f Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Wed, 11 Jun 2014 07:35:16 +0000 Subject: clang-format: Fix pointer/reference detection after decltype. Before: [](const decltype(*a) & value) {} After: [](const decltype(*a)& value) {} llvm-svn: 210643 --- clang/lib/Format/TokenAnnotator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Format/TokenAnnotator.cpp') 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() || -- cgit v1.2.3