[PATCH] D108742: Reclassify form-feed and vertical tab as vertical WS for the purposes of lexing.

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 25 16:39:08 PDT 2021


cor3ntin created this revision.
Herald added a subscriber: dexonsmith.
cor3ntin requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

According to The Unicode standard, line feed and vertical tab
should be considered line breaks.

See notably http://unicode.org/reports/tr14/#BK

In addition, the C++ standard stipulates:

> If there is a form-feed or a vertical-tab character in such a comment,
> only whitespace characters shall appear between it
> and the new-line that terminates the comment; no diagnostic is required.

Given the amount of `??` I found in the test, it isn't clear that
it was intended for this characters not to be considered
vertical spaces.

This came up in SG16/WG21 in the context of
`https://wg21.link/p2348`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D108742

Files:
  clang/lib/Basic/CharInfo.cpp
  clang/unittests/Basic/CharInfoTest.cpp
  clang/unittests/Lex/DependencyDirectivesSourceMinimizerTest.cpp
  clang/unittests/Lex/LexerTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108742.368774.patch
Type: text/x-patch
Size: 4627 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210825/073fcd1e/attachment.bin>


More information about the cfe-commits mailing list