[cfe-commits] [PATCH] Speed up parsing of global declarations.
Benjamin Kramer
benny.kra at gmail.com
Tue Dec 11 04:23:26 PST 2012
================
Comment at: lib/Sema/SemaDecl.cpp:7242
@@ -7241,2 +7241,3 @@
- if (!prev)
+ if (!prev && getDiagnostics().getDiagnosticLevel(
+ diag::warn_missing_variable_declarations,
----------------
Manuel Klimek wrote:
> Joey Gouly wrote:
> > I'm just wondering if we couldn't make this check on all diagnostics.
> On IRC Chandler proposed yesterday that a long-term solution to this problem would be to change diagnostics to a pattern like:
> if (DiagStream *DS = Diag(var-getLocation(), diag::warn...) {
> *DS << var;
> }
>
> I personally think that's a good plan, but orthogonal to us fixing where we're missing checks in the hot path right now.
Should the check be hoisted up a level so the decls aren't walked when we're not going to emit a warning?
http://llvm-reviews.chandlerc.com/D197
More information about the cfe-commits
mailing list