This is an archive of the discontinued LLVM Phabricator instance.

[Lexer] Allow UCN for dollar symbol '\u0024' in identifiers when using -fdollars-in-identifiers flag.
ClosedPublic

Authored by s.egerton on Dec 20 2019, 6:02 AM.

Details

Summary

Previously, the -fdollars-in-identifiers flag allows the '$' symbol to be used
in an identifier but the universal character name equivalent '\u0024' is not
allowed.
This patch changes this, so that \u0024 is valid in identifiers.

Diff Detail

Event Timeline

s.egerton created this revision.Dec 20 2019, 6:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 20 2019, 6:02 AM

This seems reasonable to me, and matches GCC 10's behavior; $ is not in the basic source character set, so encoding it with a UCN should be permitted.

rsmith accepted this revision.Dec 20 2019, 1:43 PM
This revision is now accepted and ready to land.Dec 20 2019, 1:43 PM
This revision was automatically updated to reflect the committed changes.