From: Ted Kremenek Date: Fri, 15 Jul 2011 03:32:56 +0000 (+0000) Subject: Add 'Contains()' method to GRStateTrait for ImmutableList. Patch by Rui Paulo. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=165622faa4a472ff94352dee534e2adeaac9c824;p=clang Add 'Contains()' method to GRStateTrait for ImmutableList. Patch by Rui Paulo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135241 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/GRStateTrait.h b/include/clang/StaticAnalyzer/Core/PathSensitive/GRStateTrait.h index 07cdbf5234..de7b868406 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/GRStateTrait.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/GRStateTrait.h @@ -124,6 +124,10 @@ namespace ento { return F.add(K, L); } + static bool Contains(data_type L, key_type K) { + return L.contains(K); + } + static inline data_type MakeData(void* const* p) { return p ? data_type((const llvm::ImmutableListImpl*) *p) : data_type(0);