[Objective-C API] WIgnore clang documentation warnings from C/C++ header usage. (#9057)

This commit is contained in:
Edward Chen 2021-09-14 13:03:48 -07:00 committed by GitHub
parent 3ec3e9f705
commit 32366fea02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 38 additions and 21 deletions

28
objectivec/src/cxx_api.h Normal file
View file

@ -0,0 +1,28 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// wrapper for ORT C/C++ API headers
#if defined(__clang__)
#pragma clang diagnostic push
// ignore clang documentation-related warnings
// instead, we will rely on Doxygen warnings for the C/C++ API headers
#pragma clang diagnostic ignored "-Wdocumentation"
#endif // defined(__clang__)
#include "onnxruntime_c_api.h"
#include "onnxruntime_cxx_api.h"
#if __has_include("coreml_provider_factory.h")
#define ORT_OBJC_API_COREML_EP_AVAILABLE 1
#else
#define ORT_OBJC_API_COREML_EP_AVAILABLE 0
#endif
#if ORT_OBJC_API_COREML_EP_AVAILABLE
#include "coreml_provider_factory.h"
#endif
#if defined(__clang__)
#pragma clang diagnostic pop
#endif // defined(__clang__)

View file

@ -5,7 +5,7 @@
#include <exception>
#include "onnxruntime_cxx_api.h"
#import "src/cxx_api.h"
NS_ASSUME_NONNULL_BEGIN

View file

@ -3,16 +3,7 @@
#import "ort_coreml_execution_provider.h"
#if __has_include("coreml_provider_factory.h")
#define ORT_OBJC_API_COREML_EP_AVAILABLE 1
#else
#define ORT_OBJC_API_COREML_EP_AVAILABLE 0
#endif
#if ORT_OBJC_API_COREML_EP_AVAILABLE
#include "coreml_provider_factory.h"
#endif
#import "src/cxx_api.h"
#import "src/error_utils.h"
#import "src/ort_session_internal.h"

View file

@ -5,7 +5,7 @@
#include <algorithm>
#include "onnxruntime_cxx_api.h"
#import "src/cxx_api.h"
namespace {

View file

@ -3,7 +3,7 @@
#import "ort_enums.h"
#include "onnxruntime_c_api.h"
#import "src/cxx_api.h"
OrtLoggingLevel PublicToCAPILoggingLevel(ORTLoggingLevel logging_level);

View file

@ -5,7 +5,7 @@
#include <optional>
#include "onnxruntime_cxx_api.h"
#import "src/cxx_api.h"
#import "src/error_utils.h"
#import "src/ort_enums_internal.h"

View file

@ -3,7 +3,7 @@
#import "ort_env.h"
#include "onnxruntime_cxx_api.h"
#import "src/cxx_api.h"
NS_ASSUME_NONNULL_BEGIN

View file

@ -6,8 +6,7 @@
#include <optional>
#include <vector>
#include "onnxruntime_cxx_api.h"
#import "src/cxx_api.h"
#import "src/error_utils.h"
#import "src/ort_enums_internal.h"
#import "src/ort_env_internal.h"

View file

@ -3,7 +3,7 @@
#import "ort_session.h"
#include "onnxruntime_cxx_api.h"
#import "src/cxx_api.h"
NS_ASSUME_NONNULL_BEGIN

View file

@ -7,8 +7,7 @@
#include "safeint/SafeInt.hpp"
#include "onnxruntime_cxx_api.h"
#import "src/cxx_api.h"
#import "src/error_utils.h"
#import "src/ort_enums_internal.h"

View file

@ -3,7 +3,7 @@
#import "ort_value.h"
#include "onnxruntime_cxx_api.h"
#import "src/cxx_api.h"
NS_ASSUME_NONNULL_BEGIN