From: George Karpenkov Date: Mon, 16 Jul 2018 20:32:32 +0000 (+0000) Subject: [analyzer] Provide a symmetric method for generating a PathDiagnosticLocation from... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e75ddf8c13756ad41aafcb557b51a3f8e95913b9;p=clang [analyzer] Provide a symmetric method for generating a PathDiagnosticLocation from Decl Differential Revision: https://reviews.llvm.org/D49166 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337211 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h b/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h index cca977de88..b18d3c9b30 100644 --- a/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h +++ b/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h @@ -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,