[cfe-commits] r137000 - in /cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive: CheckerContext.h SymbolManager.h

Anna Zaks ganna at apple.com
Fri Aug 5 16:47:13 PDT 2011


Author: zaks
Date: Fri Aug  5 18:47:13 2011
New Revision: 137000

URL: http://llvm.org/viewvc/llvm-project?rev=137000&view=rev
Log:
Static Analyzer: Add a convinience API. Add comment.

Modified:
    cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
    cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h

Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h?rev=137000&r1=136999&r2=137000&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h Fri Aug  5 18:47:13 2011
@@ -90,6 +90,10 @@
     return Eng.getSValBuilder();
   }
 
+  SymbolManager &getSymbolManager() {
+    return getSValBuilder().getSymbolManager();
+  }
+
   ExplodedNode *generateNode(bool autoTransition = true) {
     assert(statement && "Only transitions with statements currently supported");
     ExplodedNode *N = generateNodeImpl(statement, getState(), false,

Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h?rev=137000&r1=136999&r2=137000&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h Fri Aug  5 18:47:13 2011
@@ -389,6 +389,9 @@
 
   const SymbolExtent *getExtentSymbol(const SubRegion *R);
 
+  /// Creates a metadata symbol associated with a specific region.
+  /// VisitCount can be used to differentiate regions corresponding to
+  /// different loop iterations, thus, making the symbol path-dependent.
   const SymbolMetadata* getMetadataSymbol(const MemRegion* R, const Stmt* S,
                                           QualType T, unsigned VisitCount,
                                           const void* SymbolTag = 0);





More information about the cfe-commits mailing list