summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorarphaman <arphaman@gmail.com>2013-09-15 13:25:50 +0100
committerarphaman <arphaman@gmail.com>2013-09-15 13:25:50 +0100
commit20ba8012840b22ed10d2c13890a46f92a0c59002 (patch)
tree0bd4d55e7e2b36039e4790a634199906ef696705 /include
parentc5ad9042aff3502c1fdc90cd5a9144c200434c95 (diff)
downloadflang-20ba8012840b22ed10d2c13890a46f92a0c59002.tar.gz
removed old assignment typechecking; use initialization typechecking for type constructors
Diffstat (limited to 'include')
-rw-r--r--include/flang/Basic/DiagnosticSemaKinds.td4
-rw-r--r--include/flang/Sema/Sema.h16
2 files changed, 9 insertions, 11 deletions
diff --git a/include/flang/Basic/DiagnosticSemaKinds.td b/include/flang/Basic/DiagnosticSemaKinds.td
index 1cde03b208..2ded6c4136 100644
--- a/include/flang/Basic/DiagnosticSemaKinds.td
+++ b/include/flang/Basic/DiagnosticSemaKinds.td
@@ -51,8 +51,8 @@ def err_typecheck_passing_incompatible_named_args : Error<
"passing %0 to parameter '%1' of incompatible type %2 (or parameter '%3' of type %4)">;
def note_typecheck_passing_argument_to_param_here : Note<
"passing argument to parameter %0 here">;
-def note_typecheck_passing_argument_to_field_here : Note<
- "passing argument to field %0 declared here">;
+def note_typecheck_initializing_member_here : Note<
+ "initializing member %0 declared here">;
def err_typecheck_arith_invalid_operands : Error<
"invalid operands to an arithmetic binary expression (%0 and %1)">;
diff --git a/include/flang/Sema/Sema.h b/include/flang/Sema/Sema.h
index 0053f29d71..1d6c40929d 100644
--- a/include/flang/Sema/Sema.h
+++ b/include/flang/Sema/Sema.h
@@ -565,14 +565,20 @@ public:
};
private:
Type ActTy;
+ const Decl *D;
public:
AssignmentAction(Type Ty)
- : ActTy(Ty) {}
+ : ActTy(Ty), D(nullptr) {}
+ AssignmentAction(Type Ty, const Decl *d)
+ : ActTy(Ty), D(d) {}
Type getType() const {
return ActTy;
}
+ const Decl *getDecl() const {
+ return D;
+ }
};
/// AssignConvertType - All of the 'assignment' semantic checks return this
@@ -892,14 +898,6 @@ public:
/// Returns true if the given character length can be applied to a declaration.
bool CheckCharacterLengthDeclarationCompability(QualType T, VarDecl *VD);
-
-
- /// Performs assignment typechecking.
- ExprResult TypecheckAssignment(QualType LHSType, ExprResult RHS,
- SourceLocation Loc = SourceLocation(),
- SourceRange LHSRange = SourceRange(),
- SourceRange RHSRange = SourceRange());
-
/// Returns true if the subscript expression has the
/// right amount of dimensions.
bool CheckSubscriptExprDimensionCount(SourceLocation Loc, SourceLocation RParenLoc,