- Jun 10, 2012
-
-
Craig Topper authored
llvm-svn: 158287
-
Craig Topper authored
llvm-svn: 158286
-
Craig Topper authored
llvm-svn: 158284
-
- Jun 09, 2012
-
-
Benjamin Kramer authored
No functionality change. llvm-svn: 158272
-
Michael J. Spencer authored
While this code is valid C++98, it is not valid C++11. The problem can be reduced to: class MDNode; class DIType { operator MDNode*() const {return 0;} }; class WeakVH { WeakVH(MDNode*) {} }; int main() { DIType di; std::pair<void*, WeakVH> p(std::make_pair((void*)0, di))); } This was not detected by any of the bots we have because they either compile C++98 with libstdc++ (which allows it), or C++11 with libc++ (which incorrectly allows it). I ran into the problem when compiling with VS 2012 RC. Thanks to Richard for explaining the issue. llvm-svn: 158245
-
Dmitri Gribenko authored
to a change done long ago in r57393. llvm-svn: 158243
-
Dmitri Gribenko authored
llvm-svn: 158241
-
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
-
- Jun 08, 2012
-
-
Richard Smith authored
typo-correction after a scope specifier. llvm-svn: 158231
-
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
-
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
-
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
-
Richard Trieu authored
variable which wasn't removed when the original patch was committed. llvm-svn: 158225
-
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
-
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
-
Douglas Gregor authored
from Tom Honermann! llvm-svn: 158211
-
Argyrios Kyrtzidis authored
that does not exist. rdar://11607033 llvm-svn: 158193
-
Argyrios Kyrtzidis authored
AST: For auto-synthesized ivars give them the location of the related property (previously they had no source location). This allows them to be indexed by libclang. libclang: Make sure synthesized ivars are indexed before the methods that may reference them. Fixes rdar://11607001. llvm-svn: 158189
-
Richard Smith authored
definitions of such members are prohibited, not mere declarations. llvm-svn: 158186
-
Kaelyn Uhrain authored
feedback from Doug Gregor. llvm-svn: 158185
-
Richard Smith authored
in the presence of type sugar. llvm-svn: 158184
-
Anna Zaks authored
CmpRuns.py can be used to compare issues from different analyzer runs. Since it uses the issue line number to unique 2 issues, adding a new line to the beginning of a file makes all issues in the file reported as new. The hash will be an opaque value which could be used (along with the function name) by CmpRuns to identify the same issues. This way, we only fail to identify the same issue from two runs if the function it appears in changes (not perfect, but much better than nothing). llvm-svn: 158180
-
Kaelyn Uhrain authored
nested name specifiers in addition to the function's identifier when the correction has a different nested name specifier. llvm-svn: 158178
-
Kaelyn Uhrain authored
correction to use for an invalid function redeclaration. llvm-svn: 158177
-
- Jun 07, 2012
-
-
Anna Zaks authored
I falsely assumed that the memory spaces are equal when we reach this point, they might not be when memory space of one or more is stack or Unknown. We don't want a region from Heap space alias something with another memory space. llvm-svn: 158165
-
Fariborz Jahanian authored
// rdar://11485774 llvm-svn: 158157
-
Douglas Gregor authored
llvm-svn: 158156
-
Fariborz Jahanian authored
sure to emit vla size to prevent an irgen crash. // rdar://11485774 llvm-svn: 158153
-
Benjamin Kramer authored
llvm-svn: 158151
-
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
-
Anna Zaks authored
Add a concept of symbolic memory region belonging to heap memory space. When comparing symbolic regions allocated on the heap, assume that they do not alias. Use symbolic heap region to suppress a common false positive pattern in the malloc checker, in code that relies on malloc not returning the memory aliased to other malloc allocations, stack. llvm-svn: 158136
-
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
-
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
-
Argyrios Kyrtzidis authored
automatically insert a __bridge cast. radar://11560638 llvm-svn: 158127
-
Fariborz Jahanian authored
llvm-svn: 158119
-
Fariborz Jahanian authored
to emit vla size to prevent an irgen crash. // rdar://11485774 llvm-svn: 158117
-
Argyrios Kyrtzidis authored
since the change from +1 to +0 will be handled fine by ARC. rdar://11606358 llvm-svn: 158114
-
- Jun 06, 2012
-
-
Douglas Gregor authored
where '>' is going to behave as an operator (and not as a '>' closing a template argument list). llvm-svn: 158111
-
Kaelyn Uhrain authored
are otherwise too short to try to correct. The TODOs added to two of the tests are for existing deficiencies in the typo correction code that could be exposed by using longer identifiers. llvm-svn: 158109
-
Jordan Rose authored
Patch by Guillem Marpons! llvm-svn: 158106
-