[cfe-commits] [PATCH] Speed up parsing of global declarations.

Sean Silva silvas at purdue.edu
Tue Dec 11 14:30:19 PST 2012



================
Comment at: lib/Sema/SemaDecl.cpp:7235-7238
@@ -7234,3 +7234,6 @@
 
-  if (var->isThisDeclarationADefinition() &&
+  if (getDiagnostics().getDiagnosticLevel(
+                       diag::warn_missing_variable_declarations,
+                       var->getLocation()) &&
+      var->isThisDeclarationADefinition() &&
       var->getLinkage() == ExternalLinkage) {
----------------
Did you ever run the check over your internal code for the most common "firing, but suppressed" warnings? It might be best to hold off on this particular change until the results come in so that we can look at it in perspective.

It also doesn't seem to have a significant performance benefit for the "real-world" test case compared to just the caching.


http://llvm-reviews.chandlerc.com/D197



More information about the cfe-commits mailing list