[PATCH] D83211: Factor out call to EXTRACTOR in generateCC1CommandLine

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 16 02:17:00 PST 2020


jansvoboda11 added a comment.

Addressed review feedback. WDYT @Bigcheese?



================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:3938
+  if ((FLAGS)&options::CC1Option) {                                            \
+    const auto &Extracted = EXTRACTOR(this->KEYPATH);                          \
+    if (ALWAYS_EMIT || Extracted != DEFAULT_VALUE)                             \
----------------
Bigcheese wrote:
> Will this ever have an issue with lifetime? I can see various values for `EXTRACTOR` causing issues here. https://abseil.io/tips/107
> 
> 
> It would be good to at least document somewhere the restrictions on `EXTRACTOR`.
Mentioned the reference lifetime extension in a comment near extractor definitions.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83211/new/

https://reviews.llvm.org/D83211



More information about the cfe-commits mailing list