r337211 - [analyzer] Provide a symmetric method for generating a PathDiagnosticLocation from Decl
George Karpenkov via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 16 13:32:32 PDT 2018
Author: george.karpenkov
Date: Mon Jul 16 13:32:32 2018
New Revision: 337211
URL: http://llvm.org/viewvc/llvm-project?rev=337211&view=rev
Log:
[analyzer] Provide a symmetric method for generating a PathDiagnosticLocation from Decl
Differential Revision: https://reviews.llvm.org/D49166
Modified:
cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h?rev=337211&r1=337210&r2=337211&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h Mon Jul 16 13:32:32 2018
@@ -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,
More information about the cfe-commits
mailing list