[PATCH] D125532: [analyzer] Introduce clang_analyzer_dumpSvalType introspection function

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 13 07:31:21 PDT 2022


steakhal marked an inline comment as done.
steakhal added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp:268
+  QualType Ty = C.getSVal(Arg).getType(C.getASTContext());
+  reportBug(Ty.getAsString(), C);
+}
----------------
martong wrote:
> Would it make sense to call `Ty->dump(OS)` to a stream and then report the string of the stream?
> That way we could see some more information. Or perhaps that could be done in another introspection function.
It's way harder to match on such dumps. Those contain pointer addresses all over the place, making FileChecking a nightmare.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125532



More information about the cfe-commits mailing list