aaron.ballman added reviewers: aaron.ballman, rsmith, jyknight.
aaron.ballman added a comment.

Can you also add a test that explicitly uses `-fshort-wchar` to verify that we 
don't predefine the macro?



================
Comment at: clang/lib/Frontend/InitPreprocessor.cpp:430-435
+  // Because Clang only supports UTF-32 or UTF-16 as the
+  // wide execution encoding, any platform that doesn't uses
+  // short wchar can represent the entire Unicode code space
+  // Unicode 13 was released in December 2020.
+  // Note that new Unicode version are *very* unlikely to affect
+  // representability
----------------
Are we going to have to remember to update this value each time Unicode updates?


================
Comment at: clang/lib/Frontend/InitPreprocessor.cpp:436-438
+  if (TI.getWCharWidth() >= 32) {
+    Builder.defineMacro("__STDC_ISO_10646__", "202012L");
+  }
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106577

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

Reply via email to