summaryrefslogtreecommitdiffstats
path: root/clang/Analysis/DeadStores.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2007-12-12 22:39:36 +0000
committerTed Kremenek <kremenek@apple.com>2007-12-12 22:39:36 +0000
commit1daa3cfbae60569c33a0c695f10fb4ccf243a173 (patch)
treeca998daf9a0daf346031c7619359511c22ef4bef /clang/Analysis/DeadStores.cpp
parentf44cb63859352415ea2a1b3a04b51131eacf1d1f (diff)
downloadbcm5719-llvm-1daa3cfbae60569c33a0c695f10fb4ccf243a173.tar.gz
bcm5719-llvm-1daa3cfbae60569c33a0c695f10fb4ccf243a173.zip
TargetInfo no longer includes a reference to SourceManager.
Moved all clients of Diagnostics to use FullSourceLoc instead of SourceLocation. Added many utility methods to FullSourceLoc to provide shorthand for: FullLoc.getManager().someMethod(FullLoc.getLocation()); instead we have: FullLoc.someMethod(); Modified TextDiagnostics (and related classes) to use this short-hand. llvm-svn: 44957
Diffstat (limited to 'clang/Analysis/DeadStores.cpp')
-rw-r--r--clang/Analysis/DeadStores.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/Analysis/DeadStores.cpp b/clang/Analysis/DeadStores.cpp
index 80e5ba7b48e..836701049fc 100644
--- a/clang/Analysis/DeadStores.cpp
+++ b/clang/Analysis/DeadStores.cpp
@@ -40,8 +40,8 @@ public:
if (VarDecl* VD = dyn_cast<VarDecl>(DR->getDecl()))
if (VD->hasLocalStorage() && !Live(VD,AD)) {
SourceRange R = B->getRHS()->getSourceRange();
- Diags.Report(DR->getSourceRange().getBegin(), diag::warn_dead_store,
- Ctx.getSourceManager(), 0, 0, &R, 1);
+ Diags.Report(Ctx.getFullLoc(DR->getSourceRange().getBegin()),
+ diag::warn_dead_store, 0, 0, &R, 1);
}
}
else if(DeclStmt* DS = dyn_cast<DeclStmt>(S))
@@ -62,8 +62,8 @@ public:
if (!E->isConstantExpr(Ctx,NULL)) {
// Flag a warning.
SourceRange R = E->getSourceRange();
- Diags.Report(V->getLocation(), diag::warn_dead_store,
- Ctx.getSourceManager(), 0, 0, &R, 1);
+ Diags.Report(Ctx.getFullLoc(V->getLocation()),
+ diag::warn_dead_store, 0, 0, &R, 1);
}
}
}
OpenPOWER on IntegriCloud