summaryrefslogtreecommitdiff
path: root/include/flang/AST
diff options
context:
space:
mode:
Diffstat (limited to 'include/flang/AST')
-rw-r--r--include/flang/AST/Decl.h4
-rw-r--r--include/flang/AST/Expr.h3
-rw-r--r--include/flang/AST/Stmt.h9
3 files changed, 10 insertions, 6 deletions
diff --git a/include/flang/AST/Decl.h b/include/flang/AST/Decl.h
index 230968542a..9cd5442a82 100644
--- a/include/flang/AST/Decl.h
+++ b/include/flang/AST/Decl.h
@@ -598,7 +598,7 @@ public:
return IsSequence;
}
- bool setIsSequence(bool V) { IsSequence = V; }
+ void setIsSequence(bool V) { IsSequence = V; }
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
static bool classof(const RecordDecl *D) { return true; }
@@ -741,7 +741,7 @@ private:
int Attr)
: DeclaratorDecl(DK, DC, NameInfo.getLoc(), NameInfo.getName(), T),
DeclContext(DK), ArgumentCount(0), Arguments(nullptr),
- Body((Stmt*)nullptr), Result(nullptr) {
+ Result(nullptr), Body((Stmt*)nullptr) {
CustomBoolAttr1 = (Attr & Recursive) != 0;
SubDeclKind = FK;
}
diff --git a/include/flang/AST/Expr.h b/include/flang/AST/Expr.h
index d7ceae4227..bd8249dac3 100644
--- a/include/flang/AST/Expr.h
+++ b/include/flang/AST/Expr.h
@@ -58,6 +58,7 @@ protected:
Expr(ExprClass ET, QualType T, SourceLocation L) : ExprID(ET), Loc(L) {
setType(T);
}
+
public:
QualType getType() const { return Ty; }
void setType(QualType T) { Ty = T; }
@@ -119,7 +120,7 @@ class ConstantExpr : public Expr {
SourceLocation MaxLoc;
protected:
ConstantExpr(ExprClass Ty, QualType T, SourceLocation Loc, SourceLocation MLoc)
- : Expr(Ty, T, Loc), MaxLoc(MLoc), Kind(0) {}
+ : Expr(Ty, T, Loc), Kind(0), MaxLoc(MLoc) {}
public:
Expr *getKindSelector() const { return Kind; }
void setKindSelector(Expr *K) { Kind = K; }
diff --git a/include/flang/AST/Stmt.h b/include/flang/AST/Stmt.h
index fd415c54ef..b67845bc4b 100644
--- a/include/flang/AST/Stmt.h
+++ b/include/flang/AST/Stmt.h
@@ -66,10 +66,11 @@ protected:
}
Stmt(StmtClass ID, SourceLocation L, Expr *SLT)
- : StmtID(ID), Loc(L), StmtLabel(SLT),
+ : StmtID(ID),
IsStmtLabelUsed(0),
IsStmtLabelUsedAsGotoTarget(0),
- IsStmtLabelUsedAsAssignTarget(0) {}
+ IsStmtLabelUsedAsAssignTarget(0),
+ Loc(L), StmtLabel(SLT) {}
public:
virtual ~Stmt();
@@ -603,7 +604,9 @@ class DataStmt : public Stmt {
unsigned NumNames;
unsigned NumValues;
Expr **NameList, **ValueList;
- Stmt *Body;
+
+ // Body is not used: comment out for now to avoid warnings
+ //Stmt *Body;
DataStmt(ASTContext &C, SourceLocation Loc,
ArrayRef<Expr*> Objects,