[cfe-commits] r54492 - /cfe/trunk/lib/Analysis/CheckDeadStores.cpp
Ted Kremenek
kremenek at apple.com
Thu Aug 7 15:28:30 PDT 2008
Author: kremenek
Date: Thu Aug 7 17:28:30 2008
New Revision: 54492
URL: http://llvm.org/viewvc/llvm-project?rev=54492&view=rev
Log:
Don't flag any dead stores for variables marked unused.
Modified:
cfe/trunk/lib/Analysis/CheckDeadStores.cpp
Modified: cfe/trunk/lib/Analysis/CheckDeadStores.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CheckDeadStores.cpp?rev=54492&r1=54491&r2=54492&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CheckDeadStores.cpp (original)
+++ cfe/trunk/lib/Analysis/CheckDeadStores.cpp Thu Aug 7 17:28:30 2008
@@ -79,7 +79,7 @@
const LiveVariables::AnalysisDataTy& AD,
const LiveVariables::ValTy& Live) {
- if (VD->hasLocalStorage() && !Live(VD, AD))
+ if (VD->hasLocalStorage() && !Live(VD, AD) && !VD->getAttr<UnusedAttr>())
Report(VD, dsk, Ex->getSourceRange().getBegin(),
Val->getSourceRange());
}
More information about the cfe-commits
mailing list