dexonsmith added inline comments.
================ Comment at: clang/lib/Frontend/CompilerInvocation.cpp:156-159 +template <typename T> +FlagToValueNormalizer<T> makeFlagToValueNormalizer(T Value) { + return FlagToValueNormalizer<T>{std::move(Value)}; } ---------------- dexonsmith wrote: > Please declare this `static`. BTW, I suspect we can save some compile time (once there are lots of these) with: ``` template < class T, std::enable_if_t< sizeof(T) <= sizeof(uint64_t) && std::is_trivially_convertible<T, uint64_t>::value && std::is_trivially_convertible<uint64_t, T>::value, bool> = false> FlagToValueNormalizer<uint64_t> makeFlagToValueNormalizer(T Value) { return FlagToValueNormalizer<uint64_t>{std::move(Value)}; } template < class T, std::enable_if_t< !(sizeof(T) <= sizeof(uint64_t) && std::is_trivially_convertible<T, uint64_t>::value && std::is_trivially_convertible<uint64_t, T>::value), bool> = false> FlagToValueNormalizer<T> makeFlagToValueNormalizer(T Value) { return FlagToValueNormalizer<T>{std::move(Value)}; } ``` It'd be worth trying if/once the compile-time begins to climb to catch the enums (that aren't strongly typed) in a single instantiation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83694/new/ https://reviews.llvm.org/D83694 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits