blob: 7600466484c8efd443583e235c2d4bb7107e2573 [file] [log] [blame]
// 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
namespace foo {
inline namespace inline1 {
struct MyStruct final {
int value;
};
inline int GetStructValue1(const foo::MyStruct& s) { return s.value; }
inline int GetStructValue2(const foo::inline1::MyStruct& s) { return s.value; }
} // namespace inline1
// 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"
namespace inline1 {
inline int GetStructValue3(const foo::MyStruct& s) { return s.value; }
inline int GetStructValue4(const foo::inline1::MyStruct& s) { return s.value; }
} // namespace inline1
#pragma clang diagnostic pop
} // namespace foo
#endif // THIRD_PARTY_CRUBIT_RS_BINDINGS_FROM_CC_TEST_NAMESPACE_INLINE_INLINE_H_