[flang][NFC] Address warnings from Windows build

An LLVM Flang build bot for Windows recently failed with a
bunch of warning messages.  None were from recent changes to
the Fortran compiler; I suspect that a newer (or maybe older)
version of MSVC was being used, or perhaps a different set of
compiler options were temporarily applied to the build, since
the buildbot status went back to green shortly thereafter.

Most of the warnings looked bogus to me, but some are legitimate
concerns and we might as well clean them up.  This patch does so.

Differential Revision: https://reviews.llvm.org/D111677
This commit is contained in:
peter klausler 2021-10-12 13:35:28 -07:00
parent ca0036df7d
commit 49142dd4a5
4 changed files with 7 additions and 10 deletions

View File

@ -252,9 +252,6 @@ public:
: ProcedureRef{std::move(p), std::move(a)} {}
std::optional<DynamicType> GetType() const { return proc_.GetType(); }
std::optional<Constant<Result>> Fold(FoldingContext &); // for intrinsics
};
FOR_EACH_SPECIFIC_TYPE(extern template class FunctionRef, )
} // namespace Fortran::evaluate
#endif // FORTRAN_EVALUATE_CALL_H_

View File

@ -619,7 +619,8 @@ FOR_EACH_CHARACTER_KIND(extern template class Expr, )
// There are no relations between LOGICAL values.
template <typename T>
struct Relational : public Operation<Relational<T>, LogicalResult, T, T> {
class Relational : public Operation<Relational<T>, LogicalResult, T, T> {
public:
using Result = LogicalResult;
using Base = Operation<Relational, LogicalResult, T, T>;
using Operand = typename Base::template Operand<0>;
@ -651,10 +652,10 @@ public:
common::MapTemplate<Relational, DirectlyComparableTypes> u;
};
FOR_EACH_INTEGER_KIND(extern template struct Relational, )
FOR_EACH_REAL_KIND(extern template struct Relational, )
FOR_EACH_CHARACTER_KIND(extern template struct Relational, )
extern template struct Relational<SomeType>;
FOR_EACH_INTEGER_KIND(extern template class Relational, )
FOR_EACH_REAL_KIND(extern template class Relational, )
FOR_EACH_CHARACTER_KIND(extern template class Relational, )
extern template class Relational<SomeType>;
// Logical expressions of a kind bigger than LogicalResult
// do not include Relational<> operations as possibilities,

View File

@ -683,7 +683,7 @@ private:
const Symbol *GetParentComponent(const Scope * = nullptr) const;
template <std::size_t> friend class Symbols;
template <class, std::size_t> friend struct std::array;
template <class, std::size_t> friend class std::array;
};
llvm::raw_ostream &operator<<(llvm::raw_ostream &, Symbol::Flag);

View File

@ -220,5 +220,4 @@ ProcedureRef::~ProcedureRef() {}
void ProcedureRef::Deleter(ProcedureRef *p) { delete p; }
FOR_EACH_SPECIFIC_TYPE(template class FunctionRef, )
} // namespace Fortran::evaluate