Skip to content
  1. Jun 11, 2012
  2. Jun 10, 2012
  3. Jun 09, 2012
  4. Jun 08, 2012
    • Richard Smith's avatar
      PR13051: Only suggest the 'template' and 'operator' keywords when performing · b3a1df03
      Richard Smith authored
      typo-correction after a scope specifier.
      
      llvm-svn: 158231
      b3a1df03
    • Jordan Rose's avatar
      Disallow using ObjC literals in direct comparisons (== and friends). · d49a33e8
      Jordan Rose authored
      Objective-C literals conceptually always create new objects, but may be
      optimized by the compiler or runtime (constant folding, singletons, etc).
      Comparing addresses of these objects is relying on this optimization
      behavior, which is really an implementation detail.
      
      In the case of == and !=, offer a fixit to a call to -isEqual:, if the
      method is available. This fixit is directly on the error so that it is
      automatically applied.
      
      Most of the time, this is really a newbie mistake, hence the fixit.
      
      llvm-svn: 158230
      d49a33e8
    • Jordan Rose's avatar
      If fixits appear to overlap, move the second one over in the output. · b5a94f45
      Jordan Rose authored
      This occurs when you have two insertions and the first one is so long that the
      second fixit's column is before the first fixit ends. The edits themselves
      don't actually overlap, but our command-line preview does.
      
      llvm-svn: 158229
      b5a94f45
    • Richard Smith's avatar
      PR13051: If a constructor is explicitly defaulted, it isn't marked as being · 12f247f4
      Richard Smith authored
      constexpr until we get to the end of the class definition. When that happens,
      be sure to remember that the class actually does have a constexpr constructor.
      
      This is a stopgap solution, which still doesn't cover the case of a class with
      multiple copy constructors (only some of which are constexpr). We should be
      performing constructor lookup when implicitly defining a constructor in order
      to determine whether all constructors it invokes are constexpr.
      
      llvm-svn: 158228
      12f247f4
    • Richard Trieu's avatar
      Remove a commented out variable declaration. This was originally a debugging · 10c92466
      Richard Trieu authored
      variable which wasn't removed when the original patch was committed.
      
      llvm-svn: 158225
      10c92466
    • Anna Zaks's avatar
      [analyzer] MallocSizeofChecker false positive: when sizeof is argument · 528b14c5
      Anna Zaks authored
      to addition.
      
      We should not to warn in case the malloc size argument is an
      addition containing 'sizeof' operator - it is common to use the pattern
      to pack values of different sizes into a buffer. 
      
      Ex:
      
      uint8_t *buffer = (uint8_t*)malloc(dataSize + sizeof(length));
      
      llvm-svn: 158219
      528b14c5
    • Jordan Rose's avatar
      Disable _Pragma during HTML macro rewriting to keep from crashing. · de1a2927
      Jordan Rose authored
      The preprocessor's handling of diagnostic push/pops is stateful, so
      encountering pragmas during a re-parse causes problems. HTMLRewrite
      already filters out normal # directives including #pragma, so it's
      clear it's not expected to be interpreting pragmas in this mode.
      
      This fix adds a flag to Preprocessor to explicitly disable pragmas.
      The "right" fix might be to separate pragma lexing from pragma
      parsing so that we can throw away pragmas like we do preprocessor
      directives, but right now it's important to get the fix in.
      
      Note that this has nothing to do with the "hack" of re-using the
      input preprocessor in HTMLRewrite. Even if we someday copy the
      preprocessor instead of re-using it, the copy would (and should) include
      the diagnostic level tables and have the same problems.
      
      llvm-svn: 158214
      de1a2927
    • Douglas Gregor's avatar
      Switch LineTableInfo to use FileID instead of int for file references, · 02c2dbf4
      Douglas Gregor authored
      from Tom Honermann!
      
      llvm-svn: 158211
      02c2dbf4
Loading