[clang] Unknown array lvalue element (PR #133381)

Donát Nagy via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 28 04:04:02 PDT 2025


================
@@ -0,0 +1,146 @@
+//===- LValueElementTest.cpp -----------------------------------===//
----------------
NagyDonat wrote:

I feel that creating a full unittest is overkill for this job, and it would be much more concise to specify these testcases as a lit test that uses `debug.ExprInspection` checker and `clang_analyzer_dump` to print the symbolic values of the relevant pointers. (I don't know whether this way of testing is documented anywhere – but you can search for e.g. `clang_analyzer_dump` or just `&Element` in `clang/test/Analysis` to see many examples.)

(However, I didn't inspect the deep details of this unittest, so there might be some peculiarity that doesn't work in a lit test.)

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


More information about the cfe-commits mailing list