summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/Sema.h
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-07-01 10:37:29 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-07-01 10:37:29 +0000
commited9834272fa3fe9f2c2ede7ec29800ae4cd260da (patch)
tree13e0fd96e6de953c8a8f9e548f5242cfbb3b4fa0 /clang/lib/Sema/Sema.h
parentb55e5ece9614e328f9a8d4367f1c08048b3387a2 (diff)
downloadbcm5719-llvm-ed9834272fa3fe9f2c2ede7ec29800ae4cd260da.tar.gz
bcm5719-llvm-ed9834272fa3fe9f2c2ede7ec29800ae4cd260da.zip
Add Sema support for C++ classes.
llvm-svn: 52956
Diffstat (limited to 'clang/lib/Sema/Sema.h')
-rw-r--r--clang/lib/Sema/Sema.h28
1 files changed, 25 insertions, 3 deletions
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h
index 3e687b9659f..9df94d4ae40 100644
--- a/clang/lib/Sema/Sema.h
+++ b/clang/lib/Sema/Sema.h
@@ -16,11 +16,13 @@
#define LLVM_CLANG_AST_SEMA_H
#include "IdentifierResolver.h"
+#include "CXXFieldCollector.h"
#include "clang/Parse/Action.h"
#include "clang/Parse/DeclSpec.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/SmallPtrSet.h"
+#include "llvm/ADT/OwningPtr.h"
#include <vector>
#include <string>
@@ -109,6 +111,9 @@ public:
ObjCCompatibleAliasDecl*> ObjCAliasTy;
ObjCAliasTy ObjCAliasDecls;
+ /// FieldCollector - Collects CXXFieldDecls during parsing of C++ classes.
+ llvm::OwningPtr<CXXFieldCollector> FieldCollector;
+
IdentifierResolver IdResolver;
// Enum values used by KnownFunctionIDs (see below).
@@ -215,9 +220,7 @@ private:
virtual DeclTy *FinalizeDeclaratorGroup(Scope *S, DeclTy *Group);
virtual DeclTy *ActOnStartOfFunctionDef(Scope *S, Declarator &D);
- // Until 'real' implementation is in place, override both
- // 'ActOnStartOfFunctionDef' to satisfy the compiler.
- virtual DeclTy *ActOnStartOfFunctionDef(Scope *S, DeclTy *D) { return D; }
+ virtual DeclTy *ActOnStartOfFunctionDef(Scope *S, DeclTy *D);
virtual void ObjCActOnStartOfMethodDef(Scope *S, DeclTy *D);
virtual DeclTy *ActOnFinishFunctionBody(DeclTy *Decl, StmtTy *Body);
@@ -258,6 +261,8 @@ private:
virtual void ActOnEnumBody(SourceLocation EnumLoc, DeclTy *EnumDecl,
DeclTy **Elements, unsigned NumElements);
private:
+ DeclContext *getDCParent(DeclContext *DC);
+
/// Set the current declaration context until it gets popped.
void PushDeclContext(DeclContext *DC);
void PopDeclContext();
@@ -545,6 +550,9 @@ public:
SourceLocation LParenLoc, ExprTy *E,
SourceLocation RParenLoc);
+ //// ActOnCXXThis - Parse 'this' pointer.
+ virtual ExprResult ActOnCXXThis(SourceLocation ThisLoc);
+
/// ActOnCXXBoolLiteral - Parse {true,false} literals.
virtual ExprResult ActOnCXXBoolLiteral(SourceLocation OpLoc,
tok::TokenKind Kind);
@@ -585,6 +593,20 @@ public:
bool Virtual, AccessSpecifier Access,
DeclTy *basetype, SourceLocation BaseLoc);
+ virtual void ActOnStartCXXClassDef(Scope *S, DeclTy *TagDecl,
+ SourceLocation LBrace);
+
+ virtual DeclTy *ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS,
+ Declarator &D, ExprTy *BitfieldWidth,
+ ExprTy *Init, DeclTy *LastInGroup);
+
+ virtual void ActOnFinishCXXMemberSpecification(Scope* S, SourceLocation RLoc,
+ DeclTy *TagDecl,
+ SourceLocation LBrac,
+ SourceLocation RBrac);
+
+ virtual void ActOnFinishCXXClassDef(DeclTy *TagDecl,SourceLocation RBrace);
+
// Objective-C declarations.
virtual DeclTy *ActOnStartClassInterface(
OpenPOWER on IntegriCloud