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.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index ef449e44c95..bd4591189f4 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -410,7 +410,10 @@ private:
Parent->isUnaryOperator() ||
// FIXME(bug 36976): ObjC return types shouldn't use TT_CastRParen.
Parent->isOneOf(TT_ObjCForIn, TT_CastRParen) ||
- getBinOpPrecedence(Parent->Tok.getKind(), true, true) > prec::Unknown);
+ // for (auto && [A,B] : C) && structure binding seen as ObjCMethodExpr
+ (Parent->isNot(tok::ampamp) &&
+ getBinOpPrecedence(Parent->Tok.getKind(), true, true) >
+ prec::Unknown));
bool ColonFound = false;
unsigned BindingIncrease = 1;
OpenPOWER on IntegriCloud