On Feb 24, 2008, at 8:24 PM, Chris Lattner wrote:
+/// PraseThrowExpression - THis handles the C++ throw expression.

Minor typos here: prase -> parse, THis -> This

Fixed.  Found one more instance of prase, fixed that as well.

Tabs:

+  virtual ExprResult ActOnCXXThrow(SourceLocation OpLoc,
+                                  ExprTy *Op = 0) {

Fixed all tabs.

+  ///  CXXThrowExpr - [C++ 15] C++ Throw Expression.
+  ///
+  class CXXThrowExpr : public Expr {
+    Expr *Op;
+    SourceLocation Loc;

I'd suggest renaming Loc -> ThrowLoc

Sure...  Fixed.

In the comment, please say explicitly that this handles two cases "throw;" in which case the operand is null, and "throw x;" in which case x is the operand.

Done.  I added some more comments as well.

This method:
+    Expr *getSubExpr() const { return Op; }

Should be replaced with these two:
+    const Expr *getSubExpr() const { return Op; }
+    Expr *getSubExpr() { return Op; }

I just copied CXXCastExpr, which didn't have it. I'll submit a patch for that next.

I also added a FIXME for handling throw when not followed by a ';' nor an assignment-expression. Something parser generators do automagically for us, but something we have to compute. Do we have a tentative parse system yet or some other easy way to do this? [ I think I know the answer, I bet not. ]


Attachment: eh-1a.diffs
Description: Binary data


_______________________________________________
cfe-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

Reply via email to