[PATCH] D84186: [clang][cli] Convert Analyzer option string based options to new option parsing system
Duncan P. N. Exon Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 14 10:57:03 PST 2020
dexonsmith requested changes to this revision.
dexonsmith added inline comments.
This revision now requires changes to proceed.
================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:287
+static void
+denormalizeString(SmallVectorImpl<const char *> &Args, const char *Spelling,
+ CompilerInvocation::StringAllocator SA, unsigned, T &&Value) {
----------------
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));
}
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84186/new/
https://reviews.llvm.org/D84186
More information about the llvm-commits
mailing list