Skip to content
  1. Dec 16, 2010
  2. Dec 15, 2010
  3. Dec 14, 2010
  4. Dec 13, 2010
    • Douglas Gregor's avatar
      Variadic templates: extend Type, NestedNameSpecifier, TemplateName, · 506bd564
      Douglas Gregor authored
      and TemplateArgument with an operation that determines whether there
      are any unexpanded parameter packs within that construct. Use this
      information to diagnose the appearance of the names of parameter packs
      that have not been expanded (C++ [temp.variadic]p5). Since this
      property is checked often (every declaration, ever expression
      statement, etc.), we extend Type and Expr with a bit storing the
      result of this computation, rather than walking the AST each time to
      determine whether any unexpanded parameter packs occur.
      
      This commit is deficient in several ways, which will be remedied with
      future commits:
        - Expr has a bit to store the presence of an unexpanded parameter
        pack, but it is never set.
        - The error messages don't point out where the unexpanded parameter
        packs were named in the type/expression, but they should. 
        - We don't check for unexpanded parameter packs in all of the places
        where we should.
        - Testing is sparse, pending the resolution of the above three
        issues.
      
      llvm-svn: 121724
      506bd564
    • Abramo Bagnara's avatar
      Skip ParenType on function instantiations. · a44c902d
      Abramo Bagnara authored
      llvm-svn: 121720
      a44c902d
    • Chandler Carruth's avatar
    • Chandler Carruth's avatar
      Fix PR8774 by restricting when hasInit returns true. Previously, it · 7a6d2e9c
      Chandler Carruth authored
      would return true if the initializer pointer union had *any* non-null
      pointer in it, even if the pointer wasn't one that would actually be
      returned via getInit(). This makes it more accurately model the logic of
      'getInit() != NULL'.
      
      This still isn't completely satisfying. From a principled stance,
      I suspect we should make hasInit() and getInit() *always* return false
      and NULL (resp.) for ParmVarDecl. We shouldn't at the API level treat
      initializers and default arguments as the same thing.
      
      llvm-svn: 121692
      7a6d2e9c
Loading