[cfe-commits] r49672 - /cfe/trunk/lib/Analysis/DeadStores.cpp

Ted Kremenek kremenek at apple.com
Mon Apr 14 11:28:36 PDT 2008


Author: kremenek
Date: Mon Apr 14 13:28:25 2008
New Revision: 49672

URL: http://llvm.org/viewvc/llvm-project?rev=49672&view=rev
Log:
Don't flag dead stores that occur in macros.

Modified:
    cfe/trunk/lib/Analysis/DeadStores.cpp

Modified: cfe/trunk/lib/Analysis/DeadStores.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/DeadStores.cpp?rev=49672&r1=49671&r2=49672&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/DeadStores.cpp (original)
+++ cfe/trunk/lib/Analysis/DeadStores.cpp Mon Apr 14 13:28:25 2008
@@ -39,6 +39,10 @@
                            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.
       





More information about the cfe-commits mailing list