[clang] [clang-tools-extra] [clang] Turn invented Exprs' source locations in __builtin_dump_struct to empty (PR #72750)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 19 05:50:20 PST 2023


zyn0217 wrote:

> The CI run shows the test [Sema/builtin-dump-struct.c](https://searchfox.org/llvm/source/clang/test/Sema/builtin-dump-struct.c) is failing.

Oops, I didn't even realize there's such a test for C. I had only run the Sema/builtin-dump-struct.cpp locally and it passed. :(

> I guess this means the approach of using an invalid SourceLocation doesn't work after all?
 
The answer seems no to me. At least we have to preserve these source locations at the Sema level to produce the diagnoses. As to the other approach involving "virtual buffers", I think that requires a more drastic change. I.e. moving the printf function generation to the tokenization level.

Closing this PR now and sorry for the churn!

https://github.com/llvm/llvm-project/pull/72750


More information about the cfe-commits mailing list