jansvoboda11 added inline comments.
================ Comment at: clang/lib/Frontend/CompilerInvocation.cpp:287 +static void +denormalizeString(SmallVectorImpl<const char *> &Args, const char *Spelling, + CompilerInvocation::StringAllocator SA, unsigned, T &&Value) { ---------------- dexonsmith wrote: > jansvoboda11 wrote: > > We should keep an eye on the number of instantiations of this function > > template (and `normalizeStringIntegral`). > > > > If it grows, we can employ the SFINAE trick used for > > `makeFlagToValueNormalizer`. > Does it work to take the parameter as a `Twine` to avoid the template? > ``` > static void > denormalizeString(SmallVectorImpl<const char *> &Args, const char *Spelling, > CompilerInvocation::StringAllocator SA, unsigned, Twine > Value) { > Args.push_back(Spelling); > Args.push_back(SA(Value)); > } > ``` In general no. The `Twine` constructor is `explicit` for some types (integers, chars, etc.). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84186/new/ https://reviews.llvm.org/D84186 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits