diff options
| author | Ted Kremenek <kremenek@apple.com> | 2007-12-12 22:39:36 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2007-12-12 22:39:36 +0000 |
| commit | 1daa3cfbae60569c33a0c695f10fb4ccf243a173 (patch) | |
| tree | ca998daf9a0daf346031c7619359511c22ef4bef /clang/Analysis/DeadStores.cpp | |
| parent | f44cb63859352415ea2a1b3a04b51131eacf1d1f (diff) | |
| download | bcm5719-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.cpp | 8 |
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); } } } |

