diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-14 18:28:25 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-14 18:28:25 +0000 |
commit | 1c86b156ff5b6e42319add892c0b18eb12f6b32b (patch) | |
tree | 90a41d9c85cfa7752eee5af9569483c35c99d226 | |
parent | 5fcca6881f263b1fde716f33edfe08799bbea177 (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.cpp | 4 |
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. |