- Jul 27, 2011
-
-
Douglas Gregor authored
llvm-svn: 136210
-
John McCall authored
for-in statements; specifically, make sure to close over any temporaries or cleanups it might require. In ARC, this has implications for the lifetime of the collection, so emit it with a retain and release it upon exit from the loop. rdar://problem/9817306 llvm-svn: 136204
-
Francois Pichet authored
In Microsoft mode, if we are within a templated function and we can't resolve Identifier during BuildCXXNestedNameSpecifier, then extend the SS with Identifier. This will have the effect of resolving Identifier during template instantiation. The goal is to be able to resolve a function call whose nested-name-specifier is located inside a dependent base class. class C { public: static void foo2() { } }; template <class T> class A { public: typedef C D; }; template <class T> class B : public A<T> { public: void foo() { D::foo2(); } }; Note that this won't work if the NestedNameSpecifier refers to a type. This fixes 1 error when parsing the MSVC 2010 standard headers file with clang. llvm-svn: 136203
-
Eli Friedman authored
llvm-svn: 136183
-
Jeffrey Yasskin authored
[dcl.init.list] as is possible without generalized initializer lists or full constant expression support, and adds a c++0x-compat warning in C++98 mode. The FixIt currently uses a typedef's basename without qualification, which is likely to be incorrect on some code. If it's incorrect on too much code, we should write a function to get the string that refers to a type from a particular context. The warning is currently off by default. I'll fix LLVM and clang before turning it on. llvm-svn: 136181
-
Eli Friedman authored
I'm not completely sure the standard allows us to reject this, but if it doesn't, it should. :) llvm-svn: 136172
-
Eli Friedman authored
1. Attempting to delete an expression of incomplete class type should be an error, not a warning. 2. If someone tries to delete a pointer to an incomplete class type, make sure we actually emit the delete expression after we warn. llvm-svn: 136161
-
- Jul 26, 2011
-
-
Argyrios Kyrtzidis authored
@interface Foo : NSObject @property (readonly) id myProp; @end @implementation Foo @synthesize myProp; @end t.m:9:13: error: ARC forbids synthesizing a property of an Objective-C object with unspecified storage attribute @synthesize myProp; ^ which is fine, we want the ownership of the synthesized ivar to be explicit. But we should _not_ emit an error for the following cases, because we can get the ownership either from the declared ivar or from the property type: @interface Foo : NSObject { __weak id _myProp1; id myProp2; } @property (readonly) id myProp1; @property (readonly) id myProp2; @property (readonly) __strong id myProp3; @end @implementation Foo @synthesize myProp1 = _myProp1; @synthesize myProp2; @synthesize myProp3; @end  rdar://9844006. llvm-svn: 136155
-
Kaelyn Uhrain authored
llvm-svn: 136113
-
Fariborz Jahanian authored
in few more places and in each instance, fix up the type to the expected type. // rdar://9603056 llvm-svn: 136103
-
Benjamin Kramer authored
llvm-svn: 136092
-
Douglas Gregor authored
provides the partial Objective-C selector used in a code completion. From Connor Wakamo! llvm-svn: 136084
-
Douglas Gregor authored
that allocates an array of objects with a non-trivial destructor, be sure to mark the destructor is "used". Fixes PR10480 / <rdar://problem/9834317>. llvm-svn: 136081
-
Douglas Gregor authored
lifetime-qualified template parameter, ensure that the deduced template argument is a lifetime type. Fixes <rdar://problem/9828157>. llvm-svn: 136078
-
Chandler Carruth authored
refer to 'expansion' instead of 'instantiation'. llvm-svn: 136060
-
Kaelyn Uhrain authored
and to work with pointer arithmetic in addition to array indexing. The new pointer arithmetic porition of the array bounds checking can be turned on by -Warray-bounds-pointer-arithmetic (and is off by default). llvm-svn: 136046
-
Kaelyn Uhrain authored
llvm-svn: 136044
-
- Jul 25, 2011
-
-
Fariborz Jahanian authored
to declare a static object. // rdar://9603056 llvm-svn: 135970
-
Douglas Gregor authored
a cursor reference, from Erik Verbruggen! llvm-svn: 135920
-
Chandler Carruth authored
FullSourceLoc::getInstantiationLoc to ...::getExpansionLoc. This is part of the API and documentation update from 'instantiation' as the term for macros to 'expansion'. llvm-svn: 135914
-
- Jul 24, 2011
-
-
Fariborz Jahanian authored
declared in protocol in the class qualified by the protocol have type conflicts. To reduce amount of noise, this is done when class is implemented. // rdar://9352731 llvm-svn: 135890
-
- Jul 23, 2011
-
-
Douglas Gregor authored
considering explicit conversion operators when determining surrogate functions. Fixes PR10453. Note that there are a few test cases where Clang is still wrong because it does not implement DR899; see PR10456. Patch by Jonathan Sauer! llvm-svn: 135857
-
Chris Lattner authored
llvm-svn: 135855
-
Chris Lattner authored
them into the clang namespace. llvm-svn: 135852
-
- Jul 22, 2011
-
-
David Majnemer authored
IsIntegralPromotion should consider the signedness of FromType when calculating promotions. This, as of now, cannot be exercised on any platform so there is no corresponding test. llvm-svn: 135803
-
John McCall authored
Introduce and document a new objc_returns_inner_pointer attribute, and consume it by performing a retain+autorelease on message receivers when they're not immediately loaded from an object with precise lifetime. llvm-svn: 135764
-
Chandler Carruth authored
AnalysisBasedWarnings Sema layer and out of the Analysis library itself. This returns the uninitialized values analysis to a more pure form, allowing its original logic to correctly detect some categories of definitely uninitialized values. Fixes PR10358 (again). Thanks to Ted for reviewing and updating this patch after his rewrite of several portions of this analysis. llvm-svn: 135748
-
John McCall authored
where it belongs. llvm-svn: 135746
-
John McCall authored
methods, including indirectly overridden methods like those declared in protocols and categories. There are mismatches that we would like to diagnose but aren't yet, but this is fine for now. I looked at approaches that avoided doing this lookup unless we needed it, but the infer-related-result-type checks were doing it anyway, so I left it with the same fast-path check for no previous declartions of that selector. llvm-svn: 135743
-
Jordy Rose authored
This was previously not-const only because it has to lazily construct a chain of ivars the first time it is called (and after the chain is invalidated). In practice, all the clients were just const_casting their const Decls; all those now-unnecessary const_casts have been removed. llvm-svn: 135741
-
Fariborz Jahanian authored
objective-c: Any use of @synthesize or @dynamic lexically after a method (or C function) implementation will be rejected with a compilation error in ARC mode, and a compiler warning otherwise. This may cause breakage in non-arc (and arc) tests which don't expect warning/error. Feel free to fix the tests, or reverse the patch, if I am unavailable. // rdar://9818354 - WIP llvm-svn: 135740
-
- Jul 21, 2011
-
-
Fariborz Jahanian authored
// rdar://9615045 llvm-svn: 135685
-
Fariborz Jahanian authored
a warning flag. // rdar://9615045 llvm-svn: 135681
-
Eric Christopher authored
llvm-svn: 135668
-
Ted Kremenek authored
llvm-svn: 135666
-
Richard Trieu authored
Remove warning for conditional operands of differend signedness from -Wsign-compare. Cases that previously warn on this will have a different warning emitted from -Wsign-conversion. llvm-svn: 135664
-
Douglas Gregor authored
Connor Wakamo! llvm-svn: 135651
-
Alexis Hunt authored
access specifier as public. llvm-svn: 135649
-
Anna Zaks authored
Addressing code review comments for commit 135509 - Add FixItHints in case a C++ function call is missing * or & operators on llvm-svn: 135643
-
Fariborz Jahanian authored
// pr10411 llvm-svn: 135638
-