Permalink
Browse files

Add some more support for the IMPLICIT statement. This now parses.

  • Loading branch information...
Bill Wendling
Bill Wendling committed Oct 29, 2011
1 parent 15c8563 commit b41a6635c290fa7cb0c19dc5af390c7f56fe7bd4
Showing with 7 additions and 8 deletions.
  1. +2 −3 include/flang/Sema/Sema.h
  2. +2 −1 lib/Parse/Parser.cpp
  3. +3 −4 lib/Sema/Sema.cpp
@@ -83,9 +83,8 @@ class Sema {
ArrayRef<UseStmt::RenamePair> RenameNames,
ExprResult StmtLabel);
- StmtResult ActOnIMPLICIT(ASTContext &C, DeclSpec &DS,
- ArrayRef<std::pair<const IdentifierInfo*,
- const IdentifierInfo*> > LetterSpecs,
+ StmtResult ActOnIMPLICIT(ASTContext &C, SMLoc Loc, DeclSpec &DS,
+ ArrayRef<ImplicitStmt::LetterSpec> LetterSpecs,
Expr *StmtLabel);
StmtResult ActOnIMPLICIT(ASTContext &C, Expr *StmtLabel);
StmtResult ActOnPARAMETER(llvm::ArrayRef<std::pair<const IdentifierInfo*,
View
@@ -825,6 +825,7 @@ Parser::StmtResult Parser::ParseIMPLICITStmt() {
if (NextTok.is(tok::equal))
return StmtResult();
+ SMLoc Loc = Tok.getLocation();
Lex();
if (Tok.is(tok::kw_NONE))
@@ -871,7 +872,7 @@ Parser::StmtResult Parser::ParseIMPLICITStmt() {
Diag.ReportError(Tok.getLocation(),
"expected ')' in IMPLICIT statement");
- return Actions.ActOnIMPLICIT(Context, DS, LetterSpecs, StmtLabel);
+ return Actions.ActOnIMPLICIT(Context, Loc, DS, LetterSpecs, StmtLabel);
}
/// ParsePARAMETERStmt - Parse the PARAMETER statement.
View
@@ -183,12 +183,11 @@ StmtResult Sema::ActOnUSE(ASTContext &C, UseStmt::ModuleNature MN,
return UseStmt::Create(C, MN, ModName, OnlyList, RenameNames, StmtLabel);
}
-StmtResult Sema::ActOnIMPLICIT(ASTContext &C, DeclSpec &DS,
- ArrayRef<std::pair<const IdentifierInfo*,
- const IdentifierInfo*> > LetterSpecs,
+StmtResult Sema::ActOnIMPLICIT(ASTContext &C, SMLoc Loc, DeclSpec &DS,
+ ArrayRef<ImplicitStmt::LetterSpec> LetterSpecs,
Expr *StmtLabel) {
QualType Ty = ActOnTypeName(C, DS);
- return StmtResult();
+ return ImplicitStmt::Create(C, Loc, Ty, LetterSpecs, StmtLabel);
}
StmtResult Sema::ActOnIMPLICIT(ASTContext &C, Expr *StmtLabel) {

0 comments on commit b41a663

Please sign in to comment.