summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/BugReporter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-16 07:36:28 +0000
committerChris Lattner <sabre@nondot.org>2009-01-16 07:36:28 +0000
commit8a42586c54f6ec33b657d2c052740fdb52ce3a6c (patch)
tree457d3b7e94e51e302cb361e9029b43aeee644003 /clang/lib/Analysis/BugReporter.cpp
parent3c91971b3391a6aa7f48ee11986813204006adf9 (diff)
downloadbcm5719-llvm-8a42586c54f6ec33b657d2c052740fdb52ce3a6c.tar.gz
bcm5719-llvm-8a42586c54f6ec33b657d2c052740fdb52ce3a6c.zip
more SourceLocation lexicon change: instead of referring to the
"logical" location, refer to the "instantiation" location. llvm-svn: 62316
Diffstat (limited to 'clang/lib/Analysis/BugReporter.cpp')
-rw-r--r--clang/lib/Analysis/BugReporter.cpp23
1 files changed, 8 insertions, 15 deletions
diff --git a/clang/lib/Analysis/BugReporter.cpp b/clang/lib/Analysis/BugReporter.cpp
index e6840c3ad25..adb3325f53d 100644
--- a/clang/lib/Analysis/BugReporter.cpp
+++ b/clang/lib/Analysis/BugReporter.cpp
@@ -94,7 +94,7 @@ static void ExecutionContinues(std::ostringstream& os, SourceManager& SMgr,
os << ' ';
os << "Execution continues on line "
- << SMgr.getLogicalLineNumber(S->getLocStart()) << '.';
+ << SMgr.getInstantiationLineNumber(S->getLocStart()) << '.';
}
@@ -534,7 +534,7 @@ void GRBugReporter::GeneratePathDiagnostic(PathDiagnostic& PD,
std::ostringstream os;
os << "Control jumps to line "
- << SMgr.getLogicalLineNumber(S->getLocStart()) << ".\n";
+ << SMgr.getInstantiationLineNumber(S->getLocStart()) << ".\n";
PD.push_front(new PathDiagnosticPiece(L, os.str()));
break;
@@ -548,23 +548,17 @@ void GRBugReporter::GeneratePathDiagnostic(PathDiagnostic& PD,
if (Stmt* S = Dst->getLabel())
switch (S->getStmtClass()) {
-
- default: {
+ default:
os << "No cases match in the switch statement. "
"Control jumps to line "
- << SMgr.getLogicalLineNumber(S->getLocStart()) << ".\n";
- break;
- }
-
- case Stmt::DefaultStmtClass: {
+ << SMgr.getInstantiationLineNumber(S->getLocStart()) << ".\n";
+ break;
+ case Stmt::DefaultStmtClass:
os << "Control jumps to the 'default' case at line "
- << SMgr.getLogicalLineNumber(S->getLocStart()) << ".\n";
-
+ << SMgr.getInstantiationLineNumber(S->getLocStart()) << ".\n";
break;
- }
case Stmt::CaseStmtClass: {
-
os << "Control jumps to 'case ";
CaseStmt* Case = cast<CaseStmt>(S);
@@ -602,10 +596,9 @@ void GRBugReporter::GeneratePathDiagnostic(PathDiagnostic& PD,
}
os << ":' at line "
- << SMgr.getLogicalLineNumber(S->getLocStart()) << ".\n";
+ << SMgr.getInstantiationLineNumber(S->getLocStart()) << ".\n";
break;
-
}
}
else {
OpenPOWER on IntegriCloud