================
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
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to