[PATCH] D59628: Add support for __attribute__((objc_class_stub))

Slava Pestov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 29 17:40:27 PDT 2019


slavapestov marked 2 inline comments as done.
slavapestov added inline comments.


================
Comment at: clang/include/clang/Basic/Attr.td:297
 def CUDA : LangOpt<"CUDA">;
-def COnly : LangOpt<"CPlusPlus", 1>;
+def COnly : LangOpt<"COnly", "!LangOpts.CPlusPlus">;
 def CPlusPlus : LangOpt<"CPlusPlus">;
----------------
aaron.ballman wrote:
> This compiles? I would have assumed that it would have to be `def COnly : LangOpt<"COnly", [{!LangOpts.CPlusPlus}]>;`
> 
> (If it compiles as-is, that's fine, I just wasn't aware that you could use string syntax for code blocks.)
It appears that both work! Going with your suggested version.


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

https://reviews.llvm.org/D59628





More information about the cfe-commits mailing list