This is an archive of the discontinued LLVM Phabricator instance.

[Format] Fix 'auto x(T&&, T &&)->F' with PAS_Left.
ClosedPublic

Authored by sammccall on Jan 24 2020, 1:12 AM.

Details

Summary

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

Diff Detail

Event Timeline

sammccall created this revision.Jan 24 2020, 1:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 24 2020, 1:12 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
sammccall marked an inline comment as done.Jan 24 2020, 1:13 AM
sammccall added inline comments.
clang/lib/Format/TokenAnnotator.cpp
1804

(while here: the NextToken check was redundant as we deref it above already)

Unit tests: fail. 62136 tests passed, 5 failed and 811 were skipped.

failed: libc++.std/language_support/cmp/cmp_partialord/partialord.pass.cpp
failed: libc++.std/language_support/cmp/cmp_strongeq/cmp.strongeq.pass.cpp
failed: libc++.std/language_support/cmp/cmp_strongord/strongord.pass.cpp
failed: libc++.std/language_support/cmp/cmp_weakeq/cmp.weakeq.pass.cpp
failed: libc++.std/language_support/cmp/cmp_weakord/weakord.pass.cpp

clang-tidy: pass.

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.

hokein accepted this revision.Jan 24 2020, 1:50 AM
This revision is now accepted and ready to land.Jan 24 2020, 1:50 AM
This revision was automatically updated to reflect the committed changes.