Skip to content
  1. Oct 27, 2012
  2. Sep 11, 2012
  3. Dec 15, 2011
    • Richard Trieu's avatar
      Modify how the -verify flag works. Currently, the verification string and · 553b2b2e
      Richard Trieu authored
      diagnostic message are compared.  If either is a substring of the other, then
      no error is given.  This gives rise to an unexpected case:
      
        // expect-error{{candidate function has different number of parameters}}
      
      will match the following error messages from Clang:
      
        candidate function has different number of parameters (expected 1 but has 2)
        candidate function has different number of parameters
      
      It will also match these other error messages:
      
        candidate function
        function has different number of parameters
        number of parameters
      
      This patch will change so that the verification string must be a substring of
      the diagnostic message before accepting.  Also, all the failing tests from this
      change have been corrected.  Some stats from this cleanup:
      
      87 - removed extra spaces around verification strings
      70 - wording updates to diagnostics
      40 - extra leading or trailing characters (typos, unmatched parens or quotes)
      35 - diagnostic level was included (error:, warning:, or note:)
      18 - flag name put in the warning (-Wprotocol)
      
      llvm-svn: 146619
      553b2b2e
  4. Oct 14, 2011
  5. Sep 17, 2011
  6. Jul 29, 2011
  7. Apr 22, 2011
  8. Oct 28, 2010
    • John McCall's avatar
      Implement an indirect-goto optimization for goto *&&lbl and respect this · 9de9160d
      John McCall authored
      in the scope checker.  With that done, turn an indirect goto into a
      protected scope into a hard error;  otherwise IR generation has to start
      worrying about declarations not dominating their scopes, as exemplified
      in PR8473.
      
      If this really affects anyone, I can probably adjust this to only hard-error
      on possible indirect gotos into VLA scopes rather than arbitrary scopes.
      But we'll see how people cope with the aggressive change on the marginal
      feature.
      
      llvm-svn: 117539
      9de9160d
  9. Aug 03, 2010
  10. Aug 01, 2010
  11. May 12, 2010
    • John McCall's avatar
      When checking scopes for indirect goto, be more permissive (but still safe) · cf819ab3
      John McCall authored
      about the permitted scopes.  Specifically:
        1) Permit labels and gotos to appear after a prologue of variable initializations.
        2) Permit indirect gotos to jump out of scopes that don't require cleanup.
        3) Diagnose possible attempts to indirect-jump out of scopes that do require
           cleanup.
      This requires a substantial reinvention of the algorithm for checking indirect
      goto.  The current algorithm is Omega(M*N), with M = the number of unique
      scopes being jumped from and N = the number of unique scopes being jumped to,
      with an additional factor that is probably (worst-case) linear in the depth
      of scopes.  Thus the entire thing is likely cubic given some truly bizarre
      ill-formed code;  on well-formed code the additional factor collapses to
      an amortized constant (when amortized over the entire function) and so
      the algorithm is quadratic.  Even this requires every label to appear in
      its own scope, which would be very unusual for indirect-goto code (and
      extremely unlikely for well-formed code);  it is far more likely that
      all labels will be in the same scope and so the algorithm becomes linear.
      For such a marginal feature, I am fairly happy with this result.
      
      (this is using JumpDiagnostic's definition of scope, where successive
      variables in a block appear in their own scope)
      
      llvm-svn: 103536
      cf819ab3
Loading