112a9d9c8Sopenharmony_ci// bindgen-flags: --generate-inline-functions -- -std=c++11
212a9d9c8Sopenharmony_ci
312a9d9c8Sopenharmony_ciclass A {
412a9d9c8Sopenharmony_cipublic:
512a9d9c8Sopenharmony_ci      // Deleted function should not get a binding.
612a9d9c8Sopenharmony_ci      void deleted() = delete;
712a9d9c8Sopenharmony_ci
812a9d9c8Sopenharmony_ci      // Inline functions should get bindings, whether they are defined inline
912a9d9c8Sopenharmony_ci      // (in the class) or out of line.
1012a9d9c8Sopenharmony_ci      inline void inline_definition() {}
1112a9d9c8Sopenharmony_ci      inline void out_of_line_definition();
1212a9d9c8Sopenharmony_ci
1312a9d9c8Sopenharmony_ci      // TODO: This is an edge case that we get wrong: An inline function
1412a9d9c8Sopenharmony_ci      // without a definition in the same translation unit should still get a
1512a9d9c8Sopenharmony_ci      // binding. We currently can't distinguish this case from a deleted member
1612a9d9c8Sopenharmony_ci      // function because libclang doesn't provide a direct way to query for
1712a9d9c8Sopenharmony_ci      // deleted member functions. This seems acceptable, however, as an inline
1812a9d9c8Sopenharmony_ci      // function without a definition in the same translation unit is unlikely
1912a9d9c8Sopenharmony_ci      // to be useful in practice.
2012a9d9c8Sopenharmony_ci      inline void inline_without_definition();
2112a9d9c8Sopenharmony_ci};
2212a9d9c8Sopenharmony_ci
2312a9d9c8Sopenharmony_civoid A::out_of_line_definition() {}
2412a9d9c8Sopenharmony_ci
2512a9d9c8Sopenharmony_ciclass B {
2612a9d9c8Sopenharmony_cipublic:
2712a9d9c8Sopenharmony_ci     // Deleted copy constructor should not get a binding.
2812a9d9c8Sopenharmony_ci     B(B&) = delete;
2912a9d9c8Sopenharmony_ci};
3012a9d9c8Sopenharmony_ci
3112a9d9c8Sopenharmony_ciclass C {
3212a9d9c8Sopenharmony_cipublic:
3312a9d9c8Sopenharmony_ci     // Defaulted copy constructor should get a binding.
3412a9d9c8Sopenharmony_ci     C(C&) = default;
3512a9d9c8Sopenharmony_ci};