aaron.ballman added inline comments.

================
Comment at: clang/test/Lexer/utf8-char-literal.cpp:37-47
+#if __cplusplus == 201703L
+#  if defined(CHAR8_T)
+#    if u8'\xff' == '\xff' // expected-warning {{right side of operator 
converted from negative value to unsigned}}
+#      error Something's not right.
+#    endif
+#  else
+#    if u8'\xff' != '\xff'
----------------
The equality operators seem backwards to what @tahonermann was saying -- I read 
his comment as:

C++17/14/11: u8'\xff' == '\xff'
C++17/14/11, -fchar8_t: u8'\xff' != '\xff'
C++20 and up: u8'\xff' != '\xff'
C++20 and up, -fno-char8_t: u8'\xff' == '\xff'

Hopefully Tom can clarify if I misunderstood.


================
Comment at: clang/test/Lexer/utf8-char-literal.cpp:65
+
+/// In C2x, 8u char literals are always unsigned
+#if __STDC_VERSION__ >= 202000L
----------------



================
Comment at: clang/test/Lexer/utf8-char-literal.cpp:70
+#  endif
+#endif
----------------
tbaeder wrote:
> I know indenting the preprocessor directives here isn't according to coding 
> style, but it helps a lot with readability.
I'm fine with the formatting -- it helps readability, and we don't require our 
tests to be correctly formatted anyway.


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

https://reviews.llvm.org/D124996

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to