Skip to content
  1. Aug 29, 2009
  2. Aug 28, 2009
  3. Aug 27, 2009
  4. Aug 26, 2009
  5. Aug 25, 2009
  6. Aug 22, 2009
  7. Aug 21, 2009
  8. Aug 20, 2009
  9. Aug 19, 2009
  10. Aug 15, 2009
  11. Aug 14, 2009
  12. Aug 08, 2009
  13. Aug 05, 2009
  14. Aug 04, 2009
  15. Jul 29, 2009
  16. Jul 27, 2009
  17. Jul 24, 2009
  18. Jul 21, 2009
  19. Jul 18, 2009
  20. Jul 17, 2009
  21. Jul 14, 2009
    • Steve Naroff's avatar
      Add a "TypeSpecStartLoc" to FieldDecl. Patch contributed by Enea Zaffanella. · 5ec6ff76
      Steve Naroff authored
      Note: One day, it might be useful to consider adding this info to DeclGroup (as the comments in FunctionDecl/VarDecl suggest). For now, I think this works fine. I considered moving this to ValueDecl (a common ancestor of FunctionDecl/VarDecl/FieldDecl), however this would add overhead to EnumConstantDecl (which would burn memory and isn't necessary).
      llvm-svn: 75635
      5ec6ff76
  22. Jul 02, 2009
    • Douglas Gregor's avatar
      Keep track of more information within the template instantiation stack, e.g., · ff6cbdf8
      Douglas Gregor authored
      by distinguishing between substitution that occurs for template
      argument deduction vs. explicitly-specifiad template arguments. This
      is used both to improve diagnostics and to make sure we only provide
      SFINAE in those cases where SFINAE should apply.
      
      In addition, deal with the sticky issue where SFINAE only considers
      substitution of template arguments into the *type* of a function
      template; we need to issue hard errors beyond this point, as
      test/SemaTemplate/operator-template.cpp illustrates.
      
      llvm-svn: 74651
      ff6cbdf8
  23. Jun 30, 2009
    • Douglas Gregor's avatar
      When recursively instantiating function templates, keep track of the · dda7ced3
      Douglas Gregor authored
      instantiation stack so that we provide a full instantiation
      backtrace. Previously, we performed all of the instantiations implied
      by the recursion, but each looked like a "top-level" instantiation.
      
      The included test case tests the previous fix for the instantiation of
      DeclRefExprs. Note that the "instantiated from" diagnostics still
      don't tell us which template arguments we're instantiating with.
      
      llvm-svn: 74540
      dda7ced3
    • Douglas Gregor's avatar
      Refactor ActOnDeclarationNameExpr into a "parsing action" part and a · 3256d04d
      Douglas Gregor authored
      "semantic analysis" part. Use the "semantic analysis" part when
      performing template instantiation on a DeclRefExpr, rather than an ad
      hoc list of rules to construct DeclRefExprs from the instantiation.
      
      A test case for this change will come in with a large commit, which
      illustrates what I was actually trying to work on.
      
      llvm-svn: 74528
      3256d04d
    • Argyrios Kyrtzidis's avatar
      De-ASTContext-ify DeclContext. · cfbfe78e
      Argyrios Kyrtzidis authored
      Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating".
      Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit.
      
      llvm-svn: 74506
      cfbfe78e
    • Argyrios Kyrtzidis's avatar
      Remove the ASTContext parameter from the getBody() methods of Decl and subclasses. · ddcd132a
      Argyrios Kyrtzidis authored
      Timings showed no significant difference before and after the commit.
      
      llvm-svn: 74504
      ddcd132a
  24. Jun 29, 2009
  25. Jun 26, 2009
    • Douglas Gregor's avatar
      Implicit instantiation for function template specializations. · 4adbc6d9
      Douglas Gregor authored
      For a FunctionDecl that has been instantiated due to template argument
      deduction, we now store the primary template from which it was
      instantiated and the deduced template arguments. From this
      information, we can instantiate the body of the function template.
      
      llvm-svn: 74232
      4adbc6d9
    • Douglas Gregor's avatar
      Improved semantic analysis and AST respresentation for function · ad3f2fcf
      Douglas Gregor authored
      templates.
      
      For example, this now type-checks (but does not instantiate the body
      of deref<int>):
      
        template<typename T> T& deref(T* t) { return *t; }
      
        void test(int *ip) {
          int &ir = deref(ip);
        }
      
      Specific changes/additions:
        * Template argument deduction from a call to a function template.
        * Instantiation of a function template specializations (just the
        declarations) from the template arguments deduced from a call.
        * FunctionTemplateDecls are stored directly in declaration contexts
        and found via name lookup (all forms), rather than finding the
        FunctionDecl and then realizing it is a template. This is
        responsible for most of the churn, since some of the core
        declaration matching and lookup code assumes that all functions are
        FunctionDecls.
      
      llvm-svn: 74213
      ad3f2fcf
Loading