This is an archive of the discontinued LLVM Phabricator instance.

clang-format: [JS] sort import aliases. Users can define aliases for long symbols using import aliases:
ClosedPublic

Authored by mprobst on Jan 28 2022, 2:15 AM.

Details

Summary
import X = A.B.C;

Previously, these were unhandled and would terminate import sorting.
With this change, aliases sort as their own group, coming last after all
other imports.

Aliases are not sorted within their group, as they may reference each
other, so order is significant.

This reverts commit f750c3d95a0c8bf1d21380ae753fce12010a7561. It fixes
the msan issue by not parsing past the end of the line when handling
import aliases.

Diff Detail

Event Timeline

mprobst created this revision.Jan 28 2022, 2:15 AM
mprobst requested review of this revision.Jan 28 2022, 2:15 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 28 2022, 2:15 AM
jankuehle accepted this revision.Jan 28 2022, 2:25 AM
This revision is now accepted and ready to land.Jan 28 2022, 2:25 AM
This revision was landed with ongoing or failed builds.Jan 28 2022, 2:51 AM
This revision was automatically updated to reflect the committed changes.