Skip to content
  1. Jan 17, 2008
  2. Jan 07, 2008
  3. Dec 29, 2007
  4. Dec 28, 2007
  5. Dec 20, 2007
  6. Dec 18, 2007
    • Steve Naroff's avatar
      · b74406ba
      Steve Naroff authored
      Fixe bogus error for variable argument methods. Sema::ObjcGetTypeForMethodDefinition() wasn't preserving the isVariadic boolean. Another fix is to avoid synthsizing the function decl entirely, however this is a separate issue that I don't want to deal with now. Also added a FIXME to Sema::CheckFunctionCall(), which is currently emitting a bogus warning.
      
      llvm-svn: 45146
      b74406ba
  7. Dec 17, 2007
    • Ted Kremenek's avatar
      Modified format-string checking to not emit a warning when all of the · 3fbeaea7
      Ted Kremenek authored
      following hold:
      
      (1) A vprintf-like function is called that takes the argument list via a
          via_list argument.
      
      (2) The format string is a non-literal that is the parameter value of
          the enclosing function, e.g:
          
          void logmessage(const char *fmt,...) { 
            va_list ap;
            va_start(ap,fmt);
            fprintf(fmt,ap);  // Do not emit a warning.
          }
          
      In the future this special case will be enhanced to consult the "format"
      attribute attached to a function declaration instead of just allowing a blank
      check for all function parameters to be used as format strings to vprintf-like
      functions. This will happen when more support for attributes becomes
      available.
      
      llvm-svn: 45114
      3fbeaea7
    • Ted Kremenek's avatar
      ea63b157
  8. Dec 04, 2007
  9. Nov 30, 2007
  10. Nov 29, 2007
    • Ted Kremenek's avatar
      Enhanced implementation of -Wfloat-equal to check for comparisons against · eda40e27
      Ted Kremenek authored
      floating-point literals that are represented exactly by the APFloat in
      FloatingLiteral. For such literals, we do not emit a warning since such checks are
      often performed in real code to see if a variable has changed from its original
      value. This heuristic clearly can lead to false negatives, but the hope is it will
      significantly reduce false positives to help make the compiler flag more useful.
      
      llvm-svn: 44424
      eda40e27
  11. Nov 25, 2007
  12. Oct 12, 2007
  13. Aug 30, 2007
  14. Aug 28, 2007
  15. Aug 27, 2007
  16. Aug 26, 2007
  17. Aug 25, 2007
  18. Aug 20, 2007
    • Ted Kremenek's avatar
      Modified ArraySubscriptExpr to have accessors getLHS and getRHS in addition · c81614d5
      Ted Kremenek authored
      to getBase and getIdx.  getBase and getIdx now return a "normalized" view
      of the expression (e.g., always "A[4]" instead of possibly "4[A]").  getLHS
      and getRHS return the expressions with syntactic fidelity to the original
      source code.
      
      Also modified client code of ArraySubscriptExpr, including the AST dumper
      and pretty printer, the return-stack value checker, and the LLVM code
      generator.
      
      llvm-svn: 41180
      c81614d5
  19. Aug 17, 2007
  20. Aug 14, 2007
    • Ted Kremenek's avatar
      Added support for additional format string checking for the printf · e68f1aad
      Ted Kremenek authored
      family of functions.  Previous functionality only included checking to
      see if the format string was a string literal.  Now we check parse the
      format string (if it is a literal) and perform the following checks:
      
      (1) Warn if: number conversions (e.g. "%d") != number data arguments.
      
      (2) Warn about missing format strings  (e.g., "printf()").
      
      (3) Warn if the format string is not a string literal.
      
      (4) Warn about the use se of '%n' conversion.  This conversion is
          discouraged for security reasons.
      
      (5) Warn about malformed conversions.  For example '%;', '%v'; these
          are not valid.
      
      (6) Warn about empty format strings; e.g. printf("").  Although these
          can be optimized away by the compiler, they can be indicative of
          broken programmer logic.  We may need to add additional support to
          see when such cases occur within macro expansion to avoid false
          positives.
      
      (7) Warn if the string literal is wide; e.g. L"%d".
      
      (8) Warn if we detect a '\0' character WITHIN the format string.
      
      Test cases are included.
      
      llvm-svn: 41076
      e68f1aad
  21. Aug 10, 2007
Loading