summaryrefslogtreecommitdiff
path: root/include/flang
diff options
context:
space:
mode:
Diffstat (limited to 'include/flang')
-rw-r--r--include/flang/AST/Decl.h4
-rw-r--r--include/flang/AST/Expr.h3
-rw-r--r--include/flang/AST/Stmt.h9
-rw-r--r--include/flang/Basic/Diagnostic.h2
-rw-r--r--include/flang/Basic/Token.h2
-rw-r--r--include/flang/Basic/TokenKinds.def2
6 files changed, 13 insertions, 9 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,
diff --git a/include/flang/Basic/Diagnostic.h b/include/flang/Basic/Diagnostic.h
index 597fc0784b..48af292adc 100644
--- a/include/flang/Basic/Diagnostic.h
+++ b/include/flang/Basic/Diagnostic.h
@@ -208,7 +208,7 @@ public:
DiagnosticsEngine(const llvm::IntrusiveRefCntPtr<DiagnosticIDs> &D,
llvm::SourceMgr *SM, DiagnosticClient *DC,
bool ShouldOwnClient = true)
- : Diags(D), Client(DC), OwnsDiagClient(ShouldOwnClient), SrcMgr(SM)
+ : Client(DC), OwnsDiagClient(ShouldOwnClient), SrcMgr(SM), Diags(D)
{ Reset(); }
const llvm::IntrusiveRefCntPtr<DiagnosticIDs> &getDiagnosticIDs() const {
diff --git a/include/flang/Basic/Token.h b/include/flang/Basic/Token.h
index 8b474a3368..585a45211a 100644
--- a/include/flang/Basic/Token.h
+++ b/include/flang/Basic/Token.h
@@ -130,7 +130,7 @@ public:
}
void setLiteralData(const char *Ptr) {
assert(isLiteral() && "Cannot set literal data of non-literal");
- PtrData = (void*)Ptr;
+ PtrData = const_cast<char*>(Ptr);
}
/// setFlag - Set the specified flag.
diff --git a/include/flang/Basic/TokenKinds.def b/include/flang/Basic/TokenKinds.def
index ea32a81e3e..ac70f7cdad 100644
--- a/include/flang/Basic/TokenKinds.def
+++ b/include/flang/Basic/TokenKinds.def
@@ -23,7 +23,7 @@
#ifndef FORMAT_SPEC
#define FORMAT_SPEC(X, Y) TOK(fs_ ## X)
#endif
-#ifndef OPERATOR(X,Y)
+#ifndef OPERATOR
#define OPERATOR(X,Y) TOK(kw_ ## X)
#endif