[cfe-commits] r90642 - in /cfe/trunk: include/clang/Basic/Diagnostic.h lib/Basic/Diagnostic.cpp lib/Frontend/TextDiagnosticPrinter.cpp tools/clang-cc/clang-cc.cpp
Eli Friedman
eli.friedman at gmail.com
Fri Dec 4 18:27:43 PST 2009
On Fri, Dec 4, 2009 at 6:14 PM, Steve Naroff <snaroff at apple.com> wrote:
> --- cfe/trunk/include/clang/Basic/Diagnostic.h (original)
> +++ cfe/trunk/include/clang/Basic/Diagnostic.h Fri Dec 4 20:14:08 2009
> @@ -182,6 +182,7 @@
> bool SuppressAllDiagnostics; // Suppress all diagnostics.
> ExtensionHandling ExtBehavior; // Map extensions onto warnings or errors?
> DiagnosticClient *Client;
> + LangOptions *LangOpts;
>
> /// DiagMappings - Mapping information for diagnostics. Mapping info is
> /// packed into four bits per diagnostic. The low three bits are the mapping
> @@ -238,7 +239,9 @@
> DiagnosticClient *getClient() { return Client; }
> const DiagnosticClient *getClient() const { return Client; }
>
> -
> + LangOptions *getLangOpts() const { return LangOpts; }
> + void setLangOpts(LangOptions *LOpts) { LangOpts = LOpts; }
> +
> /// pushMappings - Copies the current DiagMappings and pushes the new copy
> /// onto the top of the stack.
> void pushMappings();
It would be better to have an option in DiagnosticOptions instead
making the diagnostic printer mess with the LangOptions directly.
-Eli
More information about the cfe-commits
mailing list