[PATCH] D75758: [Sema] Add -Wpointer-to-enum-cast and -Wvoid-pointer-to-enum-cast

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 7 16:45:09 PST 2020


MaskRay added inline comments.


================
Comment at: clang/lib/Sema/SemaCast.cpp:2783
+        Diag = diag::ext_ms_pointer_to_int_cast;
+      else if (SrcType->isVoidPointerType())
+        if (DestType->isEnumeralType())
----------------
A ternary operator is better here. I'll fix it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75758





More information about the cfe-commits mailing list