aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-04-14 18:28:25 +0000
committerTed Kremenek <kremenek@apple.com>2008-04-14 18:28:25 +0000
commit1c86b156ff5b6e42319add892c0b18eb12f6b32b (patch)
tree90a41d9c85cfa7752eee5af9569483c35c99d226
parent5fcca6881f263b1fde716f33edfe08799bbea177 (diff)
Don't flag dead stores that occur in macros.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49672 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Analysis/DeadStores.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Analysis/DeadStores.cpp b/lib/Analysis/DeadStores.cpp
index e64214e694..0f869dcf6b 100644
--- a/lib/Analysis/DeadStores.cpp
+++ b/lib/Analysis/DeadStores.cpp
@@ -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.