summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjCXX
Commit message (Collapse)AuthorAgeFilesLines
...
* Objective-C: diagnose when synthesizing an ivar ofFariborz Jahanian2013-07-051-0/+4
| | | | | | abstract class type. // rdar://14261999 llvm-svn: 185710
* [Sema] Call CheckParmForFunctionDef on ObjC method parametersReid Kleckner2013-06-241-0/+14
| | | | | | | CheckParmForFunctionDef performs standard checks for type completeness and other things like a destructor check for the MSVC++ ABI. llvm-svn: 184740
* Add missing test.Eli Friedman2013-06-211-0/+11
| | | | llvm-svn: 184515
* Introduce a new mangling for protocol-qualified ObjC types in C++. This allowsEli Friedman2013-06-182-35/+7
| | | | | | | | | | | | to provide proper overloading, and also prevents mangling conflicts with template arguments of protocol-qualified type. This is a non-backward-compatible mangling change, but per discussion with John, the benefits outweigh this cost. Fixes <rdar://problem/14074822>. llvm-svn: 184250
* Fix some confusing diagnostic wording. s/implicit default/implicit/ if we'reRichard Smith2013-06-131-1/+1
| | | | | | not actually talking about a default constructor. llvm-svn: 183885
* Objective-C++ (and c++) Sema: Patch fixes a sema crash when gnu’s ?: ↵Fariborz Jahanian2013-05-171-0/+23
| | | | | | | | | | | extension is used for Objective-C++’s dictionary subscripting. This is done by filtering out all placeholder types before check on lowering of the common expression is done. // rdar://1374918. Reviewed by John McCall. llvm-svn: 182120
* improve of note message and minor refactoring of my lastFariborz Jahanian2013-05-151-1/+1
| | | | | | patch (r181847). llvm-svn: 181896
* Objective-C [diagnostics] [QOI], when method is notFariborz Jahanian2013-05-141-1/+1
| | | | | | | | found for a receiver, note where receiver class is declaraed (this is most common when receiver is a forward class). // rdar://3258331 llvm-svn: 181847
* Grab-bag of bit-field fixes:John McCall2013-05-061-3/+16
| | | | | | | | | | | | | | - References to ObjC bit-field ivars are bit-field lvalues; fixes rdar://13794269, which got me started down this. - Introduce Expr::refersToBitField, switch a couple users to it where semantically important, and comment the difference between this and the existing API. - Discourage Expr::getBitField by making it a bit longer and less general-sounding. - Lock down on const_casts of bit-field gl-values until we hear back from the committee as to whether they're allowed. llvm-svn: 181252
* Extended VerifyDiagnosticConsumer to also verify source file for diagnostic.Andy Gibbs2013-04-171-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VerifyDiagnosticConsumer previously would not check that the diagnostic and its matching directive referenced the same source file. Common practice was to create directives that referenced other files but only by line number, and this led to problems such as when the file containing the directive didn't have enough lines to match the location of the diagnostic in the other file, leading to bizarre file formatting and other oddities. This patch causes VerifyDiagnosticConsumer to match source files as well as line numbers. Therefore, a new syntax is made available for directives, for example: // expected-error@file:line {{diagnostic message}} This extends the @line feature where "file" is the file where the diagnostic is generated. The @line syntax is still available and uses the current file for the diagnostic. "file" can be specified either as a relative or absolute path - although the latter has less usefulness, I think! The #include search paths will be used to locate the file and if it is not found an error will be generated. The new check is not optional: if the directive is in a different file to the diagnostic, the file must be specified. Therefore, a number of test-cases have been updated with regard to this. This closes out PR15613. llvm-svn: 179677
* When checking for illegal expressions in a default-argumentJohn McCall2013-04-091-0/+18
| | | | | | | | expression, look through pseudo-object expressions. rdar://13602832 llvm-svn: 179080
* <rdar://problem/13540921> Fix a crasher when an Objective-C for-in loop gets ↵Douglas Gregor2013-04-081-0/+6
| | | | | | a non-variable iteration declaration. llvm-svn: 179053
* <rdar://problem/13540921> Cope with instantiations of the C++11 range-based ↵Douglas Gregor2013-04-081-0/+8
| | | | | | for loop that end up being Objective-C fast enumeration loops. llvm-svn: 179037
* <rdar://problem/13540921> Cope with deduced 'auto' in a C++11 for-range loop ↵Douglas Gregor2013-04-081-0/+2
| | | | | | that is actually an Objective-C fast enumeration loop. llvm-svn: 179035
* Fold together the two implementations of 6.7.3p2 in SemaType. Fix two bugs, ↵Richard Smith2013-03-281-0/+3
| | | | | | | | | each of which was only present in one version: * Give the right diagnostic for 'restrict' applied to a non-pointer, non-reference type. * Don't reject 'restrict' applied indirectly to an Objective-C object pointer type (eg, through template instantiation). llvm-svn: 178200
* Objective-C: Issue more precise warning when userFariborz Jahanian2013-03-271-2/+2
| | | | | | | is accessing 'isa' as an object pointer. // rdar://13503456. FixIt to follow in another patch. llvm-svn: 178179
* Add a clarifying note when a return statement is rejected becauseJohn McCall2013-03-191-0/+216
| | | | | | | | we expect a related result type. rdar://12493140 llvm-svn: 177378
* Sema: Preserve attributes on parameters in instantiated function templates.Jordan Rose2013-03-081-0/+32
| | | | | | | | | | | | | | | | | | This was causing correctness issues for ARC and the static analyzer when a function template has "consumed" Objective-C object parameters (i.e. parameters that will be released by the function before returning). The fix is threefold: (1) Actually copy over the attributes from old ParmVarDecls to new ones. (2) Have Sema::BuildFunctionType only work for building FunctionProtoTypes, which it was doing anyway. This allows us to pass an ExtProtoInfo instead of a plain ExtInfo and several flags. (3) Drop param attributes as part of StripImplicitInstantiation, which is used when an implicit instantiation is followed by an explicit one. <rdar://problem/12685622> llvm-svn: 176728
* Improve LLDB's implicit cast-to-id to work with C++11 auto and any ↵Douglas Gregor2013-03-071-4/+30
| | | | | | Objective-C object type <rdar://problem/13338107>. llvm-svn: 176665
* Perform non-overload placeholder conversions on the operandsJohn McCall2013-03-041-0/+35
| | | | | | | | to a subscript operator. rdar://13332183 llvm-svn: 176428
* objective-C arc: Diagnostic can not say to use bridgeFariborz Jahanian2013-02-221-0/+9
| | | | | | | casts with c++ named casts. Change notes to say use bridge with c-style cast instead. // rdar://12788838 llvm-svn: 175850
* One can override an Objective-C ARC ownership qualifier that came fromDouglas Gregor2013-01-171-0/+8
| | | | | | | a template parameter; make that also include one that came from 'auto'. Fixes <rdar://problem/12078752>. llvm-svn: 172770
* In Objective-C ARC, completely ignore ownership qualifiers on theDouglas Gregor2013-01-171-0/+9
| | | | | | | | return type of a function by canonicalizing them away. They are useless anyway, and conflict with our rules for template argument deduction and __strong. Fixes <rdar://problem/12367446>. llvm-svn: 172768
* put back diagnostics when flexible members are capturedFariborz Jahanian2013-01-091-2/+3
| | | | | | in lambdas. llvm-svn: 171921
* Remove lambda from my last patch.Fariborz Jahanian2013-01-081-4/+2
| | | | llvm-svn: 171915
* objectiveC blocks: It is impractical to capture Fariborz Jahanian2013-01-081-0/+9
| | | | | | | | struct variables with flexiable array members in blocks (and lambdas). Issue error instead of crashing in IRGen. // rdar://12655829 llvm-svn: 171912
* Fix capitalization of Objective-C in diagnostic.Ted Kremenek2013-01-031-2/+2
| | | | llvm-svn: 171440
* Fix crash-on-invalid. <rdar://problem/12765391>.Eli Friedman2012-11-291-1/+1
| | | | llvm-svn: 168851
* clang/test: Suppress two tests on LLP64 target, Windows x64.NAKAMURA Takumi2012-11-191-0/+2
| | | | llvm-svn: 168303
* Accept and pass arguments to __unknown_anytype in argumentJohn McCall2012-11-141-0/+45
| | | | | | | | | | | | | | | | | | | | | positions of Objective-C methods. It is possible to recover a lot of type information about Objective-C methods from the reflective metadata for their implementations. This information is not rich when it comes to struct types, however, and it is not possible to produce a type in the debugger's round-tripped AST which will really do anything useful during type-checking. Therefore we allow __unknown_anytype in these positions, which essentially disables type-checking for that argument. We infer the parameter type to be the unqualified type of the argument expression unless that expression is an explicit cast, in which case it becomes the type-as-written of that cast. rdar://problem/12565338 llvm-svn: 167896
* Don't try to save the assigned value in a Objective-C property assignmentEli Friedman2012-11-131-0/+23
| | | | | | | | | if the type of the value is a non-trivial class type. Fixes PR14318. (There's a minor ObjC++ language change here: given that we can't save the value, the type of the assignment expression is void in such cases.) llvm-svn: 167884
* Add a simple test involving decltype on Objective-C properties and ivarsDouglas Gregor2012-10-241-0/+25
| | | | llvm-svn: 166562
* Prior to adding the new "expected-no-diagnostics" directive to ↵Andy Gibbs2012-10-1931-0/+31
| | | | | | VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. llvm-svn: 166280
* Fix Objective-C implicit property synthesis for C++ classes so we use valid Eli Friedman2012-10-181-0/+21
| | | | | | | | | | | source locations in places where it is necessary for diagnostics. By itself, this causes assertions, so while I'm here, also fix property synthesis for properties of C++ class type so we use so we properly set up a scope and mark variable declarations. <rdar://problem/12514189>. llvm-svn: 166219
* -Wformat: Don't check format strings in uninstantiated templates.Jordan Rose2012-10-021-0/+81
| | | | | | | | | | | | | Also applies to -Wnonnull, -Wtype-safety, and -Wnon-pod-varargs. All of these can be better checked at instantiation time. This change does not actually affect regular CallExpr function calls, since the checks there only happen after overload resolution. However, it will affect Objective-C method calls. <rdar://problem/12373934> llvm-svn: 164984
* objective-C: remove use of 'ivar' in favor ofFariborz Jahanian2012-09-242-2/+2
| | | | | | | 'instance variable' in text of all diagnostics for objective-C: // rdar://12352442 llvm-svn: 164559
* objective-C: peroform property attribute consistencyFariborz Jahanian2012-09-171-1/+1
| | | | | | | checking on property declared in class extension. // rdar://12214070 llvm-svn: 164053
* Test removed.Fariborz Jahanian2012-09-141-116/+0
| | | | llvm-svn: 163918
* objective-C arc: remove -Warc-abi in its entirety.Fariborz Jahanian2012-09-142-53/+1
| | | | | | // rdar://10554025 llvm-svn: 163917
* In debugger mode, allow comparisons between pointers and integersDouglas Gregor2012-09-141-0/+7
| | | | | | without a cast. Fixes <rdar://problem/11830912>. llvm-svn: 163873
* objective-C++ test for my previous patch.Fariborz Jahanian2012-09-121-0/+11
| | | | | | // rdar://12280826 llvm-svn: 163741
* objective-C: Improving diagnostocs for missing call toFariborz Jahanian2012-09-101-1/+1
| | | | | | super's annotated methods. // rdar://6386358 llvm-svn: 163517
* objective-C: introduce __attribute((objc_requires_super)) on methodFariborz Jahanian2012-09-071-1/+1
| | | | | | | | in classes. Use it to flag those method implementations which don't contain call to 'super' if they have 'super' class and it has the method with this attribute set. This is wip. // rdar://6386358 llvm-svn: 163434
* objective-c++11: c++11 does not change pod-ness whenFariborz Jahanian2012-09-051-0/+12
| | | | | | | | type is an unqualified objc pointer in arc. Treat it just as being treated in c++98. This fixes a bogus vararg warning with -std=c++11. //rdar://12229679 llvm-svn: 163236
* objective-C ARC: under -Wexplicit-ownership-type diagnose thoseFariborz Jahanian2012-08-301-0/+57
| | | | | | | method parameter types which are reference to an objective-C pointer to object with no explicit ownership. // rdar://10907090 llvm-svn: 162959
* When disambiguating an expression-statement from a declaraton-statement, if theRichard Smith2012-08-231-1/+1
| | | | | | | statement starts with an identifier for which name lookup will fail either way, look at later tokens to disambiguate in order to improve error recovery. llvm-svn: 162464
* objective-C++: issue diagnostic when ivar type isFariborz Jahanian2012-08-161-0/+29
| | | | | | an abstract c++ class. // rdar://12095239 llvm-svn: 162052
* objective-C++: dalyed parsing of ctors with memberFariborz Jahanian2012-08-101-0/+14
| | | | | | | initializer list defined inside an objc class implementation. wip llvm-svn: 161699
* objective-C++: delay parsing of ctor with try blockFariborz Jahanian2012-08-101-1/+20
| | | | | | | with member initializer list defined inside an objc implementation block. wip. llvm-svn: 161692
* objective-C++: delayed parsing of member function withFariborz Jahanian2012-08-101-0/+47
| | | | | | | function-try-block occuring in objc's implementation block. wip. llvm-svn: 161675
OpenPOWER on IntegriCloud