diff options
author | Carlo Bertolli <cbertol@us.ibm.com> | 2015-05-20 23:15:01 -0400 |
---|---|---|
committer | Craig Griffiths <craig.griffiths@codethink.co.uk> | 2015-08-14 10:38:27 +0100 |
commit | 5497a24ee481bcb51877d226d51d0e85bffcc6d0 (patch) | |
tree | 09aa5c266c9ddb55edd57c7b8af27c4edfbaea73 /lib | |
parent | de4492dde2e9dba97df190311a4978a62922e1b0 (diff) | |
download | flang-5497a24ee481bcb51877d226d51d0e85bffcc6d0.tar.gz |
Fix some trivial warnings
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AST/Stmt.cpp | 16 | ||||
-rw-r--r-- | lib/Frontend/TextDiagnosticPrinter.cpp | 27 |
2 files changed, 22 insertions, 21 deletions
diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp index bc294d731b..8c942ee7ef 100644 --- a/lib/AST/Stmt.cpp +++ b/lib/AST/Stmt.cpp @@ -146,15 +146,15 @@ ParameterStmt *ParameterStmt::Create(ASTContext &C, SourceLocation Loc, //===----------------------------------------------------------------------===// ImplicitStmt::ImplicitStmt(SourceLocation Loc, Expr *StmtLabel) - : Stmt(ImplicitStmtClass, Loc, StmtLabel), None(true), - LetterSpec(LetterSpecTy(nullptr,nullptr)) { + : Stmt(ImplicitStmtClass, Loc, StmtLabel), + LetterSpec(LetterSpecTy(nullptr,nullptr)), None(true) { } ImplicitStmt::ImplicitStmt(SourceLocation Loc, QualType T, LetterSpecTy Spec, Expr *StmtLabel) - : Stmt(ImplicitStmtClass, Loc, StmtLabel), Ty(T), None(false), - LetterSpec(Spec) {} + : Stmt(ImplicitStmtClass, Loc, StmtLabel), Ty(T), LetterSpec(Spec), + None(false) {} ImplicitStmt *ImplicitStmt::Create(ASTContext &C, SourceLocation Loc, Expr *StmtLabel) { @@ -303,8 +303,8 @@ EquivalenceSet *EquivalenceSet::Create(ASTContext &C, ArrayRef<Object> Objects) //===----------------------------------------------------------------------===// CommonBlockSet::CommonBlockSet(CommonBlockDecl *CBDecl) - : StorageSet(CommonBlockSetClass), Decl(CBDecl), - ObjectCount(0) { } + : StorageSet(CommonBlockSetClass), ObjectCount(0), + Decl(CBDecl) { } CommonBlockSet *CommonBlockSet::Create(ASTContext &C, CommonBlockDecl *CBDecl) { return new(C) CommonBlockSet(CBDecl); @@ -531,7 +531,7 @@ DoWhileStmt *DoWhileStmt::Create(ASTContext &C, SourceLocation Loc, //===----------------------------------------------------------------------===// CycleStmt::CycleStmt(SourceLocation Loc, Expr *StmtLabel, Stmt *loop, ConstructName loopName) - : Stmt(CycleStmtClass, Loc, StmtLabel), Loop(loop), LoopName(loopName) {} + : Stmt(CycleStmtClass, Loc, StmtLabel), LoopName(loopName), Loop(loop) {} CycleStmt *CycleStmt::Create(ASTContext &C, SourceLocation Loc, Stmt *Loop, Expr *StmtLabel, ConstructName LoopName) { @@ -557,7 +557,7 @@ ExitStmt *ExitStmt::Create(ASTContext &C, SourceLocation Loc, Stmt *Loop, SelectCaseStmt::SelectCaseStmt(SourceLocation Loc, Expr *Operand, Expr *StmtLabel, ConstructName Name) : CFBlockStmt(SelectCaseStmtClass, Loc, StmtLabel, Name), - E(Operand), FirstCase(nullptr), DefaultCase(nullptr) {} + FirstCase(nullptr), DefaultCase(nullptr), E(Operand) {} SelectCaseStmt *SelectCaseStmt::Create(ASTContext &C, SourceLocation Loc, Expr *Operand, Expr *StmtLabel, diff --git a/lib/Frontend/TextDiagnosticPrinter.cpp b/lib/Frontend/TextDiagnosticPrinter.cpp index 51943aa8d2..8caaa90981 100644 --- a/lib/Frontend/TextDiagnosticPrinter.cpp +++ b/lib/Frontend/TextDiagnosticPrinter.cpp @@ -22,19 +22,20 @@ namespace flang { -static const enum llvm::raw_ostream::Colors noteColor = - llvm::raw_ostream::BLACK; -static const enum llvm::raw_ostream::Colors fixitColor = - llvm::raw_ostream::GREEN; -static const enum llvm::raw_ostream::Colors caretColor = - llvm::raw_ostream::GREEN; -static const enum llvm::raw_ostream::Colors warningColor = - llvm::raw_ostream::MAGENTA; -static const enum llvm::raw_ostream::Colors errorColor = llvm::raw_ostream::RED; -static const enum llvm::raw_ostream::Colors fatalColor = llvm::raw_ostream::RED; -// Used for changing only the bold attribute. -static const enum llvm::raw_ostream::Colors savedColor = - llvm::raw_ostream::SAVEDCOLOR; +// These declarations are not currently used and will provoke warnings +//static const enum llvm::raw_ostream::Colors noteColor = +// llvm::raw_ostream::BLACK; +//static const enum llvm::raw_ostream::Colors fixitColor = +// llvm::raw_ostream::GREEN; +//static const enum llvm::raw_ostream::Colors caretColor = +// llvm::raw_ostream::GREEN; +//static const enum llvm::raw_ostream::Colors warningColor = +// llvm::raw_ostream::MAGENTA; +//static const enum llvm::raw_ostream::Colors errorColor = llvm::raw_ostream::RED; +//static const enum llvm::raw_ostream::Colors fatalColor = llvm::raw_ostream::RED; +//// Used for changing only the bold attribute. +//static const enum llvm::raw_ostream::Colors savedColor = +// llvm::raw_ostream::SAVEDCOLOR; /// \brief Number of spaces to indent when word-wrapping. const unsigned WordWrapIndentation = 6; |