hokein added inline comments.

================
Comment at: clang/lib/Sema/SemaExpr.cpp:8726
+    else if (!lhptee->isWideCharType() &&
+             lhptee->hasSignedIntegerRepresentation())
       ltrans = S.Context.getCorrespondingUnsignedType(ltrans);
----------------
I'm wondering whether the fix is in 
`ASTContext::getCorrespondingUnsignedType()` 

if my reading of the standard is right:

- there exists a corresponding standard (or extended) unsigned integer type for 
each of standard (or extended) signed integer types, 
http://eel.is/c++draft/basic.fundamental#2
- wchar_t is an integer type, http://eel.is/c++draft/basic.fundamental#11, and 
has an implementation-defined signed or unsigned integer type as its underlying 
type, http://eel.is/c++draft/basic.fundamental#8

I think the rule also applies on `wchar_t`, the fix seems to handle `WChar_S` 
case (return `ASTContext::getUnsignedWCharType()`) in 
`ASTContext::getCorrespondingUnsignedType()`. What do you think?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91625

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

Reply via email to