[clang] [llvm] [Clang] Show inlining hints for __attribute__((warning/error)) (PR #174892)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 20 08:03:14 PST 2026
AaronBallman wrote:
> @AaronBallman
>
> > That's what I was envisioning as well
>
> After removing the flag and running the tests, I'm wondering if we should keep the flag but just have it on by default. This is because there's a bunch of clang tests that are not expecting to see my `srcloc` metadata and I'd like to specify `-fno-diagnostics-show-inlining-chain` on those tests.
>
> I guess the two options are:
>
> 1. update all 16 of the tests, or
>
> 2. add `-fno-diagnostics-show-inlining-chain` to them
>
>
> Thoughts?
>
> edit: I have a patch altering all the tests and it wasn't too bad, still want to know opinions on this though.
> FWIW, here's the stat from fixing stale tests.
>
> ```
> clang/test/CodeGen/attr-nomerge.cpp | 6 +++---
> clang/test/CodeGenCXX/builtin-invoke.cpp | 4 ++--
> clang/test/CodeGenCXX/inheriting-constructor-cleanup.cpp | 2 +-
> clang/test/CodeGenCXX/type-aware-allocators.cpp | 2 +-
> clang/test/CodeGenCoroutines/coro-await-resume-eh.cpp | 2 +-
> clang/test/DebugInfo/CXX/member-call.cpp | 4 ++--
> clang/test/Frontend/backend-attribute-inlining-modes.c | 26 ++++++++------------------
> clang/test/OpenMP/distribute_parallel_for_num_threads_codegen.cpp | 8 ++++----
> clang/test/OpenMP/distribute_parallel_for_simd_num_threads_codegen.cpp | 12 ++++++------
> clang/test/OpenMP/scope_codegen.cpp | 8 ++++----
> clang/test/OpenMP/single_codegen.cpp | 12 ++++++------
> clang/test/OpenMP/teams_distribute_parallel_for_num_threads_codegen.cpp | 4 ++--
> clang/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_codegen.cpp | 6 +++---
> clang/test/OpenMP/threadprivate_codegen.cpp | 42 +++++++++++++++++++++---------------------
> clang/test/utils/update_cc_test_checks/Inputs/basic-cplusplus.cpp.expected | 41 +++++++++++++++++++++++++++++------------
> clang/test/utils/update_cc_test_checks/Inputs/explicit-template-instantiation.cpp.expected | 20 ++++++++++----------
> 16 files changed, 103 insertions(+), 96 deletions(-)
> ```
For 16 tests, I'd say it's better to fix the tests.
https://github.com/llvm/llvm-project/pull/174892
More information about the cfe-commits
mailing list