[PATCH] D82312: Add `CharLiteral` to SyntaxTree

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 24 03:44:56 PDT 2020


gribozavr2 accepted this revision.
gribozavr2 added a comment.
This revision is now accepted and ready to land.

LGTM after new tests are added.



================
Comment at: clang/unittests/Tooling/Syntax/TreeTest.cpp:1240
+  'a';
+  L'a';
+}
----------------
Could you add tests for escape sequences (`'\n'`, `'\x20'` etc.), and non-ASCII characters, here, and below in Unicode literals?


================
Comment at: clang/unittests/Tooling/Syntax/TreeTest.cpp:1266
+
+TEST_P(SyntaxTreeTest, CharacterLiteralCxx11) {
+  if (!GetParam().isCXX11OrLater()) {
----------------
eduucaldas wrote:
> Rename to `CharacterLiteralUtf`?
Either name is good, I think.


================
Comment at: clang/unittests/Tooling/Syntax/TreeTest.cpp:1300
+
+TEST_P(SyntaxTreeTest, CharacterLiteralCxx17) {
+  if (!GetParam().isCXX17OrLater()) {
----------------
eduucaldas wrote:
> Rename to `CharacterLiteralUtf8`?
Either name is good, I think.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82312/new/

https://reviews.llvm.org/D82312





More information about the cfe-commits mailing list