[PATCH] D134461: [Clang] Diagnose an error when trying to deferencing void pointers in C

Jun Zhang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 22 11:06:51 PDT 2022


junaire added inline comments.


================
Comment at: clang/lib/Sema/SemaExpr.cpp:14541
+      Kind = diag::ext_typecheck_indirection_through_void_pointer;
+    else if (S.getLangOpts().C99 && !IsAfterAmp)
+      Kind = diag::warn_deference_void_pointer;
----------------
I don't know why we don't have `getLangOpts().C89`. I'm a bit confused about how we deal with different C standards...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134461



More information about the cfe-commits mailing list