[cfe-commits] r41369 - /cfe/trunk/AST/ExprCXX.cpp

Ted Kremenek kremenek at apple.com
Fri Aug 24 13:21:10 PDT 2007


Author: kremenek
Date: Fri Aug 24 15:21:10 2007
New Revision: 41369

URL: http://llvm.org/viewvc/llvm-project?rev=41369&view=rev
Log:
Implementation of child_begin/child_end for C++ expressions.

Added:
    cfe/trunk/AST/ExprCXX.cpp

Added: cfe/trunk/AST/ExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/ExprCXX.cpp?rev=41369&view=auto

==============================================================================
--- cfe/trunk/AST/ExprCXX.cpp (added)
+++ cfe/trunk/AST/ExprCXX.cpp Fri Aug 24 15:21:10 2007
@@ -0,0 +1,33 @@
+//===--- ExprCXX.cpp - (C++) Expression AST Node Implementation -----------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file was developed by Ted Kremenek and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements the subclesses of Expr class declared in ExprCXX.h
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/AST/ExprCXX.h"
+using namespace clang;
+
+//===----------------------------------------------------------------------===//
+//  Child Iterators for iterating over subexpressions/substatements
+//===----------------------------------------------------------------------===//
+
+
+// CXXCastExpr
+Stmt::child_iterator CXXCastExpr::child_begin() {
+  return reinterpret_cast<Stmt**>(&Op);
+}
+
+Stmt::child_iterator CXXCastExpr::child_end() {
+  return child_begin()+1;
+}
+
+// CXXBoolLiteralExpr
+Stmt::child_iterator CXXBoolLiteralExpr::child_begin() { return NULL; }
+Stmt::child_iterator CXXBoolLiteralExpr::child_end() { return NULL; }





More information about the cfe-commits mailing list