mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This is the default behavior. You can disable this by specifying the -clang-header-expose-decls= flag explicitly when generating the header
13 lines
439 B
C++
13 lines
439 B
C++
// RUN: %empty-directory(%t)
|
|
|
|
// RUN: %target-swift-frontend %S/swift-class-in-cxx.swift -typecheck -module-name Class -clang-header-expose-decls=all-public -emit-clang-header-path %t/class.h
|
|
|
|
// RUN: not %target-interop-build-clangxx -c %s -I %t -o %t/swift-class-execution.o
|
|
|
|
#include "class.h"
|
|
|
|
void test(void * _Nonnull p) {
|
|
// Prohibited to construct class reference directly from opaque pointer.
|
|
Class::ClassWithIntField x(p);
|
|
}
|