Skip to content
  1. Jul 02, 2012
    • Jordan Rose's avatar
      In blocks, only pretend that enum constants have enum type if necessary. · d39e5f14
      Jordan Rose authored
      In C, enum constants have the type of the enum's underlying integer type,
      rather than the type of the enum. (This is not true in C++.) Thus, when a
      block's return type is inferred from an enum constant, it is incompatible
      with expressions that return the enum type.
      
      In r158899, I told block returns to pretend that enum constants have enum
      type, like in C++. Doug Gregor pointed out that this can break existing code.
      
      Now, we don't check the types of return statements until the end of the block.
      This lets us go back and add implicit casts in blocks with mixed enum
      constants and enum-typed expressions.
      
      <rdar://problem/11662489> (again)
      
      llvm-svn: 159591
      d39e5f14
    • Douglas Gregor's avatar
      Be more eager about setting the 'Invalid' bit on an invalid class · b9b8b81e
      Douglas Gregor authored
      template instantiation. I wasn't able to reproduce this down to
      anything small enough to put in our test suite, but it's "obviously"
      okay to set the invalid bit earlier and precludes a
      known-broken-but-not-marked-broken class from being used elsewhere.
      
      llvm-svn: 159584
      b9b8b81e
    • Dmitri Gribenko's avatar
      Add a new libclang completion API to get brief documentation comment that is · 3292d06a
      Dmitri Gribenko authored
      attached to a declaration in the completion string.
      
      Since extracting comments isn't free, a new code completion option is
      introduced.
      
      A new code completion option that enables including brief comments
      into CodeCompletionString should be a, err, code completion option.
      But because ASTUnit caches global declarations during parsing before
      even completion consumer is created, the option is duplicated as a
      translation unit option (in both libclang and ASTUnit, like the option
      to cache code completion results).
      
      llvm-svn: 159539
      3292d06a
  2. Jun 30, 2012
    • Jordan Rose's avatar
      Add support for the C11 _Alignof keyword. · 58d54720
      Jordan Rose authored
      This behaves like the existing GNU __alignof and C++11 alignof keywords;
      most of the patch is simply adding the third token spelling to various places.
      
      llvm-svn: 159494
      58d54720
  3. Jun 29, 2012
  4. Jun 28, 2012
  5. Jun 27, 2012
  6. Jun 26, 2012
  7. Jun 25, 2012
    • David Blaikie's avatar
      PR12937: Explicitly deleting an explicit template specialization. · 36805521
      David Blaikie authored
      This works around a quirk in the way that explicit template specializations are
      handled in Clang. We generate an implicit declaration from the original
      template which the explicit specialization is considered to redeclare. This
      trips up the explicit delete logic.
      
      This change only works around that strange representation. At some point it'd
      be nice to remove those extra declarations to make the AST more accurately
      reflect the C++ semantics.
      
      Review by Doug Gregor.
      
      llvm-svn: 159167
      36805521
    • Richard Smith's avatar
      Unrevert r158887, reverted in r158949, along with a fix for the bug which · 55ce352d
      Richard Smith authored
      resulted in it being reverted. A test for that bug was added in r158950.
      
      Original comment:
      
      If an object (such as a std::string) with an appropriate c_str() member function
      is passed to a variadic function in a position where a format string indicates
      that c_str()'s return type is desired, provide a note suggesting that the user
      may have intended to call the c_str() member.
      
      Factor the non-POD-vararg checking out of DefaultVariadicArgumentPromotion and
      move it to SemaChecking in order to facilitate this. Factor the call checking
      out of function call checking and block call checking, and extend it to cover
      constructor calls too.
      
      Patch by Sam Panzer!
      
      llvm-svn: 159159
      55ce352d
    • Nico Weber's avatar
      Make explicit specializations at class scope work · 7b5a716f
      Nico Weber authored
      for non-type template parameters in microsoft mode.
      PR12709.
      
      llvm-svn: 159147
      7b5a716f
  8. Jun 23, 2012
  9. Jun 22, 2012
  10. Jun 21, 2012
Loading