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

2023-06-12 Thread Pedro Falcato via Phabricator via cfe-commits
heatd updated this revision to Diff 530755. heatd added a comment. Remove -S from the fcheck-new test RUN:, as requested by MaskRay Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125272/new/ https://reviews.llvm.org/D125272 Files: clang/include/c

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

2023-06-12 Thread Pedro Falcato via Phabricator via cfe-commits
heatd updated this revision to Diff 530617. heatd added a comment. Addressed MaskRay's feedback: Added a testcase that showcases the conditional calling of a constructor (due to new not being tagged nonnull) Kept the testcase with the simple _Znwm call Deleted the ATTR tags at the end Re

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

2023-04-26 Thread Pedro Falcato via Phabricator via cfe-commits
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_cc1 -fcheck-new -triple x86_64-linux-gnu -S -disable-O0-optnone \ +// RUN: -emit-llvm -o - %s | opt -S -

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

2023-04-25 Thread Pedro Falcato via Phabricator via cfe-commits
heatd updated this revision to Diff 517029. heatd added a comment. Update the test to work with tip (completely forgot, apologies) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125272/new/ https://reviews.llvm.org/D125272 Files: clang/include/cl

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

2023-04-25 Thread Pedro Falcato via Phabricator via cfe-commits
heatd updated this revision to Diff 517020. heatd added a comment. Address MaskRay's comments on Options.td, adjust the help message, rebase to current tip Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125272/new/ https://reviews.llvm.org/D125272

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

2023-04-25 Thread Pedro Falcato via Phabricator via cfe-commits
heatd added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:4117 + if (const Arg *A = Args.getLastArg(OPT_fcheck_new)) +Opts.CheckNew = true; + MaskRay wrote: > Use `CodeGenOpts<"CheckNew">` and avoid change to this file. CodeGenOpts

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

2022-12-15 Thread Pedro Falcato via Phabricator via cfe-commits
heatd added inline comments. Comment at: clang/test/CodeGenCXX/fcheck-new.cpp:3 +// RUN: %clang_cc1 -fcheck-new -triple x86_64-linux-gnu -S -disable-O0-optnone \ +// RUN: -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s + jrtc27 wrote: > MaskRay wrote: > > Pl

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

2022-07-23 Thread Pedro Falcato via Phabricator via cfe-commits
heatd added a comment. In D125272#3531836 , @heatd wrote: > In D125272#3515874 , @heatd wrote: > >> In D125272#3504113 , @heatd wrote: >> >>> Adjusted the driver code to u

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

2022-05-23 Thread Pedro Falcato via Phabricator via cfe-commits
heatd added a comment. In D125272#3515874 , @heatd wrote: > In D125272#3504113 , @heatd wrote: > >> Adjusted the driver code to use addOptInFlag, adjusted the test, fixed the >> comment. > > Ping. Ping. Reposi

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

2022-05-16 Thread Pedro Falcato via Phabricator via cfe-commits
heatd added a comment. In D125272#3504113 , @heatd wrote: > Adjusted the driver code to use addOptInFlag, adjusted the test, fixed the > comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125272

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

2022-05-10 Thread Pedro Falcato via Phabricator via cfe-commits
heatd updated this revision to Diff 428433. heatd added a comment. Adjusted the driver code to use addOptInFlag, adjusted the test, fixed the comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125272/new/ https://reviews.llvm.org/D125272 File

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

2022-05-09 Thread Pedro Falcato via Phabricator via cfe-commits
heatd added inline comments. Comment at: clang/test/Driver/clang_f_opts.c:73 - // RUN: %clang -### -S -fauto-profile=%S/Inputs/file.prof %s 2>&1 | FileCheck -check-prefix=CHECK-AUTO-PROFILE %s jrtc27 wrote: > Hmmm Huh, running clang-format on clang_f_opts.c m

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

2022-05-09 Thread Pedro Falcato via Phabricator via cfe-commits
heatd updated this revision to Diff 428254. heatd added a comment. Re-did the test, deleted redundant minus line diff. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125272/new/ https://reviews.llvm.org/D125272 Files: clang/include/clang/Basic/La

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

2022-05-09 Thread Pedro Falcato via Phabricator via cfe-commits
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 wan

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

2022-05-09 Thread Pedro Falcato via Phabricator via cfe-commits
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