Skip to content

Commit

Permalink
fix warnings (llvm#1093)
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Bearman <ianb@microsoft.com>

Co-authored-by: Stella Stamenova <stilis@microsoft.com>
Co-authored-by: Alexandre Eichenberger <alexe@us.ibm.com>
  • Loading branch information
3 people authored Jan 20, 2022
1 parent aa3c142 commit a27e363
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 21 deletions.
3 changes: 2 additions & 1 deletion src/Builder/FrontendDialectHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,11 @@ mlir::Type convertONNXTypeToMLIRType(
case onnx::TensorProto_DataType::TensorProto_DataType_COMPLEX64:
case onnx::TensorProto_DataType::TensorProto_DataType_COMPLEX128:
case onnx::TensorProto_DataType::TensorProto_DataType_UNDEFINED:
default:
assert(false && "Unsupported data type encountered.");
return nullptr;
}

llvm_unreachable("Unsupported data type encountered.");
}

} // namespace onnx_mlir
2 changes: 1 addition & 1 deletion src/Dialect/ONNX/IndexExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ IndexExprScope::IndexExprScope(OpBuilder *rewriter, Location loc)
}

IndexExprScope::IndexExprScope(DialectBuilder &db)
: IndexExprScope(&db.getBuilder(), db.getLoc()){};
: IndexExprScope(&db.getBuilder(), db.getLoc()) {}

// Nested scopes.
IndexExprScope::IndexExprScope(
Expand Down
2 changes: 1 addition & 1 deletion src/Dialect/ONNX/IndexExprDetail.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ bool IndexExprImpl::hasValue() const {
IndexExprScope &IndexExprImpl::getScope() const {
assert(hasScope());
return *scope;
};
}

IndexExprScope *IndexExprImpl::getScopePtr() const {
assert(scope && "expected to have scope");
Expand Down
34 changes: 17 additions & 17 deletions src/Dialect/ONNX/ONNXOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4672,23 +4672,23 @@ LogicalResult ONNXZipMapOp::inferShapes(
return emitError(NOT_IMPLEMENTED_MESSAGE); \
}

NOT_IMPLEMENTED_INFERSHAPE(ONNXAdagradOp);
NOT_IMPLEMENTED_INFERSHAPE(ONNXAdamOp);
NOT_IMPLEMENTED_INFERSHAPE(ONNXCeluOp);
NOT_IMPLEMENTED_INFERSHAPE(ONNXEinsumOp);
NOT_IMPLEMENTED_INFERSHAPE(ONNXGradientOp);
NOT_IMPLEMENTED_INFERSHAPE(ONNXMomentumOp);
NOT_IMPLEMENTED_INFERSHAPE(ONNXNegativeLogLikelihoodLossOp);
NOT_IMPLEMENTED_INFERSHAPE(ONNXSoftmaxCrossEntropyLossOp);
NOT_IMPLEMENTED_INFERSHAPE(ONNXUpsampleV9Op);
NOT_IMPLEMENTED_INFERSHAPE(ONNXUpsampleV7Op);
NOT_IMPLEMENTED_INFERSHAPE(ONNXPadV2Op);
NOT_IMPLEMENTED_INFERSHAPE(ONNXPadV11Op);
NOT_IMPLEMENTED_INFERSHAPE(ONNXResizeV11Op);
NOT_IMPLEMENTED_INFERSHAPE(ONNXResizeV10Op);
NOT_IMPLEMENTED_INFERSHAPE(ONNXClipV6Op);
NOT_IMPLEMENTED_INFERSHAPE(ONNXClipV11Op);
NOT_IMPLEMENTED_INFERSHAPE(ONNXClipV12Op);
NOT_IMPLEMENTED_INFERSHAPE(ONNXAdagradOp)
NOT_IMPLEMENTED_INFERSHAPE(ONNXAdamOp)
NOT_IMPLEMENTED_INFERSHAPE(ONNXCeluOp)
NOT_IMPLEMENTED_INFERSHAPE(ONNXEinsumOp)
NOT_IMPLEMENTED_INFERSHAPE(ONNXGradientOp)
NOT_IMPLEMENTED_INFERSHAPE(ONNXMomentumOp)
NOT_IMPLEMENTED_INFERSHAPE(ONNXNegativeLogLikelihoodLossOp)
NOT_IMPLEMENTED_INFERSHAPE(ONNXSoftmaxCrossEntropyLossOp)
NOT_IMPLEMENTED_INFERSHAPE(ONNXUpsampleV9Op)
NOT_IMPLEMENTED_INFERSHAPE(ONNXUpsampleV7Op)
NOT_IMPLEMENTED_INFERSHAPE(ONNXPadV2Op)
NOT_IMPLEMENTED_INFERSHAPE(ONNXPadV11Op)
NOT_IMPLEMENTED_INFERSHAPE(ONNXResizeV11Op)
NOT_IMPLEMENTED_INFERSHAPE(ONNXResizeV10Op)
NOT_IMPLEMENTED_INFERSHAPE(ONNXClipV6Op)
NOT_IMPLEMENTED_INFERSHAPE(ONNXClipV11Op)
NOT_IMPLEMENTED_INFERSHAPE(ONNXClipV12Op)

//===----------------------------------------------------------------------===//
// Loop
Expand Down
3 changes: 2 additions & 1 deletion src/Support/SuppressWarnings.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
_Pragma("clang diagnostic ignored \"-Wcast-qual\"") \
_Pragma("clang diagnostic ignored \"-Wstring-conversion\"") \
_Pragma("clang diagnostic ignored \"-Wmissing-field-initializers\"") \
_Pragma("clang diagnostic ignored \"-Wsuggest-override\"")
_Pragma("clang diagnostic ignored \"-Wsuggest-override\"") \
_Pragma("clang diagnostic ignored \"-Wc++98-compat-extra-semi\"")

#define SUPPRESS_WARNINGS_POP _Pragma("clang diagnostic pop")
#elif defined(__GNUC__)
Expand Down

0 comments on commit a27e363

Please sign in to comment.