This allows users to turn off warnings about this pragma specifically, while still receiving warnings about other ignored pragmas.
Details
Diff Detail
Event Timeline
lgtm, thanks!
lib/Parse/ParsePragma.cpp | ||
---|---|---|
2970 | One day, someone ought to refactor pragma parsing to be less verbose and error prone, but today is not that day. |
Awesome, thanks! One nit below:
include/clang/Basic/DiagnosticParseKinds.td | ||
---|---|---|
973 | 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 ? |
include/clang/Basic/DiagnosticParseKinds.td | ||
---|---|---|
973 | I'll drop the suggestion for now. Turns out it was not so easy to get a blurb into DiagnosticDocs or DiagnosticsReference. They're auto-generated but don't seem to have a good way to enter extra documentation. I'll just leave it for now. |
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 ?