================
Comment at: lib/Sema/SemaDecl.cpp:7242
@@ -7241,2 +7241,3 @@
 
-    if (!prev)
+      if (!prev && getDiagnostics().getDiagnosticLevel(
+                       diag::warn_missing_variable_declarations,
----------------
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.


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