aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/Parser.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-12-30 03:27:21 +0000
committerDouglas Gregor <dgregor@apple.com>2008-12-30 03:27:21 +0000
commitf780abc21c39cd4731b9e38f2d2d9f7d1510bd7b (patch)
tree9b2482dd8a7c43a95ae186d56d8d334dcfa5130a /lib/Parse/Parser.cpp
parentfc820a4394a33e4fccfd8283909d425708311d41 (diff)
Parser support for C++ using directives, from Piotr Rak
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61486 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/Parser.cpp')
-rw-r--r--lib/Parse/Parser.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp
index e5b40d9a44..3c79d6405c 100644
--- a/lib/Parse/Parser.cpp
+++ b/lib/Parse/Parser.cpp
@@ -43,6 +43,21 @@ ActionBase::~ActionBase() {}
/// Out-of-line virtual destructor to provide home for Action class.
Action::~Action() {}
+// Defined out-of-line here because of dependecy on AttributeList
+Action::DeclTy *Action::ActOnUsingDirective(Scope *CurScope,
+ SourceLocation UsingLoc,
+ SourceLocation NamespcLoc,
+ const CXXScopeSpec &SS,
+ SourceLocation IdentLoc,
+ IdentifierInfo *NamespcName,
+ AttributeList *AttrList) {
+
+ // FIXME: Parser seems to assume that Action::ActOn* takes ownership over
+ // passed AttributeList, however other actions don't free it, is it
+ // temporary state or bug?
+ delete AttrList;
+ return 0;
+}
DiagnosticBuilder Parser::Diag(SourceLocation Loc, unsigned DiagID) {
return Diags.Report(FullSourceLoc(Loc,PP.getSourceManager()), DiagID);
@@ -358,6 +373,7 @@ Parser::DeclTy *Parser::ParseExternalDeclaration() {
ConsumeToken();
}
return 0;
+ case tok::kw_using:
case tok::kw_namespace:
case tok::kw_typedef:
case tok::kw_template: