Skip to content
  1. Aug 29, 2007
    • Chris Lattner's avatar
      update these · 8d22b4e1
      Chris Lattner authored
      llvm-svn: 41565
      8d22b4e1
    • Chris Lattner's avatar
      Fix a null dereference Neil ran into · c92bc4ce
      Chris Lattner authored
      llvm-svn: 41564
      c92bc4ce
    • Chris Lattner's avatar
    • Steve Naroff's avatar
      Re-teach Expr::isNullPointerConstant() about ImplicitCastExpr:-) · c5e5027b
      Steve Naroff authored
      This fixes the following bug submitted by Neil...
      
      const char *f (void) { return 0; }
      
      ...which would incorrectly warn with -pedantic enabled.
      
      llvm-svn: 41559
      c5e5027b
    • Steve Naroff's avatar
      · 0b661582
      Steve Naroff authored
      Implement default argument promotions (for old-style function calls and variable argument lists).
      
      [dylan:~/llvm/tools/clang] admin% cat x.c
      
      int printf(const char *, ...);
      
      int oldschool();
      
      void foo() {
        float f; 
        short i;
        printf("foo %f", 1.0f);
      
        oldschool(f,i);
      }
      
      [dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang x.c -parse-ast-dump
      
      int printf(char const *, ...);
      
      int oldschool();
      
      void foo()
      (CompoundStmt 0x3105f00
        (DeclStmt 0x3105ba0
          0x3105ce0 "float f")
        (DeclStmt 0x3105c90
          0x3105d10 "short i")
        (CallExpr 0x3105df0 'int'
          (ImplicitCastExpr 0x3105dc0 'int (*)(char const *, ...)'
            (DeclRefExpr 0x3105c20 'int (char const *, ...)' Decl='printf' 0x3105bd0))
          (ImplicitCastExpr 0x3105dd0 'char const *'
            (StringLiteral 0x3105d60 'char *' "foo %f"))
          (ImplicitCastExpr 0x3105de0 'double'
            (FloatingLiteral 0x3105d80 'float' 1.000000)))
        (CallExpr 0x3105ed0 'int'
          (ImplicitCastExpr 0x3105ea0 'int (*)()'
            (DeclRefExpr 0x3105e20 'int ()' Decl='oldschool' 0x3105c40))
          (ImplicitCastExpr 0x3105eb0 'double'
            (DeclRefExpr 0x3105e40 'float' Decl='f' 0x3105ce0))
          (ImplicitCastExpr 0x3105ec0 'int'
            (DeclRefExpr 0x3105e60 'short' Decl='i' 0x3105d10))))
      
      llvm-svn: 41558
      0b661582
  2. Aug 28, 2007
  3. Aug 27, 2007
Loading