]> granicus.if.org Git - clang/commit
[analyzer] Memoize complexity of SymExpr
authorMikhail R. Gadelha <mikhail.ramalho@gmail.com>
Thu, 19 Jul 2018 17:03:12 +0000 (17:03 +0000)
committerMikhail R. Gadelha <mikhail.ramalho@gmail.com>
Thu, 19 Jul 2018 17:03:12 +0000 (17:03 +0000)
commit6efe16570639bb09816c2dba8b39df8cff31bfcc
tree745de8d45523386c9953d33546bf40f3ee79697d
parentbc7f4ca3e4f17a52e031b96b66604b5a26298012
[analyzer] Memoize complexity of SymExpr

Summary:
This patch introduces a new member to SymExpr, which stores the symbol complexity, avoiding recalculating it every time computeComplexity() is called.

Also, increase the complexity of conjured Symbols by one, so it's clear that it has a greater complexity than its underlying symbols.

Reviewers: NoQ, george.karpenkov

Reviewed By: NoQ, george.karpenkov

Subscribers: xazax.hun, szepet, a.sidorin

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337472 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/StaticAnalyzer/Core/PathSensitive/SymExpr.h
include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
lib/StaticAnalyzer/Core/SymbolManager.cpp