Skip to content
  1. Aug 30, 2007
  2. Aug 29, 2007
    • Ted Kremenek's avatar
      Added GraphTraits to source-level CFGs (CFG and CFGBlock) to allow · 4e5f99da
      Ted Kremenek authored
      (LLVM-provided) graph algorithms such as DFS and graph visualization
      to work effortless on source-level CFGs.
      
      Further cleanup on pretty printing of CFGs.  CFGBlock::dump and
      CFGBlock::print now take the parent CFG as an argument.  This allows
      CFGBlocks to print their own appropriate label indicating whether or
      not they are the Entry/Exit/IndirectGotoBlock without the CFG::print
      routine doing it instead.
      
      Added Graphviz visualization for CFGs: CFG::viewCFG.  This employs the
      GraphTraits just implemented.
      
      Added "-view-cfg" mode the to clang driver.  This is identical to
      "-dump-cfg" except that it calls Graphviz to visualize the CFGs
      instead of dumping them to the terminal.
      
      llvm-svn: 41580
      4e5f99da
    • Ted Kremenek's avatar
      Added checking (during parsing) of comparison of floating point values using == or !=. · 5ccf0d83
      Ted Kremenek authored
      This is the same functionality gcc provides via --Wfloat-equal.
      
      llvm-svn: 41574
      5ccf0d83
    • Chris Lattner's avatar
      Teach Type::is[un]SignedIntegerType about enum decls. This allows the code generator · 8a241f93
      Chris Lattner authored
      to emit signed comparisons when needed for enum decl references.  This implements
      test/CodeGen/enum.c.  I think enums should be good now.
      
      llvm-svn: 41572
      8a241f93
    • Chris Lattner's avatar
      Implement GCC-compatible layout and typing of enum constants and enum decl. · 3a370bf3
      Chris Lattner authored
      A small bit of codegen work is still pending.
      
      llvm-svn: 41571
      3a370bf3
    • Chris Lattner's avatar
      add some accessors · 959bcdca
      Chris Lattner authored
      llvm-svn: 41570
      959bcdca
    • 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
  3. Aug 28, 2007
  4. Aug 27, 2007
Loading