[PATCH] D105708: [analyzer][NFC] Display the correct function name even in crash dumps

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 9 08:56:32 PDT 2021


steakhal created this revision.
steakhal added reviewers: NoQ, vsavchenko, martong, Szelethus, ASDenysPetrov.
Herald added subscribers: manas, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun, whisperity.
steakhal requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

The `-analyzer-display-progress` displayed the function name of the currently analyzed function.
It differs in C and C++. In C++, it prints the argument types as well in a comma-separated list.
While in C, only the function name is displayed, without the brackets.

E.g.:
C++: foo(), foo(int, float)
C: foo

In crash traces, the analyzer dumps the location contexts, but the string is not enough for `-analyze-function` in C++ mode.
This patch addresses the issue by dumping the proper function names even in stack traces.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D105708

Files:
  clang/include/clang/Analysis/AnalysisDeclContext.h
  clang/lib/Analysis/AnalysisDeclContext.cpp
  clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
  clang/test/Analysis/crash-trace.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105708.357535.patch
Type: text/x-patch
Size: 7536 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210709/e26cbe97/attachment-0001.bin>


More information about the cfe-commits mailing list