[cfe-dev] Multiple root nodes for CallGraph?
ahmedcharles at gmail.com
Fri Sep 30 23:10:02 CDT 2011
It could be a llvm LTO check or just a regular linker check, but I
imagine most linkers already eliminate dead functions, even if they
aren't reported in a useful way.
From: Anna Zaks
Sent: 9/30/2011 2:12 PM
To: Arjun Singri
Cc: cfe-dev at cs.uiuc.edu
Subject: Re: [cfe-dev] Multiple root nodes for CallGraph?
scan-build is a script that hijacks the build system to call the
static analyzer. Currently, the analyzer can only reason about one
translation unit at a time.
So there is no reason to have multiple roots to represent different
main functions. In addition, your checker would/should only be
applicable to functions with internal linkage.
On Sep 30, 2011, at 12:58 PM, Arjun Singri wrote:
> I am currently trying to implement a checker that detects unused methods. I am making use of the CallGraph class for this. Every time CallGraph detects the "main" function, it designates it as the root node. Considering that scan-build accepts multiple files each having a main function, does it make sense to modify CallGraph to have mutlple root nodes?
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
cfe-dev mailing list
cfe-dev at cs.uiuc.edu
More information about the cfe-dev