]> granicus.if.org Git - clang/commitdiff
[analyzer] Refactor PathDiagnosticLocation: Add comments. Remove the last constructor...
authorAnna Zaks <ganna@apple.com>
Tue, 20 Sep 2011 22:43:32 +0000 (22:43 +0000)
committerAnna Zaks <ganna@apple.com>
Tue, 20 Sep 2011 22:43:32 +0000 (22:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140200 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h

index 53703f6662365ad1603923148f8fb911806ec35c..e7baae6293d5bd4871ce024d1682b66a3cc4b104 100644 (file)
@@ -107,22 +107,19 @@ private:
     : K(kind), R(L, L), S(0), D(0), SM(&sm),
       Loc(genLocation()), Range(genRange()) {
   }
-  
+
   FullSourceLoc
     genLocation(LocationOrAnalysisContext LAC = (AnalysisContext*)0) const;
   PathDiagnosticRange
     genRange(LocationOrAnalysisContext LAC = (AnalysisContext*)0) const;
 
 public:
+  /// Create an invalid location.
   PathDiagnosticLocation()
     : K(SingleLocK), S(0), D(0), SM(0) {
   }
 
-  PathDiagnosticLocation(FullSourceLoc L)
-    : K(SingleLocK), R(L, L), S(0), D(0), SM(&L.getManager()),
-      Loc(genLocation()), Range(genRange()) {
-  }
-
+  /// Create a location corresponding to the given statement.
   PathDiagnosticLocation(const Stmt *s,
                          const SourceManager &sm,
                          LocationOrAnalysisContext lac)
@@ -130,11 +127,13 @@ public:
       Loc(genLocation(lac)), Range(genRange(lac)) {}
 
 
+  /// Create a location corresponding to the given declaration.
   PathDiagnosticLocation(const Decl *d, const SourceManager &sm)
     : K(DeclK), S(0), D(d), SM(&sm),
       Loc(genLocation()), Range(genRange()) {
   }
 
+  /// Create a location corresponding to the given declaration.
   static PathDiagnosticLocation create(const Decl *D,
                                        const SourceManager &SM) {
     return PathDiagnosticLocation(D, SM);