[cfe-dev] Is it safe to cast-away constness to use Clang static analysis?
Jonas Toth via cfe-dev
cfe-dev at lists.llvm.org
Tue Oct 3 12:49:32 PDT 2017
you can try `const_cast` as first try to do it.
Am 03.10.2017 um 21:31 schrieb Roman Popov via cfe-dev:
> I'm writing a code refactoring tool that needs some static analysis
> I've noticed that AST Matchers return const AST nodes, but static
> analysis sometimes wants to consume non-const pointers.
> For example to build call graph I need to pass non-const pointer:
> CallGraph::addToCallGraph(Decl *D)
> So does static analysis modifies AST? Or it's just a bug in method
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev