[PATCH] D61370: Add a C2x mode and allow attributes in it

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 14 05:07:35 PDT 2019


aaron.ballman closed this revision.
aaron.ballman marked an inline comment as done.
aaron.ballman added a comment.

I've commit in r360667, thanks!



================
Comment at: lib/Frontend/CompilerInvocation.cpp:2593-2596
+  // Enable [[]] attributes in C++11 and C2x by default.
+  Opts.DoubleSquareBracketAttributes = Args.hasFlag(
+      OPT_fdouble_square_bracket_attributes,
+      OPT_fno_double_square_bracket_attributes, Opts.CPlusPlus11 || Opts.C2x);
----------------
rsmith wrote:
> (We get this wrong in a bunch of other places, but...)
> 
> The default from the language mode should be set by `setLangDefault`, and here we should override it if suitable flags are set.
Ah, good to know. I went ahead and fixed this for the commit.


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

https://reviews.llvm.org/D61370





More information about the cfe-commits mailing list