| // Part of the Crubit project, under the Apache License v2.0 with LLVM |
| // Exceptions. See /LICENSE for license information. |
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| #ifndef THIRD_PARTY_CRUBIT_RS_BINDINGS_FROM_CC_TEST_NAMESPACE_INLINE_INLINE_H_ |
| #define THIRD_PARTY_CRUBIT_RS_BINDINGS_FROM_CC_TEST_NAMESPACE_INLINE_INLINE_H_ |
| #pragma clang lifetime_elision |
| inline namespace inline1 { |
| inline int GetStructValue1(const foo::MyStruct& s) { return s.value; } |
| inline int GetStructValue2(const foo::inline1::MyStruct& s) { return s.value; } |
| // Test coverage for the case where additional declarations appear in `inline1`, |
| // but without `inline namespace ...`, just with `namespace inline1`. |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Winline-namespace-reopened-noninline" |
| inline int GetStructValue3(const foo::MyStruct& s) { return s.value; } |
| inline int GetStructValue4(const foo::inline1::MyStruct& s) { return s.value; } |
| #pragma clang diagnostic pop |
| #endif // THIRD_PARTY_CRUBIT_RS_BINDINGS_FROM_CC_TEST_NAMESPACE_INLINE_INLINE_H_ |