Skip to content
  1. Mar 06, 2011
  2. Mar 05, 2011
  3. Mar 04, 2011
    • Douglas Gregor's avatar
      Diagnose destructor templates. Fixes PR7904. · 93ded320
      Douglas Gregor authored
      llvm-svn: 127042
      93ded320
    • Douglas Gregor's avatar
      When clearing a LookupResult structure, clear out the naming class, · 4cf85a72
      Douglas Gregor authored
      too. Fixes PR7900.
      
      While I'm in this area, improve the diagnostic when the type being
      destroyed doesn't match either of the types we found.
      
      llvm-svn: 127041
      4cf85a72
    • Bill Wendling's avatar
      Initialize variable. · 6c9540e9
      Bill Wendling authored
      llvm-svn: 127039
      6c9540e9
    • Douglas Gregor's avatar
      Teach Sema::ActOnCXXNestedNameSpecifier and Sema::CheckTemplateIdType · 8b6070bb
      Douglas Gregor authored
      to cope with non-type templates by providing appropriate
      errors. Previously, we would either assert, crash, or silently build a
      dependent type when we shouldn't. Fixes PR9226.
      
      llvm-svn: 127037
      8b6070bb
    • Douglas Gregor's avatar
      After an error of any kind has occurred, don't assert when attempting · 8c2d3f42
      Douglas Gregor authored
      to find the instantiated declaration within a template instantiation
      fails to do so. It's likely that the original instantiation got
      dropped due to instantiation failures, which doesn't actually break
      the invariants of the AST. This eliminates a number of
      crash-on-invalid failures, e.g., PR9300.
      
      llvm-svn: 127030
      8c2d3f42
    • Douglas Gregor's avatar
      Patch up several Sema::FindInstantiatedDecl() callers, so that they'll · 55e6b315
      Douglas Gregor authored
      properly cope with NULL return values.
      
      llvm-svn: 127024
      55e6b315
    • Devang Patel's avatar
      Emit a stop point before a call expression so that debugger has some chance of... · d3a6b0f1
      Devang Patel authored
      Emit a stop point before a call expression so that debugger has some chance of getting some footing when user wants to stop at 2nd bar() in following expression when all function calls are inlined.
        = bar() + ... + bar() + ...
      
      clang keeps track of column numbers, so we could put location entries for all subexpressions but that will significantly bloat debug info in general, but a location for call expression is helpful here.
      
      llvm-svn: 127018
      d3a6b0f1
    • Douglas Gregor's avatar
      When constructing source-location information for a · 23648d7e
      Douglas Gregor authored
      DependentTemplateSpecializationType during tree transformation, retain
      the NestedNameSpecifierLoc as it was used to translate the template
      name, rather than reconstructing it from the template name.
      
      Fixes PR9401.
      
      llvm-svn: 127015
      23648d7e
    • Douglas Gregor's avatar
      *Recursively* set the context of a template parameter, so that we also · 3c41bf74
      Douglas Gregor authored
      capture the template parameters of template template parameters.
      
      llvm-svn: 127012
      3c41bf74
    • Douglas Gregor's avatar
      Make sure to put template parameters into their owning template's · fd7c2255
      Douglas Gregor authored
      DeclContext once we've created it. This mirrors what we do for
      function parameters, where the parameters start out with
      translation-unit context and then are adopted by the appropriate
      DeclContext when it is created. Also give template parameters public
      access and make sure that they don't show up for the purposes of name
      lookup.
      
      Fixes PR9400, a regression introduced by r126920, which implemented
      substitution of default template arguments provided in template
      template parameters (C++ core issue 150).
      
      How on earth could the DeclContext of a template parameter affect the
      handling of default template arguments?
      
      I'm so glad you asked! The link is
      Sema::getTemplateInstantiationArgs(), which determines the outer
      template argument lists that correspond to a given declaration. When
      we're instantiating a default template argument for a template
      template parameter within the body of a template definition (not it's
      instantiation, per core issue 150), we weren't getting any outer
      template arguments because the context of the template template
      parameter was the translation unit. Now that the context of the
      template template parameter is its owning template, we get the
      template arguments from the injected-class-name of the owning
      template, so substitution works as it should.
      
      llvm-svn: 127004
      fd7c2255
    • Abramo Bagnara's avatar
      Fixed source range for function template specializations. · b9893d66
      Abramo Bagnara authored
      template <class T> void foo();
      template <> void foo<int>(); /* Spec 1 */
      template <> void foo<int>(); /* Spec 2 */
      
      If we look at the main location of the first explicit specialization (Spec 1) it can be seen that it points to the name of the *second* explicit specialization (Spec 2), which is a redeclaration of Spec1.
      Hence, the source range obtained for Spec1 is not only inaccurate, but also invalid (the end location comes before the start location).
      
      llvm-svn: 127002
      b9893d66
Loading