[PATCH] D125272: [clang] Add -fcheck-new support
Pedro Falcato via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 9 17:11:23 PDT 2022
heatd added inline comments.
================
Comment at: clang/test/CodeGenCXX/fcheck-new.cpp:2
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
+// RUN: %clang -fcheck-new -emit-llvm -S %s -o - -O2 | FileCheck %s
+
----------------
jrtc27 wrote:
> Do you really want -O2 or do you just want to run mem2reg to eliminate all the alloca noise?
I added -O2 because I was testing with it, since if -fcheck-new doesn't work, it's way more noticeable, as the nullptr check gets optimized out; if it works, the branching is pretty visible and shows exactly what the option does. Also, to eliminate all the noise :) I can definitely remove -O2 though, if you want to.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125272/new/
https://reviews.llvm.org/D125272
More information about the cfe-commits
mailing list