diff options
Diffstat (limited to 'clang/lib/StaticAnalyzer')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp | 2 | ||||
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/CheckerHelpers.cpp | 2 | ||||
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp index 6fc3378a93e..6111d324fbd 100644 --- a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp +++ b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp @@ -2027,7 +2027,7 @@ bool ConditionBRVisitor::patternMatch(const Expr *Ex, // Use heuristics to determine if Ex is a macro expending to a literal and // if so, use the macro's name. SourceLocation LocStart = Ex->getBeginLoc(); - SourceLocation LocEnd = Ex->getLocEnd(); + SourceLocation LocEnd = Ex->getEndLoc(); if (LocStart.isMacroID() && LocEnd.isMacroID() && (isa<GNUNullExpr>(Ex) || isa<ObjCBoolLiteralExpr>(Ex) || diff --git a/clang/lib/StaticAnalyzer/Core/CheckerHelpers.cpp b/clang/lib/StaticAnalyzer/Core/CheckerHelpers.cpp index 254f7ef6c29..9d1ee75d3d6 100644 --- a/clang/lib/StaticAnalyzer/Core/CheckerHelpers.cpp +++ b/clang/lib/StaticAnalyzer/Core/CheckerHelpers.cpp @@ -24,7 +24,7 @@ bool containsMacro(const Stmt *S) { if (S->getBeginLoc().isMacroID()) return true; - if (S->getLocEnd().isMacroID()) + if (S->getEndLoc().isMacroID()) return true; for (const Stmt *Child : S->children()) diff --git a/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp b/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp index 636ba51635a..137f9312f1f 100644 --- a/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp +++ b/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp @@ -536,7 +536,7 @@ PathDiagnosticConsumer::FilesMade::getFiles(const PathDiagnostic &PD) { static SourceLocation getValidSourceLocation(const Stmt* S, LocationOrAnalysisDeclContext LAC, bool UseEnd = false) { - SourceLocation L = UseEnd ? S->getLocEnd() : S->getBeginLoc(); + SourceLocation L = UseEnd ? S->getEndLoc() : S->getBeginLoc(); assert(!LAC.isNull() && "A valid LocationContext or AnalysisDeclContext should " "be passed to PathDiagnosticLocation upon creation."); @@ -564,11 +564,11 @@ static SourceLocation getValidSourceLocation(const Stmt* S, if (Body) L = Body->getBeginLoc(); else - L = ADC->getDecl()->getLocEnd(); + L = ADC->getDecl()->getEndLoc(); break; } - L = UseEnd ? Parent->getLocEnd() : Parent->getBeginLoc(); + L = UseEnd ? Parent->getEndLoc() : Parent->getBeginLoc(); } while (!L.isValid()); } |