summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlo Bertolli <cbertol@us.ibm.com>2015-05-26 18:56:10 -0400
committerCraig Griffiths <craig.griffiths@codethink.co.uk>2015-08-14 10:39:14 +0100
commit59469bc276b6d1307678d72d1c8cfa6d607ef5ef (patch)
tree9513d823f6b32edf9cc963f5d7fbcf504e7d0d77
parentdbe791efab978de96c1ffdd5c8c21ad6eac2c68c (diff)
downloadflang-59469bc276b6d1307678d72d1c8cfa6d607ef5ef.tar.gz
- Fix typos in comments
- Applying implicit typing rules when acting on dimension stmt. Fix issue #13.
-rw-r--r--include/flang/AST/Expr.h2
-rw-r--r--include/flang/Sema/Sema.h2
-rw-r--r--lib/Parse/ParseExpr.cpp8
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)) {