On Jun 20, 2012, at 4:00 PM, Douglas Gregor wrote:

> 
> On Jun 20, 2012, at 1:57 PM, Anna Zaks <[email protected]> wrote:
> 
>> Author: zaks
>> Date: Wed Jun 20 15:57:49 2012
>> New Revision: 158851
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=158851&view=rev
>> Log:
>> [analyzer] Do not walk the types for call graph construction.
>> 
>> Similar to r156661. This should be beneficial performance wise and
>> hopefully, resolve a RecursiveASTVisitor crash that we are seeing in the
>> wild, but are incapable of reproducing.
> 
> There could actually be interesting control flow in variably-modified types 
> (e.g., VLAs). Should this be disabled only for types that aren't variably 
> modified?
> 


It does not matter with the way the code is currently written because we only 
use the RecursiveASTVisitor to get the list of function declarations. 
Afterwards, we use StmtVisitor to find all the CallExprs they contain and 
process them. I don't think there is any reason why we shouldn't use the 
RecursiveASTVisitor for both, so it's probably worth rewriting that code.

Thanks for the review,
Anna.
>       - Doug
> 
> 
>> Modified:
>>   cfe/trunk/include/clang/Analysis/CallGraph.h
>> 
>> Modified: cfe/trunk/include/clang/Analysis/CallGraph.h
>> URL: 
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/CallGraph.h?rev=158851&r1=158850&r2=158851&view=diff
>> ==============================================================================
>> --- cfe/trunk/include/clang/Analysis/CallGraph.h (original)
>> +++ cfe/trunk/include/clang/Analysis/CallGraph.h Wed Jun 20 15:57:49 2012
>> @@ -121,6 +121,8 @@
>>    return true;
>>  }
>> 
>> +  bool shouldWalkTypesOfTypeLocs() const { return false; }
>> +
>> private:
>>  /// \brief Add the given declaration to the call graph.
>>  void addNodeForDecl(Decl *D, bool IsGlobal);
>> 
>> 
>> _______________________________________________
>> cfe-commits mailing list
>> [email protected]
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> 

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to