[PATCH] D101766: [TableGen] [Clang] Clean up Options.td and add asserts

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 6 00:46:11 PDT 2021


jansvoboda11 added a comment.

Thanks Paul!



================
Comment at: clang/include/clang/Driver/Options.td:1089
+  LangOpts<"DoubleSquareBracketAttributes">,
+  Default<!strconcat(cpp11.KeyPath, "||", c2x.KeyPath)>,
   PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [], "Disable">,
----------------
Paul-C-Anagnostopoulos wrote:
> jansvoboda11 wrote:
> > Paul-C-Anagnostopoulos wrote:
> > > jansvoboda11 wrote:
> > > > Were you planning to refactor this too?
> > > You can't use the paste operator (#) there because c2x is a defvar. Defvars and undefined identifiers are taken literally by paste, due to its frequent use in forming record and class names.
> > > 
> > > This behavior is noted in the Programmer's Reference, but I think I will add a more prominent note. I wonder if we should change the behavior so defvars are treated normally.
> > I see. In that case, can you please undo the whitespace change?
> Sure, but don't we try to avoid over-long lines in .td files, too?
I think that would be nice, but I'm not sure what's LLVM's policy on making whitespace-only changes (it makes `git blame` less useful). If we decide that's fine, let's do it in a purely NFC commit.


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

https://reviews.llvm.org/D101766



More information about the cfe-commits mailing list