Don't insert an extra ParenExpr around asm operands.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70673 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index d1246d2..8083689 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -940,12 +940,11 @@
                        << Info.getConstraintStr());
 
     // Check that the output exprs are valid lvalues.
-    // FIXME: Operands to asms should not be parsed as ParenExprs.
-    ParenExpr *OutputExpr = cast<ParenExpr>(Exprs[i]);
+    Expr *OutputExpr = Exprs[i];
     if (CheckAsmLValue(OutputExpr, *this)) {
-      return StmtError(Diag(OutputExpr->getSubExpr()->getLocStart(),
+      return StmtError(Diag(OutputExpr->getLocStart(),
                   diag::err_asm_invalid_lvalue_in_output)
-        << OutputExpr->getSubExpr()->getSourceRange());
+        << OutputExpr->getSourceRange());
     }
     
     OutputConstraintInfos.push_back(Info);
@@ -969,23 +968,23 @@
                        << Info.getConstraintStr());
     }
 
-    ParenExpr *InputExpr = cast<ParenExpr>(Exprs[i]);
+    Expr *InputExpr = Exprs[i];
 
     // Only allow void types for memory constraints.
     if (Info.allowsMemory() && !Info.allowsRegister()) {
       if (CheckAsmLValue(InputExpr, *this))
-        return StmtError(Diag(InputExpr->getSubExpr()->getLocStart(),
+        return StmtError(Diag(InputExpr->getLocStart(),
                               diag::err_asm_invalid_lvalue_in_input)
                          << Info.getConstraintStr()
-                         << InputExpr->getSubExpr()->getSourceRange());
+                         << InputExpr->getSourceRange());
     }
 
     if (Info.allowsRegister()) {
       if (InputExpr->getType()->isVoidType()) {
-        return StmtError(Diag(InputExpr->getSubExpr()->getLocStart(),
+        return StmtError(Diag(InputExpr->getLocStart(),
                               diag::err_asm_invalid_type_in_input)
           << InputExpr->getType() << Info.getConstraintStr() 
-          << InputExpr->getSubExpr()->getSourceRange());
+          << InputExpr->getSourceRange());
       }
     }