[PATCH] D44630: [ms] Parse #pragma optimize and ignore it behind its own flag

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 19 12:41:19 PDT 2018


thakis accepted this revision.
thakis added a comment.

Awesome, thanks! One nit below:



================
Comment at: include/clang/Basic/DiagnosticParseKinds.td:973
+def warn_pragma_optimize : Warning<
+  "'#pragma optimize' is not supported; use '#pragma clang optimize on|off' instead">,
+  InGroup<IgnoredPragmaOptimize>;
----------------
Is `pragma clang optimize` really what we want to recommend here? `pragma optimize` is used in practice mostly to work around cl.exe compiler bugs, or to disable inlining. In neither case, `pragma clang optimize` is what you'd really want to use. Maybe just omit everything after ; and instead add a blurb about this in DiagnosticDocs.td ?


https://reviews.llvm.org/D44630





More information about the cfe-commits mailing list