diff --git a/cel-c/config.h b/cel-c/config.h index c091c1c..84f5a7f 100644 --- a/cel-c/config.h +++ b/cel-c/config.h @@ -26,8 +26,6 @@ #include // IWYU pragma: keep #include // IWYU pragma: keep #include // IWYU pragma: keep -#include // IWYU pragma: keep -#include // IWYU pragma: keep #ifdef __has_include #if __has_include() #include // IWYU pragma: keep @@ -84,119 +82,6 @@ CEL_STATIC_ASSERT(sizeof(unsigned char) == 1); #define CEL_END_DECLS #endif -// cel_typeof/cel_typeof_unqual -// -// Expands to `typeof` and `typeof_unqual` equivalents, respectively. In C++ -// mode we remove references which do not exist in C. We also map `char8_t`, -// `char16_t`, `char32_t`, and `wchar_t` to their respective C types which are -// aliases of other builtin types instead of distinct types. Additionally we map -// enums to their underlying type. -#ifdef __cplusplus -template -struct _cel_typeof { - using type = T; -}; -template -struct _cel_typeof::value && !std::is_const::value && - !std::is_volatile::value)>::type> { - using type = - typename _cel_typeof::type>::type; -}; -template -struct _cel_typeof { - using type = typename _cel_typeof::type; -}; -template -struct _cel_typeof { - using type = typename _cel_typeof::type; -}; -template -struct _cel_typeof { - using type = typename _cel_typeof::type*; -}; -template -struct _cel_typeof { - using type = typename _cel_typeof::type[]; -}; -template -struct _cel_typeof { - using type = const typename _cel_typeof::type[]; -}; -template -struct _cel_typeof { - using type = volatile typename _cel_typeof::type[]; -}; -template -struct _cel_typeof { - using type = const volatile typename _cel_typeof::type[]; -}; -template -struct _cel_typeof { - using type = typename _cel_typeof::type[N]; -}; -template -struct _cel_typeof { - using type = const typename _cel_typeof::type[N]; -}; -template -struct _cel_typeof { - using type = volatile typename _cel_typeof::type[N]; -}; -template -struct _cel_typeof { - using type = const volatile typename _cel_typeof::type[N]; -}; -template -struct _cel_typeof { - using type = const typename _cel_typeof::type; -}; -template -struct _cel_typeof { - using type = volatile typename _cel_typeof::type; -}; -template -struct _cel_typeof { - using type = const volatile typename _cel_typeof::type; -}; -template <> -struct _cel_typeof { -#if defined(__GNUC__) || defined(__clang__) - using type = __WCHAR_TYPE__; -#elif defined(_MSC_VER) - using type = unsigned short; // NOLINT(runtime/int) -#else -#error Unexpected compiler. -#endif -}; -template <> -struct _cel_typeof { - using type = uint_least16_t; -}; -template <> -struct _cel_typeof { - using type = uint_least32_t; -}; -#if defined(__cpp_char8_t) && __cpp_char8_t >= 201811L -template <> -struct _cel_typeof { - using type = unsigned char; -}; -#endif -template -struct _cel_typeof_unqual { - using type = typename std::remove_cv::type>::type; -}; -#define cel_typeof(x) typename ::_cel_typeof::type -#define cel_typeof_unqual(x) typename ::_cel_typeof_unqual::type -#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L -#define cel_typeof(x) typeof(x) -#define cel_typeof_unqual(x) typeof_unqual(x) -#else -#define cel_typeof(x) __typeof__(x) -#define cel_typeof_unqual(x) __typeof_unqual__(x) -#endif - #ifdef cel_nullptr #error cel_nullptr cannot be directly set #endif @@ -211,32 +96,6 @@ struct _cel_typeof_unqual { #define cel_nullptr NULL #endif -#ifdef cel_arraysize -#error cel_arraysize cannot be directly set -#endif - -// cel_arraysize -// -// Expands to the number of elements in the array literal. -#ifdef __cplusplus -template -auto _cel_arraysize(const T (&array)[N]) -> char (&)[N]; -#define cel_arraysize(x) (sizeof(::_cel_arraysize((x)))) -#else -#define cel_arraysize(x) (sizeof((x)) / sizeof((x)[0])) -#endif - -#ifdef cel_containerof -#error cel_containerof cannot be directly set -#endif - -// cel_containerof -// -// Behaves the same as `container_of` in the Linux kernel. -#define cel_containerof(ptr, type, member) \ - ((CEL_NULLABILITY_UNKNOWN(type*))(((CEL_NULLABILITY_UNKNOWN(char*))(ptr)) - \ - offsetof(type, member))) - #ifdef CEL_HAVE_BUILTIN #error CEL_HAVE_BUILTIN cannot be directly set #endif @@ -702,44 +561,19 @@ auto _cel_arraysize(const T (&array)[N]) -> char (&)[N]; #define cel_kMaxAlign ((size_t)8) -#ifdef _CEL_HAVE_TYPES_COMPATIBLE -#error _CEL_HAVE_TYPES_COMPATIBLE cannot be directly set -#endif - -#ifdef _CEL_TYPES_COMPATIBLE -#error _CEL_TYPES_COMPATIBLE cannot be directly set +#ifdef cel_arraysize +#error cel_arraysize cannot be directly set #endif +// cel_arraysize +// +// Expands to the number of elements in the array literal. #ifdef __cplusplus -#define _CEL_HAVE_TYPES_COMPATIBLE 1 -template -struct _cel_types_compatible : std::false_type {}; -template -struct _cel_types_compatible : std::true_type {}; -template -struct _cel_types_compatible : std::true_type {}; -template -struct _cel_types_compatible : _cel_types_compatible {}; -template -struct _cel_types_compatible : _cel_types_compatible {}; -#define _CEL_TYPES_COMPATIBLE(type1, type2) \ - ::_cel_types_compatible::type, \ - typename ::_cel_typeof_unqual::type>::value -#elif (defined(__GNUC__) && !defined(__clang__)) || \ - CEL_HAVE_BUILTIN(__builtin_types_compatible_p) -#define _CEL_HAVE_TYPES_COMPATIBLE 1 -#define _CEL_TYPES_COMPATIBLE(type1, type2) \ - __builtin_types_compatible_p(type1, type2) -#else -#define _CEL_TYPES_COMPATIBLE(type1, type2) true -#endif - -#ifdef _CEL_HAVE_STMT_EXPRS -#define _CEL_HAVE_STMT_EXPRS cannot be directly set -#endif - -#if defined(__GNUC__) || defined(__clang__) -#define _CEL_HAVE_STMT_EXPRS 1 +template +auto _cel_arraysize(const T (&array)[N]) -> char (&)[N]; +#define cel_arraysize(x) (sizeof(::_cel_arraysize((x)))) +#else +#define cel_arraysize(x) (sizeof((x)) / sizeof((x)[0])) #endif // We require the standards conforming Microsoft C++ preprocessor. diff --git a/cel-c/internal/BUILD b/cel-c/internal/BUILD index 839e880..c35cb69 100644 --- a/cel-c/internal/BUILD +++ b/cel-c/internal/BUILD @@ -25,8 +25,8 @@ cc_library( hdrs = ["align.h"], deps = [ ":bit", + ":config", "//cel-c:assert", - "//cel-c:config", ], ) @@ -35,7 +35,7 @@ cc_test( srcs = ["align_test.cc"], deps = [ ":align", - "//cel-c:config", + ":config", "@googletest//:gtest_main", ], ) @@ -51,8 +51,8 @@ cc_library( srcs = ["any.cc"], hdrs = ["any.h"], deps = [ + ":config", "//cel-c:assert", - "//cel-c:config", "//cel-c:status", "//cel-c:status_code", "//cel-c:string_view", @@ -70,9 +70,9 @@ cc_test( srcs = ["any_test.cc"], deps = [ ":any", + ":config", "//cel-c:alloc", "//cel-c:arena", - "//cel-c:config", "//cel-c:status", "//cel-c:status_code", "//cel-c:string_view", @@ -98,8 +98,8 @@ cc_library( name = "arc", hdrs = ["arc.h"], deps = [ + ":config", "//cel-c:assert", - "//cel-c:config", ], ) @@ -108,7 +108,7 @@ cc_test( srcs = ["arc_test.cc"], deps = [ ":arc", - "//cel-c:config", + ":config", "@googletest//:gtest_main", ], ) @@ -117,9 +117,9 @@ cc_library( name = "arena_array", hdrs = ["arena_array.h"], deps = [ + ":config", ":generic_array", "//cel-c:arena", - "//cel-c:config", ], ) @@ -128,9 +128,9 @@ cc_test( srcs = ["arena_array_test.cc"], deps = [ ":arena_array", + ":config", "//cel-c:alloc", "//cel-c:arena", - "//cel-c:config", "@abseil-cpp//absl/log:die_if_null", "@googletest//:gtest_main", ], @@ -140,9 +140,9 @@ cc_library( name = "arena_deque", hdrs = ["arena_deque.h"], deps = [ + ":config", ":generic_deque", "//cel-c:arena", - "//cel-c:config", ], ) @@ -151,9 +151,9 @@ cc_test( srcs = ["arena_deque_test.cc"], deps = [ ":arena_deque", + ":config", "//cel-c:alloc", "//cel-c:arena", - "//cel-c:config", "@abseil-cpp//absl/log:die_if_null", "@googletest//:gtest_main", ], @@ -163,9 +163,9 @@ cc_library( name = "arena_flat_hash_map", hdrs = ["arena_flat_hash_map.h"], deps = [ + ":config", ":generic_flat_hash", "//cel-c:arena", - "//cel-c:config", ], ) @@ -174,9 +174,9 @@ cc_test( srcs = ["arena_flat_hash_map_test.cc"], deps = [ ":arena_flat_hash_map", + ":config", "//cel-c:alloc", "//cel-c:arena", - "//cel-c:config", "//cel-c:hash", "@abseil-cpp//absl/log:die_if_null", "@googletest//:gtest_main", @@ -187,9 +187,9 @@ cc_library( name = "arena_string", hdrs = ["arena_string.h"], deps = [ + ":config", ":generic_string", "//cel-c:arena", - "//cel-c:config", "//cel-c:cstring_view", "//cel-c:string_view", ], @@ -200,10 +200,10 @@ cc_test( srcs = ["arena_string_test.cc"], deps = [ ":arena_string", + ":config", ":generic_string", "//cel-c:alloc", "//cel-c:arena", - "//cel-c:config", "//cel-c:cstring_view", "//cel-c:string_view", "@abseil-cpp//absl/log:die_if_null", @@ -215,9 +215,9 @@ cc_library( name = "array", hdrs = ["array.h"], deps = [ + ":config", ":generic_array", "//cel-c:alloc", - "//cel-c:config", ], ) @@ -226,8 +226,8 @@ cc_test( srcs = ["array_test.cc"], deps = [ ":array", + ":config", "//cel-c:alloc", - "//cel-c:config", "@googletest//:gtest_main", ], ) @@ -244,8 +244,8 @@ cc_library( name = "binary_search", hdrs = ["binary_search.h"], deps = [ + ":config", "//cel-c:assert", - "//cel-c:config", ], ) @@ -263,7 +263,7 @@ cc_library( srcs = ["bit.cc"], hdrs = ["bit.h"], deps = [ - "//cel-c:config", + ":config", ], ) @@ -282,8 +282,8 @@ cc_library( hdrs = ["bitset.h"], deps = [ ":bit", + ":config", "//cel-c:assert", - "//cel-c:config", ], ) @@ -305,7 +305,6 @@ cc_library( ":config", ":ctype", "//cel-c:assert", - "//cel-c:config", ], ) @@ -322,7 +321,7 @@ cc_library( name = "ckdint", hdrs = ["ckdint.h"], deps = [ - "//cel-c:config", + ":config", ], ) @@ -339,7 +338,7 @@ cc_library( name = "compare", hdrs = ["compare.h"], deps = [ - "//cel-c:config", + ":config", ], ) @@ -355,7 +354,7 @@ cc_test( name = "config_test", srcs = ["config_test.cc"], deps = [ - "//cel-c:config", + ":config", "@googletest//:gtest_main", ], ) @@ -364,10 +363,10 @@ cc_library( name = "container", hdrs = ["container.h"], deps = [ + ":config", ":string", "//cel-c:alloc", "//cel-c:assert", - "//cel-c:config", "//cel-c:string_view", ], ) @@ -390,7 +389,7 @@ cc_library( srcs = ["ctype.cc"], hdrs = ["ctype.h"], deps = [ - "//cel-c:config", + ":config", ], ) @@ -407,9 +406,9 @@ cc_library( name = "deque", hdrs = ["deque.h"], deps = [ + ":config", ":generic_deque", "//cel-c:alloc", - "//cel-c:config", ], ) @@ -417,9 +416,9 @@ cc_test( name = "deque_test", srcs = ["deque_test.cc"], deps = [ + ":config", ":deque", "//cel-c:alloc", - "//cel-c:config", "@googletest//:gtest_main", ], ) @@ -447,9 +446,9 @@ cc_library( name = "flat_hash_map", hdrs = ["flat_hash_map.h"], deps = [ + ":config", ":generic_flat_hash", "//cel-c:alloc", - "//cel-c:config", ], ) @@ -457,9 +456,9 @@ cc_test( name = "flat_hash_map_test", srcs = ["flat_hash_map_test.cc"], deps = [ + ":config", ":flat_hash_map", "//cel-c:alloc", - "//cel-c:config", "//cel-c:hash", "@googletest//:gtest_main", ], @@ -469,9 +468,9 @@ cc_library( name = "flat_hash_set", hdrs = ["flat_hash_set.h"], deps = [ + ":config", ":generic_flat_hash", "//cel-c:alloc", - "//cel-c:config", ], ) @@ -479,9 +478,9 @@ cc_test( name = "flat_hash_set_test", srcs = ["flat_hash_set_test.cc"], deps = [ + ":config", ":flat_hash_set", "//cel-c:alloc", - "//cel-c:config", "//cel-c:hash", "@googletest//:gtest_main", ], @@ -508,10 +507,10 @@ cc_library( deps = [ ":align", ":asan", + ":config", "//cel-c:alloc", "//cel-c:arena", "//cel-c:assert", - "//cel-c:config", ], ) @@ -523,10 +522,10 @@ cc_library( ":align", ":bit", ":bitset", + ":config", "//cel-c:alloc", "//cel-c:arena", "//cel-c:assert", - "//cel-c:config", ], ) @@ -537,10 +536,10 @@ cc_library( deps = [ ":asan", ":ckdint", + ":config", "//cel-c:alloc", "//cel-c:arena", "//cel-c:assert", - "//cel-c:config", "//cel-c:cstring_view", "//cel-c:string_view", ], @@ -572,8 +571,8 @@ cc_test( srcs = ["malloc_test.cc"], deps = [ ":align", + ":config", ":malloc", - "//cel-c:config", "@googletest//:gtest_main", ], ) @@ -604,12 +603,12 @@ cc_library( hdrs = ["message_equality.h"], deps = [ ":any", + ":config", ":number", ":setjmp", "//cel-c:alloc", "//cel-c:arena", "//cel-c:assert", - "//cel-c:config", "//cel-c:string_view", "//cel-c:well_known_types", "@protobuf//upb/base", @@ -624,10 +623,10 @@ cc_test( name = "message_equality_test", srcs = ["message_equality_test.cc"], deps = [ + ":config", ":message_equality", "//cel-c:alloc", "//cel-c:arena", - "//cel-c:config", "//cel-c:status", "//cel-c:well_known_types", "@abseil-cpp//absl/base", @@ -665,8 +664,8 @@ cc_library( hdrs = ["number.h"], deps = [ ":compare", + ":config", "//cel-c:assert", - "//cel-c:config", ], ) @@ -684,8 +683,8 @@ cc_library( name = "rc", hdrs = ["rc.h"], deps = [ + ":config", "//cel-c:assert", - "//cel-c:config", ], ) @@ -693,8 +692,8 @@ cc_test( name = "rc_test", srcs = ["rc_test.cc"], deps = [ + ":config", ":rc", - "//cel-c:config", "@googletest//:gtest_main", ], ) @@ -705,9 +704,9 @@ cc_library( hdrs = ["regexp.h"], deps = [ ":alloca", + ":config", ":malloc", "//cel-c:assert", - "//cel-c:config", "//cel-c:status", "//cel-c:status_code", "//cel-c:string_view", @@ -721,8 +720,8 @@ cc_test( name = "regexp_test", srcs = ["regexp_test.cc"], deps = [ + ":config", ":regexp", - "//cel-c:config", "//cel-c:status", "//cel-c:status_code", "//cel-c:string_view", @@ -734,11 +733,11 @@ cc_test( name = "runtime_test", srcs = ["runtime_test.cc"], deps = [ + ":config", ":value", "//cel-c:alloc", "//cel-c:arena", "//cel-c:ast", - "//cel-c:config", "//cel-c:duration", "//cel-c:error", "//cel-c:error_code", @@ -773,7 +772,7 @@ cc_library( name = "setjmp", hdrs = ["setjmp.h"], deps = [ - "//cel-c:config", + ":config", ], ) @@ -791,8 +790,8 @@ cc_library( hdrs = ["sort.h"], deps = [ ":alloca", + ":config", "//cel-c:assert", - "//cel-c:config", ], ) @@ -814,8 +813,8 @@ cc_library( hdrs = ["stable_sort.h"], deps = [ ":alloca", + ":config", "//cel-c:assert", - "//cel-c:config", ], ) @@ -836,9 +835,9 @@ cc_library( name = "string", hdrs = ["string.h"], deps = [ + ":config", ":generic_string", "//cel-c:alloc", - "//cel-c:config", "//cel-c:cstring_view", "//cel-c:string_view", ], @@ -848,10 +847,10 @@ cc_test( name = "string_test", srcs = ["string_test.cc"], deps = [ + ":config", ":generic_string", ":string", "//cel-c:alloc", - "//cel-c:config", "//cel-c:cstring_view", "//cel-c:string_view", "@googletest//:gtest_main", @@ -862,7 +861,7 @@ cc_test( name = "trilean_test", srcs = ["trilean_test.cc"], deps = [ - "//cel-c:config", + ":config", "//cel-c:trilean", "@googletest//:gtest_main", ], @@ -872,7 +871,7 @@ cc_library( name = "uchar", hdrs = ["uchar.h"], deps = [ - "//cel-c:config", + ":config", ], ) @@ -883,7 +882,6 @@ cc_library( ":config", ":endian", "//cel-c:assert", - "//cel-c:config", ], ) @@ -918,8 +916,8 @@ cc_library( name = "unicode", hdrs = ["unicode.h"], deps = [ + ":config", ":uchar", - "//cel-c:config", ], ) @@ -937,10 +935,10 @@ cc_library( srcs = ["utf8.cc"], hdrs = ["utf8.h"], deps = [ + ":config", ":uchar", ":unicode", "//cel-c:assert", - "//cel-c:config", "@protobuf//upb/base", ], ) @@ -990,13 +988,13 @@ cc_library( ":bit", ":bitset", ":ckdint", + ":config", ":malloc", ":message_equality", ":sort", "//cel-c:alloc", "//cel-c:arena", "//cel-c:assert", - "//cel-c:config", "//cel-c:duration", "//cel-c:error", "//cel-c:error_code", @@ -1036,9 +1034,9 @@ cc_test( "value_test.cc", ], deps = [ + ":config", ":value", ":value_testing", - "//cel-c:config", "//cel-c:duration", "//cel-c:error", "//cel-c:error_code", @@ -1063,9 +1061,9 @@ cc_library( srcs = ["value_testing.cc"], hdrs = ["value_testing.h"], deps = [ + ":config", "//cel-c:alloc", "//cel-c:arena", - "//cel-c:config", "//cel-c:duration", "//cel-c:error", "//cel-c:status", @@ -1138,9 +1136,9 @@ cc_library( srcs = ["durationconv.cc"], hdrs = ["durationconv.h"], deps = [ + ":config", "//cel-c:arena", "//cel-c:assert", - "//cel-c:config", "//cel-c:duration", "//cel-c:string_view", "//cel-c:string_view_absl", diff --git a/cel-c/internal/align.h b/cel-c/internal/align.h index 1ce3b9e..2462ead 100644 --- a/cel-c/internal/align.h +++ b/cel-c/internal/align.h @@ -24,8 +24,8 @@ #include #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/internal/bit.h" +#include "cel-c/internal/config.h" // NOLINTBEGIN(runtime/int) // NOLINTBEGIN(google-runtime-int) diff --git a/cel-c/internal/align_test.cc b/cel-c/internal/align_test.cc index 2be1267..54425d9 100644 --- a/cel-c/internal/align_test.cc +++ b/cel-c/internal/align_test.cc @@ -18,7 +18,7 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" // NOLINTBEGIN(runtime/int) // NOLINTBEGIN(google-runtime-int) diff --git a/cel-c/internal/any.cc b/cel-c/internal/any.cc index 9236562..7c62915 100644 --- a/cel-c/internal/any.cc +++ b/cel-c/internal/any.cc @@ -18,7 +18,7 @@ #include #include "cel-c/assert.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/status.h" #include "cel-c/status_code.h" #include "cel-c/string_view.h" diff --git a/cel-c/internal/any.h b/cel-c/internal/any.h index 239cc6a..2fa08bf 100644 --- a/cel-c/internal/any.h +++ b/cel-c/internal/any.h @@ -17,7 +17,7 @@ #include -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/status.h" #include "cel-c/status_code.h" #include "cel-c/well_known_types.h" diff --git a/cel-c/internal/any_test.cc b/cel-c/internal/any_test.cc index db3cf57..b7e00b3 100644 --- a/cel-c/internal/any_test.cc +++ b/cel-c/internal/any_test.cc @@ -27,7 +27,7 @@ #include "absl/log/die_if_null.h" #include "cel-c/alloc.h" #include "cel-c/arena.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/status.h" #include "cel-c/status_code.h" #include "cel-c/string_view.h" diff --git a/cel-c/internal/arc.h b/cel-c/internal/arc.h index 618bfb6..8673d35 100644 --- a/cel-c/internal/arc.h +++ b/cel-c/internal/arc.h @@ -32,7 +32,7 @@ #endif #include "cel-c/assert.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" // NOLINTBEGIN(runtime/int) // NOLINTBEGIN(google-runtime-int) diff --git a/cel-c/internal/arc_test.cc b/cel-c/internal/arc_test.cc index 87e8b9d..ff19cad 100644 --- a/cel-c/internal/arc_test.cc +++ b/cel-c/internal/arc_test.cc @@ -16,7 +16,7 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" namespace { diff --git a/cel-c/internal/arena_array.h b/cel-c/internal/arena_array.h index 7d30f65..e7e984e 100644 --- a/cel-c/internal/arena_array.h +++ b/cel-c/internal/arena_array.h @@ -23,7 +23,7 @@ #include #include "cel-c/arena.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/generic_array.h" CEL_BEGIN_DECLS diff --git a/cel-c/internal/arena_array_test.cc b/cel-c/internal/arena_array_test.cc index af5db75..6028715 100644 --- a/cel-c/internal/arena_array_test.cc +++ b/cel-c/internal/arena_array_test.cc @@ -21,7 +21,7 @@ #include "absl/log/die_if_null.h" #include "cel-c/alloc.h" #include "cel-c/arena.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" namespace { diff --git a/cel-c/internal/arena_deque.h b/cel-c/internal/arena_deque.h index f969169..08ad977 100644 --- a/cel-c/internal/arena_deque.h +++ b/cel-c/internal/arena_deque.h @@ -23,7 +23,7 @@ #include #include "cel-c/arena.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/generic_deque.h" CEL_BEGIN_DECLS diff --git a/cel-c/internal/arena_deque_test.cc b/cel-c/internal/arena_deque_test.cc index 6d0ea51..d29507c 100644 --- a/cel-c/internal/arena_deque_test.cc +++ b/cel-c/internal/arena_deque_test.cc @@ -22,7 +22,7 @@ #include "absl/log/die_if_null.h" #include "cel-c/alloc.h" #include "cel-c/arena.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" namespace { diff --git a/cel-c/internal/arena_flat_hash_map.h b/cel-c/internal/arena_flat_hash_map.h index 23ac9b6..bee0394 100644 --- a/cel-c/internal/arena_flat_hash_map.h +++ b/cel-c/internal/arena_flat_hash_map.h @@ -24,7 +24,7 @@ #include #include "cel-c/arena.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/generic_flat_hash.h" CEL_BEGIN_DECLS diff --git a/cel-c/internal/arena_flat_hash_map_test.cc b/cel-c/internal/arena_flat_hash_map_test.cc index 20c1439..45c1616 100644 --- a/cel-c/internal/arena_flat_hash_map_test.cc +++ b/cel-c/internal/arena_flat_hash_map_test.cc @@ -21,8 +21,8 @@ #include "absl/log/die_if_null.h" #include "cel-c/alloc.h" #include "cel-c/arena.h" -#include "cel-c/config.h" #include "cel-c/hash.h" +#include "cel-c/internal/config.h" namespace { diff --git a/cel-c/internal/arena_string.h b/cel-c/internal/arena_string.h index 1458946..67cafc6 100644 --- a/cel-c/internal/arena_string.h +++ b/cel-c/internal/arena_string.h @@ -23,8 +23,8 @@ #include #include "cel-c/arena.h" -#include "cel-c/config.h" #include "cel-c/cstring_view.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/generic_string.h" #include "cel-c/string_view.h" diff --git a/cel-c/internal/arena_string_test.cc b/cel-c/internal/arena_string_test.cc index 7644e7d..7f4ee42 100644 --- a/cel-c/internal/arena_string_test.cc +++ b/cel-c/internal/arena_string_test.cc @@ -21,8 +21,8 @@ #include "absl/log/die_if_null.h" #include "cel-c/alloc.h" #include "cel-c/arena.h" -#include "cel-c/config.h" #include "cel-c/cstring_view.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/generic_string.h" #include "cel-c/string_view.h" diff --git a/cel-c/internal/array.h b/cel-c/internal/array.h index 60db98b..a6d06aa 100644 --- a/cel-c/internal/array.h +++ b/cel-c/internal/array.h @@ -23,7 +23,7 @@ #include #include "cel-c/alloc.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/generic_array.h" CEL_BEGIN_DECLS diff --git a/cel-c/internal/array_test.cc b/cel-c/internal/array_test.cc index de26c9f..8954be6 100644 --- a/cel-c/internal/array_test.cc +++ b/cel-c/internal/array_test.cc @@ -19,7 +19,7 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" #include "cel-c/alloc.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" namespace { diff --git a/cel-c/internal/binary_search.h b/cel-c/internal/binary_search.h index c3a062d..4861872 100644 --- a/cel-c/internal/binary_search.h +++ b/cel-c/internal/binary_search.h @@ -19,7 +19,7 @@ #include #include "cel-c/assert.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" CEL_BEGIN_DECLS diff --git a/cel-c/internal/bit.cc b/cel-c/internal/bit.cc index d0c53ca..8e438be 100644 --- a/cel-c/internal/bit.cc +++ b/cel-c/internal/bit.cc @@ -17,7 +17,7 @@ #include // IWYU pragma: keep #include // IWYU pragma: keep -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #if CEL_HAVE_INCLUDE() #include diff --git a/cel-c/internal/bit.h b/cel-c/internal/bit.h index a4df850..5faeaf3 100644 --- a/cel-c/internal/bit.h +++ b/cel-c/internal/bit.h @@ -22,7 +22,7 @@ #include // IWYU pragma: keep #include // IWYU pragma: keep -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #if CEL_HAVE_INCLUDE() #include diff --git a/cel-c/internal/bitset.cc b/cel-c/internal/bitset.cc index f3a1f64..82c7a5f 100644 --- a/cel-c/internal/bitset.cc +++ b/cel-c/internal/bitset.cc @@ -18,8 +18,8 @@ #include #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/internal/bit.h" +#include "cel-c/internal/config.h" extern "C" bool _cel_BitSet_Next(CEL_NULLABLE(const _cel_BitSetWord*) words, size_t bits, CEL_NONNULL(size_t*) bit) { diff --git a/cel-c/internal/bitset.h b/cel-c/internal/bitset.h index 9b27045..cae3aa9 100644 --- a/cel-c/internal/bitset.h +++ b/cel-c/internal/bitset.h @@ -22,7 +22,7 @@ #include #include "cel-c/assert.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" CEL_BEGIN_DECLS diff --git a/cel-c/internal/charconv.cc b/cel-c/internal/charconv.cc index 95dc257..721bc5a 100644 --- a/cel-c/internal/charconv.cc +++ b/cel-c/internal/charconv.cc @@ -24,7 +24,6 @@ #include #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/internal/ckdint.h" #include "cel-c/internal/config.h" #include "cel-c/internal/ctype.h" diff --git a/cel-c/internal/ckdint.h b/cel-c/internal/ckdint.h index bf062c5..f9d8062 100644 --- a/cel-c/internal/ckdint.h +++ b/cel-c/internal/ckdint.h @@ -22,7 +22,7 @@ #include #include // IWYU pragma: keep -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #if CEL_HAVE_INCLUDE() #include diff --git a/cel-c/internal/compare.h b/cel-c/internal/compare.h index cc7036e..4b3ffac 100644 --- a/cel-c/internal/compare.h +++ b/cel-c/internal/compare.h @@ -15,7 +15,7 @@ #ifndef THIRD_PARTY_CEL_C_INTERNAL_COMPARE_H_ #define THIRD_PARTY_CEL_C_INTERNAL_COMPARE_H_ -#include "cel-c/config.h" +#include "cel-c/internal/config.h" CEL_BEGIN_DECLS diff --git a/cel-c/internal/config.h b/cel-c/internal/config.h index 8be8120..02edebd 100644 --- a/cel-c/internal/config.h +++ b/cel-c/internal/config.h @@ -17,6 +17,10 @@ #ifndef THIRD_PARTY_CEL_C_INTERNAL_CONFIG_H_ #define THIRD_PARTY_CEL_C_INTERNAL_CONFIG_H_ +#include +#include +#include + #include "cel-c/config.h" // IWYU pragma: export #if defined(__BIG_ENDIAN__) || defined(__ARMEB__) || defined(__THUMBEB__) || \ @@ -135,4 +139,160 @@ #define _CEL_HAVE_SANITIZER 1 #endif +// cel_typeof/cel_typeof_unqual +// +// Expands to `typeof` and `typeof_unqual` equivalents, respectively. In C++ +// mode we remove references which do not exist in C. We also map `char8_t`, +// `char16_t`, `char32_t`, and `wchar_t` to their respective C types which are +// aliases of other builtin types instead of distinct types. Additionally we map +// enums to their underlying type. +#ifdef __cplusplus +template +struct _cel_typeof { + using type = T; +}; +template +struct _cel_typeof::value && !std::is_const::value && + !std::is_volatile::value)>::type> { + using type = + typename _cel_typeof::type>::type; +}; +template +struct _cel_typeof { + using type = typename _cel_typeof::type; +}; +template +struct _cel_typeof { + using type = typename _cel_typeof::type; +}; +template +struct _cel_typeof { + using type = typename _cel_typeof::type*; +}; +template +struct _cel_typeof { + using type = typename _cel_typeof::type[]; +}; +template +struct _cel_typeof { + using type = const typename _cel_typeof::type[]; +}; +template +struct _cel_typeof { + using type = volatile typename _cel_typeof::type[]; +}; +template +struct _cel_typeof { + using type = const volatile typename _cel_typeof::type[]; +}; +template +struct _cel_typeof { + using type = typename _cel_typeof::type[N]; +}; +template +struct _cel_typeof { + using type = const typename _cel_typeof::type[N]; +}; +template +struct _cel_typeof { + using type = volatile typename _cel_typeof::type[N]; +}; +template +struct _cel_typeof { + using type = const volatile typename _cel_typeof::type[N]; +}; +template +struct _cel_typeof { + using type = const typename _cel_typeof::type; +}; +template +struct _cel_typeof { + using type = volatile typename _cel_typeof::type; +}; +template +struct _cel_typeof { + using type = const volatile typename _cel_typeof::type; +}; +template <> +struct _cel_typeof { +#if defined(__GNUC__) || defined(__clang__) + using type = __WCHAR_TYPE__; +#elif defined(_MSC_VER) + using type = unsigned short; // NOLINT(runtime/int) +#else +#error Unexpected compiler. +#endif +}; +template <> +struct _cel_typeof { + using type = uint_least16_t; +}; +template <> +struct _cel_typeof { + using type = uint_least32_t; +}; +#if defined(__cpp_char8_t) && __cpp_char8_t >= 201811L +template <> +struct _cel_typeof { + using type = unsigned char; +}; +#endif +template +struct _cel_typeof_unqual { + using type = typename std::remove_cv::type>::type; +}; +#define cel_typeof(x) typename ::_cel_typeof::type +#define cel_typeof_unqual(x) typename ::_cel_typeof_unqual::type +#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L +#define cel_typeof(x) typeof(x) +#define cel_typeof_unqual(x) typeof_unqual(x) +#else +#define cel_typeof(x) __typeof__(x) +#define cel_typeof_unqual(x) __typeof_unqual__(x) +#endif + +#ifdef cel_containerof +#error cel_containerof cannot be directly set +#endif + +// cel_containerof +// +// Behaves the same as `container_of` in the Linux kernel. +#define cel_containerof(ptr, type, member) \ + ((CEL_NULLABILITY_UNKNOWN(type*))(((CEL_NULLABILITY_UNKNOWN(char*))(ptr)) - \ + offsetof(type, member))) + +#ifdef _CEL_HAVE_TYPES_COMPATIBLE +#error _CEL_HAVE_TYPES_COMPATIBLE cannot be directly set +#endif + +#ifdef _CEL_TYPES_COMPATIBLE +#error _CEL_TYPES_COMPATIBLE cannot be directly set +#endif + +#ifdef __cplusplus +#define _CEL_HAVE_TYPES_COMPATIBLE 1 +template +struct _cel_types_compatible : std::false_type {}; +template +struct _cel_types_compatible : std::true_type {}; +template +struct _cel_types_compatible : std::true_type {}; +template +struct _cel_types_compatible : _cel_types_compatible {}; +template +struct _cel_types_compatible : _cel_types_compatible {}; +#define _CEL_TYPES_COMPATIBLE(type1, type2) \ + ::_cel_types_compatible::type, \ + typename ::_cel_typeof_unqual::type>::value +#elif (defined(__GNUC__) && !defined(__clang__)) || \ + CEL_HAVE_BUILTIN(__builtin_types_compatible_p) +#define _CEL_HAVE_TYPES_COMPATIBLE 1 +#define _CEL_TYPES_COMPATIBLE(type1, type2) \ + __builtin_types_compatible_p(type1, type2) +#else +#define _CEL_TYPES_COMPATIBLE(type1, type2) true +#endif + #endif // THIRD_PARTY_CEL_C_INTERNAL_CONFIG_H_ diff --git a/cel-c/internal/config_test.cc b/cel-c/internal/config_test.cc index f9bb466..e83dd71 100644 --- a/cel-c/internal/config_test.cc +++ b/cel-c/internal/config_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include #include diff --git a/cel-c/internal/container.h b/cel-c/internal/container.h index bbf3d5d..2028cda 100644 --- a/cel-c/internal/container.h +++ b/cel-c/internal/container.h @@ -19,7 +19,7 @@ #include "cel-c/alloc.h" #include "cel-c/assert.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/string.h" #include "cel-c/string_view.h" diff --git a/cel-c/internal/ctype.h b/cel-c/internal/ctype.h index 7909223..ba9589d 100644 --- a/cel-c/internal/ctype.h +++ b/cel-c/internal/ctype.h @@ -17,7 +17,7 @@ #include -#include "cel-c/config.h" +#include "cel-c/internal/config.h" CEL_BEGIN_DECLS diff --git a/cel-c/internal/deque.h b/cel-c/internal/deque.h index 9878dac..706d3bb 100644 --- a/cel-c/internal/deque.h +++ b/cel-c/internal/deque.h @@ -23,7 +23,7 @@ #include #include "cel-c/alloc.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/generic_deque.h" CEL_BEGIN_DECLS diff --git a/cel-c/internal/deque_test.cc b/cel-c/internal/deque_test.cc index e8973cd..40be60d 100644 --- a/cel-c/internal/deque_test.cc +++ b/cel-c/internal/deque_test.cc @@ -20,7 +20,7 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" #include "cel-c/alloc.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" namespace { diff --git a/cel-c/internal/durationconv.cc b/cel-c/internal/durationconv.cc index 3d013fa..e72c03d 100644 --- a/cel-c/internal/durationconv.cc +++ b/cel-c/internal/durationconv.cc @@ -23,8 +23,8 @@ #include "absl/time/time.h" #include "cel-c/arena.h" #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/duration.h" +#include "cel-c/internal/config.h" #include "cel-c/string_view.h" #include "cel-c/string_view_absl.h" diff --git a/cel-c/internal/durationconv.h b/cel-c/internal/durationconv.h index f0229ae..a1fa36d 100644 --- a/cel-c/internal/durationconv.h +++ b/cel-c/internal/durationconv.h @@ -16,8 +16,8 @@ #define THIRD_PARTY_CEL_C_INTERNAL_DURATIONCONV_H_ #include "cel-c/arena.h" -#include "cel-c/config.h" #include "cel-c/duration.h" +#include "cel-c/internal/config.h" #include "cel-c/string_view.h" // NOLINTBEGIN(runtime/int) diff --git a/cel-c/internal/empty_list_value.cc b/cel-c/internal/empty_list_value.cc index 1bc004b..22df8fb 100644 --- a/cel-c/internal/empty_list_value.cc +++ b/cel-c/internal/empty_list_value.cc @@ -20,9 +20,9 @@ #include #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/error.h" #include "cel-c/error_code.h" +#include "cel-c/internal/config.h" #include "cel-c/status.h" #include "cel-c/string_view.h" #include "cel-c/value.h" diff --git a/cel-c/internal/empty_list_value.h b/cel-c/internal/empty_list_value.h index 0b002cf..1646eb9 100644 --- a/cel-c/internal/empty_list_value.h +++ b/cel-c/internal/empty_list_value.h @@ -16,7 +16,7 @@ #define THIRD_PARTY_CEL_C_INTERNAL_EMPTY_LIST_VALUE_H_ #include "cel-c/assert.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/value.h" CEL_BEGIN_DECLS diff --git a/cel-c/internal/empty_map_value.cc b/cel-c/internal/empty_map_value.cc index bac17ae..8944b3b 100644 --- a/cel-c/internal/empty_map_value.cc +++ b/cel-c/internal/empty_map_value.cc @@ -20,9 +20,9 @@ #include #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/error.h" #include "cel-c/error_code.h" +#include "cel-c/internal/config.h" #include "cel-c/status.h" #include "cel-c/string_view.h" #include "cel-c/value.h" diff --git a/cel-c/internal/empty_map_value.h b/cel-c/internal/empty_map_value.h index 4a96fa1..b2930cb 100644 --- a/cel-c/internal/empty_map_value.h +++ b/cel-c/internal/empty_map_value.h @@ -16,7 +16,7 @@ #define THIRD_PARTY_CEL_C_INTERNAL_EMPTY_MAP_VALUE_H_ #include "cel-c/assert.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/value.h" CEL_BEGIN_DECLS diff --git a/cel-c/internal/flat_hash_map.h b/cel-c/internal/flat_hash_map.h index 49ad5b7..1576afa 100644 --- a/cel-c/internal/flat_hash_map.h +++ b/cel-c/internal/flat_hash_map.h @@ -24,7 +24,7 @@ #include #include "cel-c/alloc.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/generic_flat_hash.h" CEL_BEGIN_DECLS diff --git a/cel-c/internal/flat_hash_map_test.cc b/cel-c/internal/flat_hash_map_test.cc index 28dd708..1d7df67 100644 --- a/cel-c/internal/flat_hash_map_test.cc +++ b/cel-c/internal/flat_hash_map_test.cc @@ -19,8 +19,8 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" #include "cel-c/alloc.h" -#include "cel-c/config.h" #include "cel-c/hash.h" +#include "cel-c/internal/config.h" namespace { diff --git a/cel-c/internal/flat_hash_set.h b/cel-c/internal/flat_hash_set.h index 64cdeaa..a580d6b 100644 --- a/cel-c/internal/flat_hash_set.h +++ b/cel-c/internal/flat_hash_set.h @@ -24,7 +24,7 @@ #include #include "cel-c/alloc.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/generic_flat_hash.h" CEL_BEGIN_DECLS diff --git a/cel-c/internal/flat_hash_set_test.cc b/cel-c/internal/flat_hash_set_test.cc index e86602c..aac4431 100644 --- a/cel-c/internal/flat_hash_set_test.cc +++ b/cel-c/internal/flat_hash_set_test.cc @@ -19,8 +19,8 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" #include "cel-c/alloc.h" -#include "cel-c/config.h" #include "cel-c/hash.h" +#include "cel-c/internal/config.h" namespace { diff --git a/cel-c/internal/generic_deque.cc b/cel-c/internal/generic_deque.cc index 310b18e..a8d27b6 100644 --- a/cel-c/internal/generic_deque.cc +++ b/cel-c/internal/generic_deque.cc @@ -22,9 +22,9 @@ #include "cel-c/alloc.h" #include "cel-c/arena.h" #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/internal/align.h" #include "cel-c/internal/asan.h" +#include "cel-c/internal/config.h" typedef struct _cel_GenericDequeBlock _cel_GenericDequeBlock; diff --git a/cel-c/internal/generic_deque.h b/cel-c/internal/generic_deque.h index 62f0411..f80d944 100644 --- a/cel-c/internal/generic_deque.h +++ b/cel-c/internal/generic_deque.h @@ -26,7 +26,7 @@ #include "cel-c/alloc.h" #include "cel-c/arena.h" #include "cel-c/assert.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" CEL_BEGIN_DECLS diff --git a/cel-c/internal/generic_flat_hash.cc b/cel-c/internal/generic_flat_hash.cc index b9a013f..2580724 100644 --- a/cel-c/internal/generic_flat_hash.cc +++ b/cel-c/internal/generic_flat_hash.cc @@ -24,10 +24,10 @@ #include "cel-c/alloc.h" #include "cel-c/arena.h" #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/internal/align.h" #include "cel-c/internal/bit.h" #include "cel-c/internal/bitset.h" +#include "cel-c/internal/config.h" CEL_ATTRIBUTE_NODISCARD static size_t _cel_GenericFlatHash_Rehash( diff --git a/cel-c/internal/generic_flat_hash.h b/cel-c/internal/generic_flat_hash.h index dc5b04f..0142655 100644 --- a/cel-c/internal/generic_flat_hash.h +++ b/cel-c/internal/generic_flat_hash.h @@ -26,8 +26,8 @@ #include "cel-c/alloc.h" #include "cel-c/arena.h" #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/internal/bitset.h" +#include "cel-c/internal/config.h" CEL_BEGIN_DECLS diff --git a/cel-c/internal/generic_string.cc b/cel-c/internal/generic_string.cc index 94bb64f..020f432 100644 --- a/cel-c/internal/generic_string.cc +++ b/cel-c/internal/generic_string.cc @@ -26,9 +26,9 @@ #include "cel-c/alloc.h" #include "cel-c/arena.h" #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/internal/asan.h" #include "cel-c/internal/ckdint.h" +#include "cel-c/internal/config.h" #include "cel-c/string_view.h" static void _cel_GenericString_AnnotateNew(CEL_NONNULL(char*) str, size_t len, diff --git a/cel-c/internal/generic_string.h b/cel-c/internal/generic_string.h index eb49244..0ec3b82 100644 --- a/cel-c/internal/generic_string.h +++ b/cel-c/internal/generic_string.h @@ -29,8 +29,8 @@ #include "cel-c/alloc.h" #include "cel-c/arena.h" #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/cstring_view.h" +#include "cel-c/internal/config.h" #include "cel-c/string_view.h" CEL_BEGIN_DECLS diff --git a/cel-c/internal/list_value.cc b/cel-c/internal/list_value.cc index b188ba6..f616cdb 100644 --- a/cel-c/internal/list_value.cc +++ b/cel-c/internal/list_value.cc @@ -18,7 +18,7 @@ #include #include "cel-c/assert.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/status.h" #include "cel-c/value.h" diff --git a/cel-c/internal/list_value_test.cc b/cel-c/internal/list_value_test.cc index 43dede0..195aad2 100644 --- a/cel-c/internal/list_value_test.cc +++ b/cel-c/internal/list_value_test.cc @@ -15,9 +15,9 @@ #include #include "gtest/gtest.h" -#include "cel-c/config.h" #include "cel-c/error.h" #include "cel-c/error_code.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/empty_list_value.h" #include "cel-c/internal/value_testing.h" #include "cel-c/status.h" diff --git a/cel-c/internal/malloc_test.cc b/cel-c/internal/malloc_test.cc index f23a70c..1eab7f8 100644 --- a/cel-c/internal/malloc_test.cc +++ b/cel-c/internal/malloc_test.cc @@ -19,8 +19,8 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "cel-c/config.h" #include "cel-c/internal/align.h" +#include "cel-c/internal/config.h" namespace { diff --git a/cel-c/internal/map_value.cc b/cel-c/internal/map_value.cc index e7eefdd..a2a2b49 100644 --- a/cel-c/internal/map_value.cc +++ b/cel-c/internal/map_value.cc @@ -20,8 +20,8 @@ #include #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/internal/array.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/sort.h" #include "cel-c/status.h" #include "cel-c/value.h" diff --git a/cel-c/internal/map_value.h b/cel-c/internal/map_value.h index bbdb98b..74a4b69 100644 --- a/cel-c/internal/map_value.h +++ b/cel-c/internal/map_value.h @@ -17,8 +17,8 @@ #include -#include "cel-c/config.h" #include "cel-c/hash.h" +#include "cel-c/internal/config.h" #include "cel-c/string_view.h" #include "cel-c/value.h" #include "upb/base/descriptor_constants.h" diff --git a/cel-c/internal/map_value_test.cc b/cel-c/internal/map_value_test.cc index 3afb4ae..6e9a527 100644 --- a/cel-c/internal/map_value_test.cc +++ b/cel-c/internal/map_value_test.cc @@ -19,10 +19,10 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "cel-c/config.h" #include "cel-c/error.h" #include "cel-c/error_code.h" #include "cel-c/hash.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/empty_map_value.h" #include "cel-c/internal/value_testing.h" #include "cel-c/status.h" diff --git a/cel-c/internal/message_equality.cc b/cel-c/internal/message_equality.cc index 899eb49..8d3f0a7 100644 --- a/cel-c/internal/message_equality.cc +++ b/cel-c/internal/message_equality.cc @@ -21,8 +21,8 @@ #include "cel-c/alloc.h" #include "cel-c/arena.h" #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/internal/any.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/number.h" #include "cel-c/internal/setjmp.h" #include "cel-c/string_view.h" diff --git a/cel-c/internal/message_equality.h b/cel-c/internal/message_equality.h index bfcb082..d2174fd 100644 --- a/cel-c/internal/message_equality.h +++ b/cel-c/internal/message_equality.h @@ -18,7 +18,7 @@ #include #include "cel-c/alloc.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/well_known_types.h" #include "upb/message/array.h" #include "upb/message/message.h" diff --git a/cel-c/internal/message_equality_test.cc b/cel-c/internal/message_equality_test.cc index 6362d78..ace2d46 100644 --- a/cel-c/internal/message_equality_test.cc +++ b/cel-c/internal/message_equality_test.cc @@ -41,7 +41,7 @@ #include "absl/types/variant.h" #include "cel-c/alloc.h" #include "cel-c/arena.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/status.h" #include "cel-c/well_known_types.h" #include "cel/expr/conformance/proto3/test_all_types.pb.h" diff --git a/cel-c/internal/mutable_list_value.cc b/cel-c/internal/mutable_list_value.cc index 5ac7ae8..b07a776 100644 --- a/cel-c/internal/mutable_list_value.cc +++ b/cel-c/internal/mutable_list_value.cc @@ -22,10 +22,10 @@ #include "cel-c/alloc.h" #include "cel-c/arena.h" #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/error.h" #include "cel-c/error_code.h" #include "cel-c/internal/ckdint.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/empty_list_value.h" #include "cel-c/status.h" #include "cel-c/string_view.h" diff --git a/cel-c/internal/mutable_list_value.h b/cel-c/internal/mutable_list_value.h index 84978bf..fc6adf1 100644 --- a/cel-c/internal/mutable_list_value.h +++ b/cel-c/internal/mutable_list_value.h @@ -20,7 +20,7 @@ #include "cel-c/arena.h" #include "cel-c/assert.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/value.h" CEL_BEGIN_DECLS diff --git a/cel-c/internal/mutable_map_value.cc b/cel-c/internal/mutable_map_value.cc index 8911c99..9d97bfd 100644 --- a/cel-c/internal/mutable_map_value.cc +++ b/cel-c/internal/mutable_map_value.cc @@ -23,11 +23,11 @@ #include "cel-c/alloc.h" #include "cel-c/arena.h" #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/error.h" #include "cel-c/error_code.h" #include "cel-c/hash.h" #include "cel-c/internal/bit.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/empty_map_value.h" #include "cel-c/internal/map_value.h" #include "cel-c/status.h" diff --git a/cel-c/internal/mutable_map_value.h b/cel-c/internal/mutable_map_value.h index d8f65b7..22a28bc 100644 --- a/cel-c/internal/mutable_map_value.h +++ b/cel-c/internal/mutable_map_value.h @@ -20,7 +20,7 @@ #include "cel-c/arena.h" #include "cel-c/assert.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/value.h" CEL_BEGIN_DECLS diff --git a/cel-c/internal/number.h b/cel-c/internal/number.h index 2db1873..6a33b28 100644 --- a/cel-c/internal/number.h +++ b/cel-c/internal/number.h @@ -22,8 +22,8 @@ #include #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/internal/compare.h" +#include "cel-c/internal/config.h" CEL_BEGIN_DECLS diff --git a/cel-c/internal/opaque_value.cc b/cel-c/internal/opaque_value.cc index 822fa3a..88bef18 100644 --- a/cel-c/internal/opaque_value.cc +++ b/cel-c/internal/opaque_value.cc @@ -17,7 +17,7 @@ #include #include "cel-c/assert.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/status.h" #include "cel-c/string_view.h" #include "cel-c/value.h" diff --git a/cel-c/internal/opaque_value_test.cc b/cel-c/internal/opaque_value_test.cc index f81fbba..3b1fadc 100644 --- a/cel-c/internal/opaque_value_test.cc +++ b/cel-c/internal/opaque_value_test.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "gtest/gtest.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/value_testing.h" #include "cel-c/status.h" #include "cel-c/string_view.h" diff --git a/cel-c/internal/optional_value.cc b/cel-c/internal/optional_value.cc index 23ad29a..f456992 100644 --- a/cel-c/internal/optional_value.cc +++ b/cel-c/internal/optional_value.cc @@ -18,10 +18,10 @@ #include "cel-c/arena.h" #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/duration.h" #include "cel-c/error.h" #include "cel-c/error_code.h" +#include "cel-c/internal/config.h" #include "cel-c/status.h" #include "cel-c/string_view.h" #include "cel-c/timestamp.h" diff --git a/cel-c/internal/parsed_map_field_value.cc b/cel-c/internal/parsed_map_field_value.cc index 8bf7d81..1050064 100644 --- a/cel-c/internal/parsed_map_field_value.cc +++ b/cel-c/internal/parsed_map_field_value.cc @@ -21,9 +21,9 @@ #include "cel-c/alloc.h" #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/error.h" #include "cel-c/error_code.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/map_value.h" #include "cel-c/internal/message_equality.h" #include "cel-c/status.h" diff --git a/cel-c/internal/parsed_map_field_value.h b/cel-c/internal/parsed_map_field_value.h index 41a2706..1e5db57 100644 --- a/cel-c/internal/parsed_map_field_value.h +++ b/cel-c/internal/parsed_map_field_value.h @@ -16,7 +16,7 @@ #define THIRD_PARTY_CEL_C_INTERNAL_PARSED_MAP_FIELD_VALUE_H_ #include "cel-c/assert.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/empty_map_value.h" #include "cel-c/value.h" #include "upb/message/map.h" diff --git a/cel-c/internal/parsed_message_value.cc b/cel-c/internal/parsed_message_value.cc index ce077c6..fd69717 100644 --- a/cel-c/internal/parsed_message_value.cc +++ b/cel-c/internal/parsed_message_value.cc @@ -21,9 +21,9 @@ #include "cel-c/alloc.h" #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/error.h" #include "cel-c/error_code.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/message_equality.h" #include "cel-c/status.h" #include "cel-c/status_code.h" diff --git a/cel-c/internal/parsed_message_value.h b/cel-c/internal/parsed_message_value.h index 9a4b886..e5a2783 100644 --- a/cel-c/internal/parsed_message_value.h +++ b/cel-c/internal/parsed_message_value.h @@ -16,7 +16,7 @@ #define THIRD_PARTY_CEL_C_INTERNAL_PARSED_MESSAGE_VALUE_H_ #include "cel-c/assert.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/type.h" #include "cel-c/value.h" #include "upb/message/message.h" diff --git a/cel-c/internal/parsed_repeated_field_value.cc b/cel-c/internal/parsed_repeated_field_value.cc index 2defeb9..d2bcee0 100644 --- a/cel-c/internal/parsed_repeated_field_value.cc +++ b/cel-c/internal/parsed_repeated_field_value.cc @@ -21,9 +21,9 @@ #include "cel-c/alloc.h" #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/error.h" #include "cel-c/error_code.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/message_equality.h" #include "cel-c/status.h" #include "cel-c/status_code.h" diff --git a/cel-c/internal/parsed_repeated_field_value.h b/cel-c/internal/parsed_repeated_field_value.h index 669ab76..3d5075a 100644 --- a/cel-c/internal/parsed_repeated_field_value.h +++ b/cel-c/internal/parsed_repeated_field_value.h @@ -16,7 +16,7 @@ #define THIRD_PARTY_CEL_C_INTERNAL_PARSED_REPEATED_FIELD_VALUE_H_ #include "cel-c/assert.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/empty_list_value.h" #include "cel-c/value.h" #include "upb/message/array.h" diff --git a/cel-c/internal/rc.h b/cel-c/internal/rc.h index 317138f..e7a3ef7 100644 --- a/cel-c/internal/rc.h +++ b/cel-c/internal/rc.h @@ -21,7 +21,7 @@ #include // IWYU pragma: keep #include "cel-c/assert.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" // NOLINTBEGIN(runtime/int) // NOLINTBEGIN(google-runtime-int) diff --git a/cel-c/internal/rc_test.cc b/cel-c/internal/rc_test.cc index ea9721a..5e365a1 100644 --- a/cel-c/internal/rc_test.cc +++ b/cel-c/internal/rc_test.cc @@ -16,7 +16,7 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" namespace { diff --git a/cel-c/internal/regexp.cc b/cel-c/internal/regexp.cc index 290262e..c36a429 100644 --- a/cel-c/internal/regexp.cc +++ b/cel-c/internal/regexp.cc @@ -21,8 +21,8 @@ #include "absl/strings/string_view.h" #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/internal/alloca.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/malloc.h" #include "cel-c/status.h" #include "cel-c/status_code.h" diff --git a/cel-c/internal/regexp.h b/cel-c/internal/regexp.h index a496675..7ed736a 100644 --- a/cel-c/internal/regexp.h +++ b/cel-c/internal/regexp.h @@ -19,7 +19,7 @@ #include #include -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/status.h" #include "cel-c/string_view.h" diff --git a/cel-c/internal/regexp_test.cc b/cel-c/internal/regexp_test.cc index c982ec7..ac69c23 100644 --- a/cel-c/internal/regexp_test.cc +++ b/cel-c/internal/regexp_test.cc @@ -18,7 +18,7 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/status.h" #include "cel-c/status_code.h" #include "cel-c/string_view.h" diff --git a/cel-c/internal/runtime/BUILD b/cel-c/internal/runtime/BUILD index 3484534..1f23a78 100644 --- a/cel-c/internal/runtime/BUILD +++ b/cel-c/internal/runtime/BUILD @@ -43,7 +43,6 @@ cc_library( "//cel-c:ast", "//cel-c:ast_traverse", "//cel-c:ast_visitor", - "//cel-c:config", "//cel-c:constant", "//cel-c:duration", "//cel-c:error", diff --git a/cel-c/internal/runtime/activation.cc b/cel-c/internal/runtime/activation.cc index e5cfa17..f446e10 100644 --- a/cel-c/internal/runtime/activation.cc +++ b/cel-c/internal/runtime/activation.cc @@ -21,7 +21,7 @@ #include "cel-c/alloc.h" #include "cel-c/arena.h" #include "cel-c/assert.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/runtime/instr.h" #include "cel-c/internal/runtime/interpretable.h" #include "cel-c/internal/runtime/program.h" diff --git a/cel-c/internal/runtime/activation.h b/cel-c/internal/runtime/activation.h index 77b0f63..8e52c05 100644 --- a/cel-c/internal/runtime/activation.h +++ b/cel-c/internal/runtime/activation.h @@ -21,7 +21,7 @@ #include "cel-c/activation.h" // IWYU pragma: export #include "cel-c/arena.h" #include "cel-c/assert.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/runtime/instr.h" #include "cel-c/internal/runtime/interpretable.h" #include "cel-c/program.h" diff --git a/cel-c/internal/runtime/instr.h b/cel-c/internal/runtime/instr.h index 107a24b..22f0fd1 100644 --- a/cel-c/internal/runtime/instr.h +++ b/cel-c/internal/runtime/instr.h @@ -19,8 +19,8 @@ #include #include -#include "cel-c/config.h" #include "cel-c/duration.h" +#include "cel-c/internal/config.h" #include "cel-c/string_view.h" #include "cel-c/timestamp.h" #include "upb/reflection/def.h" diff --git a/cel-c/internal/runtime/interpretable.cc b/cel-c/internal/runtime/interpretable.cc index 38b903d..3bc4748 100644 --- a/cel-c/internal/runtime/interpretable.cc +++ b/cel-c/internal/runtime/interpretable.cc @@ -25,7 +25,6 @@ #include "cel-c/activation.h" #include "cel-c/arena.h" #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/duration.h" #include "cel-c/error.h" #include "cel-c/error_code.h" diff --git a/cel-c/internal/runtime/interpretable.h b/cel-c/internal/runtime/interpretable.h index 640b882..0584bc6 100644 --- a/cel-c/internal/runtime/interpretable.h +++ b/cel-c/internal/runtime/interpretable.h @@ -21,7 +21,7 @@ #include "cel-c/alloc.h" #include "cel-c/arena.h" #include "cel-c/assert.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/runtime/instr.h" #include "cel-c/internal/runtime/program.h" #include "cel-c/internal/setjmp.h" diff --git a/cel-c/internal/runtime/interpreter.cc b/cel-c/internal/runtime/interpreter.cc index 0deb6ff..b91655f 100644 --- a/cel-c/internal/runtime/interpreter.cc +++ b/cel-c/internal/runtime/interpreter.cc @@ -23,10 +23,10 @@ #include "cel-c/ast.h" #include "cel-c/ast_traverse.h" #include "cel-c/ast_visitor.h" -#include "cel-c/config.h" #include "cel-c/constant.h" #include "cel-c/hash.h" #include "cel-c/internal/array.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/container.h" #include "cel-c/internal/deque.h" #include "cel-c/internal/flat_hash_map.h" diff --git a/cel-c/internal/runtime/interpreter.h b/cel-c/internal/runtime/interpreter.h index fe9bbec..ed31295 100644 --- a/cel-c/internal/runtime/interpreter.h +++ b/cel-c/internal/runtime/interpreter.h @@ -16,7 +16,7 @@ #define THIRD_PARTY_CEL_C_INTERNAL_RUNTIME_INTERPRETER_H_ #include "cel-c/ast.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/runtime/program.h" #include "cel-c/internal/runtime/runtime.h" #include "cel-c/status.h" diff --git a/cel-c/internal/runtime/program.cc b/cel-c/internal/runtime/program.cc index a25bd0c..5889e73 100644 --- a/cel-c/internal/runtime/program.cc +++ b/cel-c/internal/runtime/program.cc @@ -19,9 +19,9 @@ #include "cel-c/alloc.h" #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/internal/arc.h" #include "cel-c/internal/array.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/runtime/activation.h" #include "cel-c/internal/runtime/runtime.h" #include "cel-c/internal/string.h" diff --git a/cel-c/internal/runtime/program.h b/cel-c/internal/runtime/program.h index 1c7a57b..6ab1305 100644 --- a/cel-c/internal/runtime/program.h +++ b/cel-c/internal/runtime/program.h @@ -20,9 +20,9 @@ #include #include "cel-c/alloc.h" -#include "cel-c/config.h" #include "cel-c/internal/arc.h" #include "cel-c/internal/array.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/runtime/instr.h" #include "cel-c/internal/string.h" #include "cel-c/program.h" // IWYU pragma: export diff --git a/cel-c/internal/runtime/runtime.cc b/cel-c/internal/runtime/runtime.cc index db22da4..908937a 100644 --- a/cel-c/internal/runtime/runtime.cc +++ b/cel-c/internal/runtime/runtime.cc @@ -19,8 +19,8 @@ #include "cel-c/alloc.h" #include "cel-c/assert.h" #include "cel-c/ast.h" -#include "cel-c/config.h" #include "cel-c/internal/arc.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/container.h" #include "cel-c/internal/runtime/interpreter.h" #include "cel-c/internal/string.h" diff --git a/cel-c/internal/runtime/runtime.h b/cel-c/internal/runtime/runtime.h index 4f5ac93..5d00b8d 100644 --- a/cel-c/internal/runtime/runtime.h +++ b/cel-c/internal/runtime/runtime.h @@ -16,8 +16,8 @@ #define THIRD_PARTY_CEL_C_INTERNAL_RUNTIME_RUNTIME_H_ #include "cel-c/alloc.h" -#include "cel-c/config.h" #include "cel-c/internal/arc.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/container.h" #include "cel-c/runtime.h" // IWYU pragma: export #include "cel-c/well_known_types.h" diff --git a/cel-c/internal/runtime_test.cc b/cel-c/internal/runtime_test.cc index 2e59d87..9611abf 100644 --- a/cel-c/internal/runtime_test.cc +++ b/cel-c/internal/runtime_test.cc @@ -32,10 +32,10 @@ #include "cel-c/alloc.h" #include "cel-c/arena.h" #include "cel-c/ast.h" -#include "cel-c/config.h" #include "cel-c/duration.h" #include "cel-c/error.h" #include "cel-c/error_code.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/parsed_map_field_value.h" #include "cel-c/internal/runtime/program.h" #include "cel-c/internal/testing/compiler.h" diff --git a/cel-c/internal/setjmp.h b/cel-c/internal/setjmp.h index 4589fe2..eae6aaf 100644 --- a/cel-c/internal/setjmp.h +++ b/cel-c/internal/setjmp.h @@ -21,7 +21,7 @@ #include // IWYU pragma: keep -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #if CEL_HAVE_INCLUDE() // Include for _POSIX_VERSION. diff --git a/cel-c/internal/sort.h b/cel-c/internal/sort.h index 6428055..542b962 100644 --- a/cel-c/internal/sort.h +++ b/cel-c/internal/sort.h @@ -20,8 +20,8 @@ #include #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/internal/alloca.h" +#include "cel-c/internal/config.h" CEL_BEGIN_DECLS diff --git a/cel-c/internal/stable_sort.h b/cel-c/internal/stable_sort.h index 5c3f62c..9e75f79 100644 --- a/cel-c/internal/stable_sort.h +++ b/cel-c/internal/stable_sort.h @@ -20,8 +20,8 @@ #include #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/internal/alloca.h" +#include "cel-c/internal/config.h" CEL_BEGIN_DECLS diff --git a/cel-c/internal/string.h b/cel-c/internal/string.h index 87c3aca..9e35360 100644 --- a/cel-c/internal/string.h +++ b/cel-c/internal/string.h @@ -23,8 +23,8 @@ #include #include "cel-c/alloc.h" -#include "cel-c/config.h" #include "cel-c/cstring_view.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/generic_string.h" #include "cel-c/string_view.h" diff --git a/cel-c/internal/string_test.cc b/cel-c/internal/string_test.cc index cb7f9e6..94449a0 100644 --- a/cel-c/internal/string_test.cc +++ b/cel-c/internal/string_test.cc @@ -19,8 +19,8 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" #include "cel-c/alloc.h" -#include "cel-c/config.h" #include "cel-c/cstring_view.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/generic_string.h" #include "cel-c/string_view.h" diff --git a/cel-c/internal/struct_value.cc b/cel-c/internal/struct_value.cc index 8807122..019f6a6 100644 --- a/cel-c/internal/struct_value.cc +++ b/cel-c/internal/struct_value.cc @@ -18,8 +18,8 @@ #include #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/internal/array.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/sort.h" #include "cel-c/status.h" #include "cel-c/string_view.h" diff --git a/cel-c/internal/struct_value_test.cc b/cel-c/internal/struct_value_test.cc index 304a1fb..4a3816c 100644 --- a/cel-c/internal/struct_value_test.cc +++ b/cel-c/internal/struct_value_test.cc @@ -16,9 +16,9 @@ #include #include "gtest/gtest.h" -#include "cel-c/config.h" #include "cel-c/error.h" #include "cel-c/error_code.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/value_testing.h" #include "cel-c/status.h" #include "cel-c/string_view.h" diff --git a/cel-c/internal/testing/BUILD b/cel-c/internal/testing/BUILD index ee4b012..fa9f4f3 100644 --- a/cel-c/internal/testing/BUILD +++ b/cel-c/internal/testing/BUILD @@ -29,10 +29,10 @@ cc_library( "//cel-c:assert", "//cel-c:ast", "//cel-c:ast_proto", - "//cel-c:config", "//cel-c:status", "//cel-c:string_view", "//cel-c:string_view_absl", + "//cel-c/internal:config", "@abseil-cpp//absl/log:absl_check", "@abseil-cpp//absl/log:die_if_null", "@cel-cpp//checker:checker_options", @@ -58,8 +58,8 @@ cc_library( "//cel-c:arena", "//cel-c:assert", "//cel-c:ast", - "//cel-c:config", "//cel-c:string_view", + "//cel-c/internal:config", ], ) @@ -69,7 +69,7 @@ cc_library( hdrs = ["def_pool.h"], deps = [ "//cel-c:assert", - "//cel-c:config", + "//cel-c/internal:config", "@abseil-cpp//absl/log:die_if_null", "@cel-spec//proto/cel/expr/conformance/proto3:test_all_types_upb_proto_reflection", "@protobuf//:any_upb_reflection_proto", @@ -92,10 +92,10 @@ cc_library( "//cel-c:assert", "//cel-c:ast", "//cel-c:ast_proto", - "//cel-c:config", "//cel-c:status", "//cel-c:string_view", "//cel-c:string_view_absl", + "//cel-c/internal:config", "@abseil-cpp//absl/log:absl_check", "@abseil-cpp//absl/log:die_if_null", "@cel-cpp//common:ast_proto", @@ -121,7 +121,7 @@ cc_library( "//cel-c:arena", "//cel-c:assert", "//cel-c:ast", - "//cel-c:config", "//cel-c:string_view", + "//cel-c/internal:config", ], ) diff --git a/cel-c/internal/testing/compile.cc b/cel-c/internal/testing/compile.cc index 1c230c6..df6efe9 100644 --- a/cel-c/internal/testing/compile.cc +++ b/cel-c/internal/testing/compile.cc @@ -17,7 +17,7 @@ #include "cel-c/arena.h" #include "cel-c/assert.h" #include "cel-c/ast.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/testing/compiler.h" #include "cel-c/string_view.h" diff --git a/cel-c/internal/testing/compile.h b/cel-c/internal/testing/compile.h index 3a128a7..24e1e67 100644 --- a/cel-c/internal/testing/compile.h +++ b/cel-c/internal/testing/compile.h @@ -17,7 +17,7 @@ #include "cel-c/arena.h" #include "cel-c/ast.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/string_view.h" CEL_BEGIN_DECLS diff --git a/cel-c/internal/testing/compiler.cc b/cel-c/internal/testing/compiler.cc index 36c5937..8d1867d 100644 --- a/cel-c/internal/testing/compiler.cc +++ b/cel-c/internal/testing/compiler.cc @@ -26,7 +26,7 @@ #include "cel-c/assert.h" #include "cel-c/ast.h" #include "cel-c/ast_proto.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/status.h" #include "cel-c/string_view.h" #include "cel-c/string_view_absl.h" diff --git a/cel-c/internal/testing/compiler.h b/cel-c/internal/testing/compiler.h index 9f1f7ed..8adebd2 100644 --- a/cel-c/internal/testing/compiler.h +++ b/cel-c/internal/testing/compiler.h @@ -17,7 +17,7 @@ #include "cel-c/arena.h" #include "cel-c/ast.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/string_view.h" #ifdef __cplusplus diff --git a/cel-c/internal/testing/def_pool.cc b/cel-c/internal/testing/def_pool.cc index cc503d8..fbd0333 100644 --- a/cel-c/internal/testing/def_pool.cc +++ b/cel-c/internal/testing/def_pool.cc @@ -22,7 +22,7 @@ #include "google/protobuf/wrappers.upbdefs.h" #include "absl/log/die_if_null.h" #include "cel-c/assert.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel/expr/conformance/proto3/test_all_types.upbdefs.h" #include "upb/reflection/def.h" diff --git a/cel-c/internal/testing/def_pool.h b/cel-c/internal/testing/def_pool.h index 9bef00a..8c05945 100644 --- a/cel-c/internal/testing/def_pool.h +++ b/cel-c/internal/testing/def_pool.h @@ -15,7 +15,7 @@ #ifndef THIRD_PARTY_CEL_C_INTERNAL_TESTING_DEF_POOL_H_ #define THIRD_PARTY_CEL_C_INTERNAL_TESTING_DEF_POOL_H_ -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "upb/reflection/def.h" CEL_BEGIN_DECLS diff --git a/cel-c/internal/testing/parse.cc b/cel-c/internal/testing/parse.cc index 799ca94..8e7cfbc 100644 --- a/cel-c/internal/testing/parse.cc +++ b/cel-c/internal/testing/parse.cc @@ -17,7 +17,7 @@ #include "cel-c/arena.h" #include "cel-c/assert.h" #include "cel-c/ast.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/testing/parser.h" #include "cel-c/string_view.h" diff --git a/cel-c/internal/testing/parse.h b/cel-c/internal/testing/parse.h index 33779c3..0ec2fac 100644 --- a/cel-c/internal/testing/parse.h +++ b/cel-c/internal/testing/parse.h @@ -17,7 +17,7 @@ #include "cel-c/arena.h" #include "cel-c/ast.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/string_view.h" CEL_BEGIN_DECLS diff --git a/cel-c/internal/testing/parser.cc b/cel-c/internal/testing/parser.cc index 34e3f80..5720f1e 100644 --- a/cel-c/internal/testing/parser.cc +++ b/cel-c/internal/testing/parser.cc @@ -28,7 +28,7 @@ #include "cel-c/assert.h" #include "cel-c/ast.h" #include "cel-c/ast_proto.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/status.h" #include "cel-c/string_view.h" #include "cel-c/string_view_absl.h" diff --git a/cel-c/internal/testing/parser.h b/cel-c/internal/testing/parser.h index e20f857..36453e6 100644 --- a/cel-c/internal/testing/parser.h +++ b/cel-c/internal/testing/parser.h @@ -17,7 +17,7 @@ #include "cel-c/arena.h" #include "cel-c/ast.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/string_view.h" #ifdef __cplusplus diff --git a/cel-c/internal/trilean_test.cc b/cel-c/internal/trilean_test.cc index 315baeb..a5b2c6b 100644 --- a/cel-c/internal/trilean_test.cc +++ b/cel-c/internal/trilean_test.cc @@ -16,7 +16,7 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" namespace { diff --git a/cel-c/internal/uchar.h b/cel-c/internal/uchar.h index ea6b9e0..ab31ec5 100644 --- a/cel-c/internal/uchar.h +++ b/cel-c/internal/uchar.h @@ -20,7 +20,7 @@ #include // IWYU pragma: keep -#include "cel-c/config.h" // IWYU pragma: keep +#include "cel-c/internal/config.h" // IWYU pragma: keep #if !defined(__cplusplus) || __cplusplus < 201103L CEL_BEGIN_DECLS diff --git a/cel-c/internal/unicode.h b/cel-c/internal/unicode.h index fe4b0b1..d7c961f 100644 --- a/cel-c/internal/unicode.h +++ b/cel-c/internal/unicode.h @@ -20,7 +20,7 @@ #include // IWYU pragma: keep #include -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/uchar.h" // IWYU pragma: keep CEL_BEGIN_DECLS diff --git a/cel-c/internal/utf8.cc b/cel-c/internal/utf8.cc index 587bb15..74b093e 100644 --- a/cel-c/internal/utf8.cc +++ b/cel-c/internal/utf8.cc @@ -19,7 +19,7 @@ #include #include "cel-c/assert.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/uchar.h" // IWYU pragma: keep #include "cel-c/internal/unicode.h" #include "upb/base/string_view.h" diff --git a/cel-c/internal/utf8.h b/cel-c/internal/utf8.h index d2a7a04..6a99fa9 100644 --- a/cel-c/internal/utf8.h +++ b/cel-c/internal/utf8.h @@ -21,7 +21,7 @@ #include #include -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/uchar.h" // IWYU pragma: keep #include "upb/base/string_view.h" diff --git a/cel-c/internal/value.cc b/cel-c/internal/value.cc index e538da8..31efab0 100644 --- a/cel-c/internal/value.cc +++ b/cel-c/internal/value.cc @@ -19,11 +19,11 @@ #include #include "cel-c/assert.h" -#include "cel-c/config.h" #include "cel-c/duration.h" #include "cel-c/error.h" #include "cel-c/error_code.h" #include "cel-c/internal/any.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/parsed_map_field_value.h" #include "cel-c/internal/parsed_message_value.h" #include "cel-c/internal/parsed_repeated_field_value.h" diff --git a/cel-c/internal/value_test.cc b/cel-c/internal/value_test.cc index d3df729..c2e87f3 100644 --- a/cel-c/internal/value_test.cc +++ b/cel-c/internal/value_test.cc @@ -17,9 +17,9 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" #include "absl/strings/string_view.h" -#include "cel-c/config.h" #include "cel-c/duration.h" #include "cel-c/error.h" +#include "cel-c/internal/config.h" #include "cel-c/internal/empty_list_value.h" #include "cel-c/internal/empty_map_value.h" #include "cel-c/internal/mutable_list_value.h" diff --git a/cel-c/internal/value_testing.cc b/cel-c/internal/value_testing.cc index 1b93d64..ee721b5 100644 --- a/cel-c/internal/value_testing.cc +++ b/cel-c/internal/value_testing.cc @@ -34,7 +34,7 @@ #include "absl/log/die_if_null.h" #include "absl/strings/string_view.h" #include "cel-c/arena.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/status.h" #include "cel-c/value.h" #include "cel-c/well_known_types.h" diff --git a/cel-c/internal/value_testing.h b/cel-c/internal/value_testing.h index fc39f2b..4fd891b 100644 --- a/cel-c/internal/value_testing.h +++ b/cel-c/internal/value_testing.h @@ -20,7 +20,7 @@ #include "absl/strings/string_view.h" #include "cel-c/alloc.h" #include "cel-c/arena.h" -#include "cel-c/config.h" +#include "cel-c/internal/config.h" #include "cel-c/status.h" #include "cel-c/value.h" #include "cel-c/well_known_types.h"