Skip to content
  1. Feb 13, 2012
  2. Feb 12, 2012
    • Fariborz Jahanian's avatar
      more of rewriting ivar types. · 245534de
      Fariborz Jahanian authored
      llvm-svn: 150353
      245534de
    • Douglas Gregor's avatar
      Implement the standard decltype() semantics described in C++11 · e096a355
      Douglas Gregor authored
      [dcl.type.simple]p4, which treats all xvalues as returning T&&. We had
      previously implemented a pre-standard variant of decltype() that
      doesn't cope with, e.g., static_ast<T&&>(e) very well.
      
      llvm-svn: 150348
      e096a355
    • Douglas Gregor's avatar
      Within the body of a lambda expression, decltype((x)) for an · 81495f34
      Douglas Gregor authored
      id-expression 'x' will compute the type based on the assumption that
      'x' will be captured, even if it isn't captured, per C++11
      [expr.prim.lambda]p18. There are two related refactors that go into
      implementing this:
      
        1) Split out the check that determines whether we should capture a
        particular variable reference, along with the computation of the
        type of the field, from the actual act of capturing the
        variable. 
        2) Always compute the result of decltype() within Sema, rather than
        AST, because the decltype() computation is now context-sensitive.
      
      llvm-svn: 150347
      81495f34
    • Sebastian Redl's avatar
      Proper initializer list support for new expressions and type construct... · d74dd490
      Sebastian Redl authored
      Proper initializer list support for new expressions and type construct expressions. Array new still missing.
      
      llvm-svn: 150346
      d74dd490
    • Douglas Gregor's avatar
      Lambdas have a deleted default constructor and a deleted copy · 1a22d288
      Douglas Gregor authored
      assignment operator, per C++ [expr.prim.lambda]p19. Make it so.
      
      llvm-svn: 150345
      1a22d288
    • Sebastian Redl's avatar
      Change the way we store initialization kinds so that all direct inits can... · 0501c636
      Sebastian Redl authored
      Change the way we store initialization kinds so that all direct inits can distinguish between list and parens form. This allows us to correctly diagnose the last test cases from litb.
      
      llvm-svn: 150343
      0501c636
    • Sebastian Redl's avatar
    • Argyrios Kyrtzidis's avatar
      Fix the rewriter that broke with r149987. · 75627ad8
      Argyrios Kyrtzidis authored
      r149987 changed the way parsing happens inside an @implementation;
      it aggregates the declarations inside and reports them together as a DeclGroup.
      This had the side effect that function declarations were reported together with
      their definition, while the rewriter expected for function declarations to be
      reported immediately to the consumer and thus not have a body.
      
      Fix this by having the rewriter actually check with isThisDeclarationADefinition()
      to make sure the body comes from the current decl before rewriting it.
      
      llvm-svn: 150325
      75627ad8
    • Sebastian Redl's avatar
      Represent C++ direct initializers as ParenListExprs before semantic analysis · a935179a
      Sebastian Redl authored
      instead of having a special-purpose function.
      
      - ActOnCXXDirectInitializer, which was mostly duplication of
        AddInitializerToDecl (leading e.g. to PR10620, which Eli fixed a few days
        ago), is dropped completely.
      - MultiInitializer, which was an ugly hack I added, is dropped again.
      - We now have the infrastructure in place to distinguish between
        int x = {1};
        int x({1});
        int x{1};
      -- VarDecl now has getInitStyle(), which indicates which of the above was used.
      -- CXXConstructExpr now has a flag to indicate that it represents list-
         initialization, although this is not yet used.
      - InstantiateInitializer was renamed to SubstInitializer and simplified.
      - ActOnParenOrParenListExpr has been replaced by ActOnParenListExpr, which
        always produces a ParenListExpr. Placed that so far failed to convert that
        back to a ParenExpr containing comma operators have been fixed. I'm pretty
        sure I could have made a crashing test case before this.
      
      The end result is a (I hope) considerably cleaner design of initializers.
      More importantly, the fact that I can now distinguish between the various
      initialization kinds means that I can get the tricky generalized initializer
      test cases Johannes Schaub supplied to work. (This is not yet done.)
      
      This commit passed self-host, with the resulting compiler passing the tests. I
      hope it doesn't break more complicated code. It's a pretty big change, but one
      that I feel is necessary.
      
      llvm-svn: 150318
      a935179a
    • Sebastian Redl's avatar
      Drive-by fix of incorrect diagnostic, and a test case for said diagnostic. The... · 46afb551
      Sebastian Redl authored
      Drive-by fix of incorrect diagnostic, and a test case for said diagnostic. The double error is unfortunate, but I really don't see an alternative whose effort is worth it.
      
      llvm-svn: 150317
      46afb551
    • Sebastian Redl's avatar
      Fix parsing new expressions using init lists. Probably still do the wrong... · 82ace98d
      Sebastian Redl authored
      Fix parsing new expressions using init lists. Probably still do the wrong thing in cases involving array new.
      Show that many cases using initializer list constructors work, in that they parse and pass semantic analysis.
      
      llvm-svn: 150316
      82ace98d
    • Anna Zaks's avatar
      [analyzer] Malloc Checker: reduce false negatives rate by assuming that · 41b84847
      Anna Zaks authored
      a pointer cannot escape through calls to system functions. Also, stop
      after reporting the first use-after-free.
      
      llvm-svn: 150315
      41b84847
  3. Feb 11, 2012
Loading