[PATCH] D125272: [clang] Add -fcheck-new support
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 9 23:52:34 PDT 2022
MaskRay added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5984
+ if (Args.hasFlag(options::OPT_fcheck_new, options::OPT_fno_check_new, false))
+ CmdArgs.push_back("-fcheck-new");
----------------
See `addOptInFlag` in this file.
================
Comment at: clang/test/CodeGenCXX/fcheck-new.cpp:1
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
+// RUN: %clang -fcheck-new --target=x86_64-linux-gnu -emit-llvm -S %s -o - | opt -S -mem2reg | FileCheck %s
----------------
jrtc27 wrote:
> Not sure why they were checked before, but you'll need this to actually get the attributes checked
We generally only use `%clang_cc1` for clang code gen tests. `%clang` generally is only used for test/Driver tests.
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