OSDN Git Service

[Format] Fix 'auto x(T&&, T &&)->F' with PAS_Left.
authorSam McCall <sam.mccall@gmail.com>
Fri, 24 Jan 2020 09:12:25 +0000 (10:12 +0100)
committerSam McCall <sam.mccall@gmail.com>
Fri, 24 Jan 2020 10:03:46 +0000 (11:03 +0100)
commitb3b68c0f802ebd9892f66bec0e7be96b3fb06e86
tree8dfbc96475744b98f2e6ee4c41b4343ae3b16c0f
parent035c106f378d6d7e54d5e98737d32f0f246316a2
[Format] Fix 'auto x(T&&, T &&)->F' with PAS_Left.

Summary:
An heuristic targetting `x && x->foo` was targed overly broadly and caused the
last T&& to be treated as a binary operator.

Reviewers: hokein

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D73334
clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/FormatTest.cpp