]> granicus.if.org Git - clang/commitdiff
[analyzer] Provide a symmetric method for generating a PathDiagnosticLocation from...
authorGeorge Karpenkov <ekarpenkov@apple.com>
Mon, 16 Jul 2018 20:32:32 +0000 (20:32 +0000)
committerGeorge Karpenkov <ekarpenkov@apple.com>
Mon, 16 Jul 2018 20:32:32 +0000 (20:32 +0000)
Differential Revision: https://reviews.llvm.org/D49166

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337211 91177308-0d34-0410-b5e6-96231b3b80d8

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

index cca977de88f3aa15ba8198a735dad6f936e2c5c4..b18d3c9b3031ce3c8524a2d487e703dd6f6a1f7b 100644 (file)
@@ -216,6 +216,15 @@ public:
   static PathDiagnosticLocation createBegin(const Decl *D,
                                             const SourceManager &SM);
 
+  /// Create a location for the beginning of the declaration.
+  /// The third argument is ignored, useful for generic treatment
+  /// of statements and declarations.
+  static PathDiagnosticLocation
+  createBegin(const Decl *D, const SourceManager &SM,
+              const LocationOrAnalysisDeclContext LAC) {
+    return createBegin(D, SM);
+  }
+
   /// Create a location for the beginning of the statement.
   static PathDiagnosticLocation createBegin(const Stmt *S,
                                             const SourceManager &SM,