diff options
-rw-r--r-- | include/flang/AST/Expr.h | 2 | ||||
-rw-r--r-- | include/flang/Sema/Sema.h | 2 | ||||
-rw-r--r-- | lib/Parse/ParseExpr.cpp | 8 |
3 files changed, 9 insertions, 3 deletions
diff --git a/include/flang/AST/Expr.h b/include/flang/AST/Expr.h index bd8249dac3..fd1650b00d 100644 --- a/include/flang/AST/Expr.h +++ b/include/flang/AST/Expr.h @@ -647,7 +647,7 @@ public: } }; -/// ImpliedShapeSpec - An implied-shape array is a named constant taht takes its +/// ImpliedShapeSpec - An implied-shape array is a named constant that takes its /// shape from the constant-expr in its declaration. /// /// [R522]: diff --git a/include/flang/Sema/Sema.h b/include/flang/Sema/Sema.h index 75262a4a4d..8bd23cbe1c 100644 --- a/include/flang/Sema/Sema.h +++ b/include/flang/Sema/Sema.h @@ -42,7 +42,7 @@ class IdentifierInfo; class Token; class VarDecl; -/// Sema - This implements semantic analysis and AST buiding for Fortran. +/// Sema - This implements semantic analysis and AST building for Fortran. class Sema { Sema(const Sema&); // DO NOT IMPLEMENT void operator=(const Sema&); // DO NOT IMPLEMENT diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp index 0f43cd33c1..ce78880a87 100644 --- a/lib/Parse/ParseExpr.cpp +++ b/lib/Parse/ParseExpr.cpp @@ -24,7 +24,7 @@ namespace flang { -// ParseExpression - Expressions are level-5 expresisons optionally involving +// ParseExpression - Expressions are level-5 expressions optionally involving // defined binary operators. // // R722: @@ -643,6 +643,12 @@ ExprResult Parser::ParseNameOrCall() { // FIXME: accessing function results from inner recursive functions return ParseRecursiveCallExpression(IDRange); } + // the VarDecl is obtained from a NamedDecl which does not have a type + // apply implicit typing rules in case VD does not have a type + // FIXME: there should be a way to avoid re-applying the implicit rules + // by returning a VarDecl instead of a NamedDecl when looking up a name in + // the scope + if (VD->getType().isNull()) Actions.ApplyImplicitRulesToArgument(VD,IDRange); return VarExpr::Create(Context, IDRange, VD); } else if(IntrinsicFunctionDecl *IFunc = dyn_cast<IntrinsicFunctionDecl>(Declaration)) { |