[PATCH] D110670: [Sema] Allow comparisons between different ms ptr size address space types.

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 29 12:16:35 PDT 2021


aaron.ballman added reviewers: rnk, majnemer.
aaron.ballman added inline comments.


================
Comment at: clang/lib/Sema/SemaExprCXX.cpp:6682
+              isPtrSizeAddressSpace(Q2.getAddressSpace()))
+            MaybeQ1 = true;
+          else
----------------
I'm pretty sure this is correct based on my inspection of what code MSVC is generating. But it would be helpful to have some codegen tests in Clang for this functionality as well.


================
Comment at: clang/test/Sema/MicrosoftExtensions.cpp:9-10
+  return (p32u == p32s) +
+         (p32u == p64) +
+         (p32s == p64);
+}
----------------
(Side question, not directly about this patch but sorta related.) Should there be a diagnostic about conversion potentially causing a possible loss of data (on the 64-bit target)?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110670



More information about the cfe-commits mailing list