[all-commits] [llvm/llvm-project] d3e14f: [analyzer][NFC] Display the correct function name ...

Balazs Benics via All-commits all-commits at lists.llvm.org
Sun Jul 11 23:55:07 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d3e14fafc69a07e3dab9ddb91f1d810bb5f8d7a0
      https://github.com/llvm/llvm-project/commit/d3e14fafc69a07e3dab9ddb91f1d810bb5f8d7a0
  Author: Balazs Benics <balazs.benics at sigmatechnology.se>
  Date:   2021-07-12 (Mon, 12 Jul 2021)

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

  Log Message:
  -----------
  [analyzer][NFC] Display the correct function name even in crash dumps

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.

Reviewed By: NoQ

Differential Revision: https://reviews.llvm.org/D105708




More information about the All-commits mailing list