Skip to content
  1. Mar 11, 2009
  2. Mar 10, 2009
    • Douglas Gregor's avatar
      Partial fix for PR3310, concerning type-checking for tentative · 81457423
      Douglas Gregor authored
      definitions. We were rejecting tentative definitions of incomplete
      (which is bad), and now we don't.
      
      This fix is partial because we don't do the end-of-translation-unit
      initialization for tentative definitions that don't ever have any
      initializers specified.
      
      llvm-svn: 66584
      81457423
    • Douglas Gregor's avatar
      Extend the notion of active template instantiations to include the · 79cf6034
      Douglas Gregor authored
      context of a template-id for which we need to instantiate default
      template arguments.
      
      In the TextDiagnosticPrinter, don't suppress the caret diagnostic if
      we are producing a non-note diagnostic that follows a note diagnostic
      with the same location, because notes are (conceptually) a part of the
      warning or error that comes before them.
      
      llvm-svn: 66572
      79cf6034
    • Douglas Gregor's avatar
      If we run into multiple errors within the same template instantiation, · 2a72edd4
      Douglas Gregor authored
      only print the template instantiation backtrace for the first error.
      
      Also, if a base class has failed to type-check during instantiation,
      just drop that base class and continue on to check other base classes.
      
      llvm-svn: 66563
      2a72edd4
    • Douglas Gregor's avatar
      Add pretty-printing for class template specializations, e.g., · 65b2c4c3
      Douglas Gregor authored
        'struct A<double, int>'
      
      In the "template instantiation depth exceeded" message, print
      "-ftemplate-depth-N" rather than "-ftemplate-depth=N".
      
      An unnamed tag type that is declared with a typedef, e.g., 
      
        typedef struct { int x, y; } Point;
      
      can be used as a template argument. Allow this, and check that we get
      sensible pretty-printing for such things.
      
      llvm-svn: 66560
      65b2c4c3
    • Douglas Gregor's avatar
      Add a notion of "post-diagnostic hooks", which are callbacks attached · 4ea568f2
      Douglas Gregor authored
      to a diagnostic that will be invoked after the diagnostic (if it is
      not suppressed). The hooks are allowed to produce additional
      diagnostics (typically notes) that provide more information. We should
      be able to use this to help diagnostic clients link notes back to the
      diagnostic they clarify. Comments welcome; I'll write up documentation
      and convert other clients (e.g., overload resolution failures) if
      there are no screams of protest.
      
      As the first client of post-diagnostic hooks, we now produce a
      template instantiation backtrace when a failure occurs during template
      instantiation. There's still more work to do to make this output
      pretty, if that's even possible.
      
      llvm-svn: 66557
      4ea568f2
    • Steve Naroff's avatar
      Simplify SelectorTable::constructSetterName() usage... · c7597f8e
      Steve Naroff authored
      llvm-svn: 66551
      c7597f8e
    • Anders Carlsson's avatar
      Address Doug's comments wrt the mangler and fix Eli's test case · 0275115f
      Anders Carlsson authored
      llvm-svn: 66549
      0275115f
    • Douglas Gregor's avatar
      Limit the template instantiation depth to some user-configurable value · fcd5db3b
      Douglas Gregor authored
      (default: 99). Beyond this limit, produce an error and consider the
      current template instantiation a failure.
      
      The stack we're building to track the instantiations will, eventually,
      be used to produce instantiation backtraces from diagnostics within
      template instantiation. However, we're not quite there yet.
      
      This adds a new Clang driver option -ftemplate-depth=NNN, which should
      eventually be generated from the GCC command-line operation
      -ftemplate-depth-NNN (note the '-' rather than the '='!). I did not
      make the driver changes to do this mapping.
      
      llvm-svn: 66513
      fcd5db3b
    • Douglas Gregor's avatar
      Implement template instantiation for ClassTemplateSpecializationTypes, · c40290e4
      Douglas Gregor authored
      such as replacing 'T' in vector<T>. There are a few aspects to this:
      
        - Extend TemplateArgument to allow arbitrary expressions (an
          Expr*), and switch ClassTemplateSpecializationType to store
          TemplateArguments rather than it's own type-or-expression
          representation.
      
        - ClassTemplateSpecializationType can now store dependent types. In
          that case, the canonical type is another
          ClassTemplateSpecializationType (with default template arguments
          expanded) rather than a declaration (we don't build Decls for
          dependent types).
      
        - Split ActOnClassTemplateId into ActOnClassTemplateId (called from
          the parser) and CheckClassTemplateId (called from
          ActOnClassTemplateId and InstantiateType). They're smart enough to
          handle dependent types, now.
      
      llvm-svn: 66509
      c40290e4
  3. Mar 09, 2009
  4. Mar 08, 2009
  5. Mar 07, 2009
  6. Mar 06, 2009
  7. Mar 05, 2009
Loading