rjmccall added inline comments.

================
Comment at: lib/Sema/SemaPseudoObject.cpp:57
@@ +56,3 @@
+      // with a base limits the number of cases here.
+      assert(refExpr->isObjectReceiver());
+
----------------
Well, it should be okay to call this on something that doesn't have a base; it 
just doesn't need to do anything and can just return refExpr.

================
Comment at: lib/Sema/SemaPseudoObject.cpp:1591
@@ +1590,3 @@
+      return baseOVE->getSourceExpr();
+    } else if (ObjCSubscriptRefExpr *refExpr =
+                   dyn_cast<ObjCSubscriptRefExpr>(opaqueRef)) {
----------------
That's what I'm saying, though: the capture process should be building the 
syntactic MSPropertySubscriptExpr using the captured OVEs for the index 
expressions as well as the recursively-captured base, and Rebuilder will then 
need to undo that.

We want to consistently replace all the captured sub-trees with their OVEs so 
that clients can easily recover the relationship between the syntactic and 
semantic forms.

================
Comment at: lib/Sema/SemaPseudoObject.cpp:1621
@@ -1582,1 +1620,3 @@
+  };
+  return Rebuilder(S, Callback).rebuild(E);
 }
----------------
My hope is that you'll be able to get this whole function down to just this 
last line and won't need to split out any of the cases here.


http://reviews.llvm.org/D13336



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to