Skip to content
  1. Aug 25, 2007
  2. 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
  3. Aug 17, 2007
  4. 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
  5. Aug 10, 2007
Loading