Don't flag dead stores that occur in macros.

llvm-svn: 49672
This commit is contained in:
Ted Kremenek 2008-04-14 18:28:25 +00:00
parent e36714c0b4
commit 87bfc03f4a
1 changed files with 4 additions and 0 deletions

View File

@ -39,6 +39,10 @@ public:
const LiveVariables::AnalysisDataTy& AD,
const LiveVariables::ValTy& Live) {
// Skip statements in macros.
if (S->getLocStart().isMacroID())
return;
if (BinaryOperator* B = dyn_cast<BinaryOperator>(S)) {
if (!B->isAssignmentOp()) return; // Skip non-assignments.