This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Fix requires related crash
ClosedPublic

Authored by HazardyKnusperkeks on Feb 24 2022, 12:36 PM.

Details

Summary

In the presence of pp branches we parse the token stream multiple times. Thus the token already has the type set. It's best just not to assert on any type in the parser.

Fixes https://github.com/llvm/llvm-project/issues/54019

Diff Detail

Event Timeline

HazardyKnusperkeks requested review of this revision.Feb 24 2022, 12:36 PM
HazardyKnusperkeks created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 24 2022, 12:36 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
curdeius accepted this revision.Feb 24 2022, 1:11 PM

LGTM. But your test case is far from the reproduce in the issue report, so please confirm with @owenpan.

This revision is now accepted and ready to land.Feb 24 2022, 1:11 PM

LGTM. But your test case is far from the reproduce in the issue report, so please confirm with @owenpan.

See here.

owenpan accepted this revision.Feb 26 2022, 11:26 PM
This revision was landed with ongoing or failed builds.Mar 1 2022, 12:55 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 1 2022, 12:55 PM