Skip to content
  1. Jun 10, 2012
    • Richard Smith's avatar
      PR12964: __int128 and unsigned __int128 are promoted integral types, be sure to · 521ecc1f
      Richard Smith authored
      consider them when enumerating builtin operator candidates.
      
      llvm-svn: 158293
      521ecc1f
    • Richard Smith's avatar
      Remove CXXRecordDecl flags which are unused after r158289. · 4086a13d
      Richard Smith authored
      We need an efficient mechanism to determine whether a defaulted default
      constructor is constexpr, in order to determine whether a class is a literal
      type, so keep the incrementally-built form on CXXRecordDecl. Remove the
      on-demand computation of same, so that we only have one method for determining
      whether a default constructor is constexpr. This doesn't affect correctness,
      since default constructor lookup is much simpler than selecting a constructor
      for copying or moving.
      
      We don't need a corresponding mechanism for defaulted copy or move constructors,
      since they can't affect whether a type is a literal type. Conversely, checking
      whether such functions are constexpr can require non-trivial effort, so we defer
      such checks until the copy or move constructor is required.
      
      Thus we now only compute whether a copy or move constructor is constexpr on
      demand, and only compute whether a default constructor is constexpr in advance.
      This is unfortunate, but seems like the best solution.
      
      llvm-svn: 158290
      4086a13d
    • Richard Smith's avatar
      Fix PR13052 properly, by performing special member lookup to determine whether · b5800095
      Richard Smith authored
      an explicitly-defaulted default constructor would be constexpr. This is
      necessary in weird (but well-formed) cases where a class has more than one copy
      or move constructor.
      
      Cleanup of now-unused parts of CXXRecordDecl to follow.
      
      llvm-svn: 158289
      b5800095
    • Richard Smith's avatar
      PR13064: Store whether an in-class initializer uses direct or copy · 2b013185
      Richard Smith authored
      initialization, and use that information to produce the right kind of
      initialization during template instantiation.
      
      llvm-svn: 158288
      2b013185
  2. Jun 09, 2012
    • Dmitri Gribenko's avatar
      Convert comments to proper Doxygen comments. · 4280e5cf
      Dmitri Gribenko authored
      llvm-svn: 158241
      4280e5cf
    • Jordan Rose's avatar
      Warn in ObjC++ when an 'auto' variable deduces type 'id'. · d8d56694
      Jordan Rose authored
      This could happen for cases like this:
      
      - (NSArray *)getAllNames:(NSArray *)images {
        NSMutableArray *results = [NSMutableArray array];
        for (auto img in images) {
          [results addObject:img.name];
        }
        return results;
      }
      
      Here the property access will fail because 'img' has type 'id', rather than,
      say, NSImage.
      
      This warning will not fire in templated code, since the 'id' could have
      come from a template parameter.
      
      llvm-svn: 158239
      d8d56694
  3. Jun 08, 2012
  4. Jun 07, 2012
    • Benjamin Kramer's avatar
      Plug a long standing memory leak in TemplateArgument. · 6003ad58
      Benjamin Kramer authored
      The integral APSInt value is now stored in a decomposed form and the backing
      store for large values is allocated via the ASTContext. This way its not
      leaked as TemplateArguments are never destructed when they are allocated in
      the ASTContext. Since the integral data is immutable it is now shared between
      instances, making copying TemplateArguments a trivial operation.
      
      Currently getting the integral data out of a TemplateArgument requires creating
      a new APSInt object. This is cheap when the value is small but can be expensive
      if it's not. If this turns out to be an issue a more efficient accessor could
      be added.
      
      llvm-svn: 158150
      6003ad58
    • Jordan Rose's avatar
      Attach fixits for CFBridgingRetain/Release outside any casts. · aefcedae
      Jordan Rose authored
      Before, the note showed the location where you could insert __bridge variants,
      but the actual fixit edit came after the cast.
      
      No functionality change.
      
      llvm-svn: 158131
      aefcedae
    • Jordan Rose's avatar
      Insert a space if necessary when suggesting CFBridgingRetain/Release. · 288c421b
      Jordan Rose authored
      This was a problem for people who write 'return(result);'
      
      Also fix ARCMT's corresponding code, though there's no test case for this
      because implicit casts like this are rejected by the migrator for being
      ambiguous, and explicit casts have no problem.
      
      <rdar://problem/11577346>
      
      llvm-svn: 158130
      288c421b
  5. Jun 06, 2012
  6. Jun 05, 2012
    • Fariborz Jahanian's avatar
      objective-c: merge deprecated/unavailable attributes to · 3da28f80
      Fariborz Jahanian authored
      the overriding deprecated/unavailable method.
      // rdar://11475360
      
      llvm-svn: 158022
      3da28f80
    • Jordan Rose's avatar
      Teach format string checking about compile-time CFString constants. · 97c6f2b9
      Jordan Rose authored
      Within the guts of CheckFormatHandler, the IsObjCLiteral flag was being used in
      two ways: to see if null bytes were allowed, and to see if the '%@' specifier
      is allowed.* The former usage has been changed to an explicit test and the
      latter pushed down to CheckPrintfHandler and renamed ObjCContext, since it
      applies to CFStrings as well.
      
      * This also changes how wide chars are interpreted; in OS X Foundation, the
      wide character type is 'unichar', a typedef for short, rather than wchar_t.
      
      llvm-svn: 157968
      97c6f2b9
    • Jordan Rose's avatar
      Teach printf/scanf about enums with fixed underlying types. · 98709985
      Jordan Rose authored
      llvm-svn: 157961
      98709985
    • Richard Smith's avatar
      Add a warning for when an array-to-pointer decay is performed on an array · eb3cad53
      Richard Smith authored
      temporary or an array subobject of a class temporary, and the resulting value
      is used to initialize a pointer which outlives the temporary. Such a pointer
      is always left dangling after the initialization completes and the array's
      lifetime ends.
      
      In order to detect this situation, this change also adds an
      LValueClassification of LV_ArrayTemporary for temporaries of array type which
      aren't subobjects of class temporaries. These occur in C++11 T{...} and GNU C++
      (T){...} expressions, when T is an array type. Previously we treated the former
      as a generic prvalue and the latter as a class temporary.
      
      llvm-svn: 157955
      eb3cad53
  7. Jun 04, 2012
  8. Jun 03, 2012
    • Nico Weber's avatar
      Improve fixit for comparison operator on lhs of bitwise operator. · cdfb1ae7
      Nico Weber authored
      Before:
      test.cc:2:18: note: place parentheses around the == expression to silence this warning
        if (0 == flags & 0xdd)
                       ^
                         (   )
      
      Now:
      test.cc:2:18: note: place parentheses around the == expression to silence this warning
        if (0 == flags & 0xdd)
                       ^
            (         )
      
      llvm-svn: 157897
      cdfb1ae7
  9. Jun 02, 2012
  10. Jun 01, 2012
  11. May 31, 2012
  12. May 30, 2012
Loading