[PATCH] D125272: [clang] Add -fcheck-new support

Pedro Falcato via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 9 14:45:50 PDT 2022


heatd created this revision.
Herald added a project: All.
heatd requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay.
Herald added a project: clang.

Add -fcheck-new and -fno-check-new, from GCC, which make the compiler
not assume pointers returned from operator new are non-null.
Fixes #16931.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D125272

Files:
  clang/include/clang/Basic/LangOptions.def
  clang/include/clang/Basic/LangOptions.h
  clang/include/clang/Driver/Options.td
  clang/lib/AST/ExprCXX.cpp
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/lib/Frontend/CompilerInvocation.cpp
  clang/lib/Sema/SemaDecl.cpp
  clang/lib/Sema/SemaExprCXX.cpp
  clang/test/CodeGenCXX/fcheck-new.cpp
  clang/test/Driver/clang_f_opts.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125272.428207.patch
Type: text/x-patch
Size: 7018 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220509/5070fcd1/attachment.bin>


More information about the cfe-commits mailing list