summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/TokenAnnotator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index 79fa5a72407..1ef0cf8d4aa 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -310,16 +310,6 @@ private:
return false;
}
- bool isCppStructuredBinding(const FormatToken *Tok) {
- if (!Style.isCpp() || !Tok->is(tok::l_square))
- return false;
- do {
- Tok = Tok->getPreviousNonComment();
- } while (Tok && Tok->isOneOf(tok::kw_const, tok::kw_volatile, tok::amp,
- tok::ampamp));
- return Tok && Tok->is(tok::kw_auto);
- }
-
bool parseSquare() {
if (!CurrentToken)
return false;
@@ -354,7 +344,7 @@ private:
unsigned BindingIncrease = 1;
if (Left->is(TT_Unknown)) {
- if (isCppStructuredBinding(Left)) {
+ if (Left->isCppStructuredBinding(Style)) {
Left->Type = TT_StructuredBindingLSquare;
} else if (StartsObjCMethodExpr) {
Left->Type = TT_ObjCMethodExpr;
OpenPOWER on IntegriCloud