[analyzer] PR8962 again. Ban ParenExprs (and friends) from block-level expressions (by calling IgnoreParens before adding expressions to blocks). Undo 132769 (LiveVariables' local IgnoreParens), since it's no longer necessary.

Also, have Environment stop looking through NoOp casts; it didn't match the behavior of LiveVariables. And once that's gone, the whole cast block of that switch is unnecessary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132840 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/AnalysisContext.cpp b/lib/Analysis/AnalysisContext.cpp
index ddc5e88..678f02f 100644
--- a/lib/Analysis/AnalysisContext.cpp
+++ b/lib/Analysis/AnalysisContext.cpp
@@ -78,16 +78,16 @@
   if (!forcedBlkExprs)
     forcedBlkExprs = new CFG::BuildOptions::ForcedBlkExprs();
   // Default construct an entry for 'stmt'.
-  if (const ParenExpr *pe = dyn_cast<ParenExpr>(stmt))
-    stmt = pe->IgnoreParens();
+  if (const Expr *e = dyn_cast<Expr>(stmt))
+    stmt = e->IgnoreParens();
   (void) (*forcedBlkExprs)[stmt];
 }
 
 const CFGBlock *
 AnalysisContext::getBlockForRegisteredExpression(const Stmt *stmt) {
   assert(forcedBlkExprs);
-  if (const ParenExpr *pe = dyn_cast<ParenExpr>(stmt))
-    stmt = pe->IgnoreParens();
+  if (const Expr *e = dyn_cast<Expr>(stmt))
+    stmt = e->IgnoreParens();
   CFG::BuildOptions::ForcedBlkExprs::const_iterator itr = 
     forcedBlkExprs->find(stmt);
   assert(itr != forcedBlkExprs->end());