summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Karpenkov <ekarpenkov@apple.com>2018-07-16 20:32:32 +0000
committerGeorge Karpenkov <ekarpenkov@apple.com>2018-07-16 20:32:32 +0000
commitcfed504a4b2c69e75753c09f6271acf0bf238ec2 (patch)
tree65bb96563b427250b0b2fd0ecd2e011deb7b8103
parent588afe422e726bfa86837597218cb0555059d2f6 (diff)
downloadbcm5719-llvm-cfed504a4b2c69e75753c09f6271acf0bf238ec2.tar.gz
bcm5719-llvm-cfed504a4b2c69e75753c09f6271acf0bf238ec2.zip
[analyzer] Provide a symmetric method for generating a PathDiagnosticLocation from Decl
Differential Revision: https://reviews.llvm.org/D49166 llvm-svn: 337211
-rw-r--r--clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h b/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
index cca977de88f..b18d3c9b303 100644
--- a/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
+++ b/clang/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,
OpenPOWER on IntegriCloud