[PATCH] D157479: [Clang][DebugInfo] Emit narrower base types for structured binding declarations that bind to struct bitfields

Victor Campos via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 15 06:08:55 PDT 2023


vhscampos marked an inline comment as done.
vhscampos added a comment.

@aprantl We have discussed internally a few options to implement correct debug information in this case. But this will be future work.

For the time being, we believe it is better to have no debug information rather than wrong debug info, as can be also concluded from the first line of https://llvm.org/docs/HowToUpdateDebugInfo.html



================
Comment at: clang/test/CodeGenCXX/debug-info-structured-binding-bitfield.cpp:525
+// CHECK: !202 = !DILocation(line: 279, column: 8, scope: !194)
+// CHECK: !203 = !DILocation(line: 279, column: 17, scope: !194)
+// CHECK: !204 = !DILocation(line: 280, column: 1, scope: !194)
----------------
aprantl wrote:
> This test is going to to be a nightmare to maintain since it's hardcoding all the metadata numbering. Please use FileCheck variables `![[VAR:[0-9]+]]` to refer to other fields. Also, this test is probably checking too much.
> The primary thing this patch changes is the data types of the fields, so the CHECK lines should focus on that.
Ok. Redone the checks to cover only what's needed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157479/new/

https://reviews.llvm.org/D157479



More information about the cfe-commits mailing list