[all-commits] [llvm/llvm-project] ffcc07: [[Clang CallGraph]] CallGraph should still record ...

Erich Keane via All-commits all-commits at lists.llvm.org
Fri Mar 20 08:55:40 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ffcc076a2b23363025de2f67243086963f235b20
      https://github.com/llvm/llvm-project/commit/ffcc076a2b23363025de2f67243086963f235b20
  Author: Erich Keane <erich.keane at intel.com>
  Date:   2020-03-20 (Fri, 20 Mar 2020)

  Changed paths:
    M clang/include/clang/Analysis/CallGraph.h
    M clang/lib/Analysis/CallGraph.cpp
    M clang/test/Analysis/debug-CallGraph.cpp

  Log Message:
  -----------
  [[Clang CallGraph]] CallGraph should still record calls to decls.

Discovered by a downstream user, we found that the CallGraph ignores
callees unless they are defined.  This seems foolish, and prevents
combining the report with other reports to create unified reports.
Additionally, declarations contain information that is likely useful to
consumers of the CallGraph.

This patch implements this by splitting the includeInGraph function into
two versions, the current one plus one that is for callees only.  The
only difference currently is that includeInGraph checks for a body, then
calls includeCalleeInGraph.

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




More information about the All-commits mailing list