summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjCXX
Commit message (Collapse)AuthorAgeFilesLines
* Clean up and slightly generalize implementation of composite pointerRichard Smith2020-01-101-0/+10
| | | | | | | | | | | type computation, in preparation for P0388R4, which adds another few cases here. We now properly handle forming multi-level composite pointer types involving nested Objective-C pointer types (as is consistent with including them as part of the notion of 'similar types' on which this rule is based). We no longer lose non-CVR qualifiers on nested pointer types.
* Add a FIXME and corresponding test coverage for some suspicious behaviorRichard Smith2020-01-101-0/+29
| | | | forming composite ObjC pointer types in comparisons.
* CWG2352: Allow qualification conversions during reference binding.Richard Smith2020-01-091-0/+30
| | | | | | | | | | | | | | | | | | | | | | The language wording change forgot to update overload resolution to rank implicit conversion sequences based on qualification conversions in reference bindings. The anticipated resolution for that oversight is implemented here -- we order candidates based on qualification conversion, not only on top-level cv-qualifiers, including ranking reference bindings against non-reference bindings if they differ in non-top-level qualification conversions. For OpenCL/C++, this allows reference binding between pointers with differing (nested) address spaces. This makes the behavior of reference binding consistent with that of implicit pointer conversions, as is the purpose of this change, but that pre-existing behavior for pointer conversions is itself probably not correct. In any case, it's now consistently the same behavior and implemented in only one place. This reinstates commit de21704ba96fa80d3e9402f12c6505917a3885f4, reverted in commit d8018233d1ea4234de68d5b4593abd773db79484, with workarounds for some overload resolution ordering problems introduced by CWG2352.
* Revert "CWG2352: Allow qualification conversions during reference binding."David Blaikie2019-12-271-30/+0
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit de21704ba96fa80d3e9402f12c6505917a3885f4. Regressed/causes this to error due to ambiguity: void f(const int * const &); void f(int *); int main() { int * x; f(x); } (in case it's important - the original case where this turned up was a member function overload in a class template with, essentially: f(const T1&) f(T2*) (where T1 == X const *, T2 == X)) It's not super clear to me if this ^ is expected behavior, in which case I'm sorry about the revert & happy to look into ways to fix the original code.
* CWG2352: Allow qualification conversions during reference binding.Richard Smith2019-12-191-0/+30
| | | | | | | | | | | | | | | The language wording change forgot to update overload resolution to rank implicit conversion sequences based on qualification conversions in reference bindings. The anticipated resolution for that oversight is implemented here -- we order candidates based on qualification conversion, not only on top-level cv-qualifiers. For OpenCL/C++, this allows reference binding between pointers with differing (nested) address spaces. This makes the behavior of reference binding consistent with that of implicit pointer conversions, as is the purpose of this change, but that pre-existing behavior for pointer conversions is itself probably not correct. In any case, it's now consistently the same behavior and implemented in only one place.
* [ObjC] Diagnose implicit type coercion from ObjC 'Class' to objectJames Y Knight2019-10-174-30/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pointer types. For example, in Objective-C mode, the initialization of 'x' in: ``` @implementation MyType + (void)someClassMethod { MyType *x = self; } @end ``` is correctly diagnosed with an incompatible-pointer-types warning, but in Objective-C++ mode, it is not diagnosed at all -- even though incompatible pointer conversions generally become an error in C++. This patch fixes that oversight, allowing implicit conversions involving Class only to/from unqualified-id, and between qualified and unqualified Class, where the protocols are compatible. Note that this does change some behaviors in Objective-C, as well, as shown by the modified tests. Of particular note is that assignment from from 'Class<MyProtocol>' to 'id<MyProtocol>' now warns. (Despite appearances, those are not compatible types. 'Class<MyProtocol>' is not expected to have instance methods defined by 'MyProtocol', while 'id<MyProtocol>' is.) Differential Revision: https://reviews.llvm.org/D67983 llvm-svn: 375125
* [ObjC] Add some additional test cases around pointer conversions.James Y Knight2019-10-174-2/+225
| | | | | | | | | | | | | This is especially important for Objective-C++, which is entirely missing this testing at the moment. This annotates with "FIXME" the cases which I change in the next patch -- I primarily wanted to document the current state of things so that the effect of the code change is made clear. Differential Revision: https://reviews.llvm.org/D67982 llvm-svn: 375124
* [c++20] Implement semantic restrictions for C++20 designatedRichard Smith2019-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initializers. This has some interesting interactions with our existing extensions to support C99 designated initializers as an extension in C++. Those are resolved as follows: * We continue to permit the full breadth of C99 designated initializers in C++, with the exception that we disallow a partial overwrite of an initializer with a non-trivially-destructible type. (Full overwrite is OK, because we won't run the first initializer at all.) * The C99 extensions are disallowed in SFINAE contexts and during overload resolution, where they could change the meaning of valid programs. * C++20 disallows reordering of initializers. We only check for that for the simple cases that the C++20 rules permit (designators of the form '.field_name =' and continue to allow reordering in other cases). It would be nice to improve this behavior in future. * All C99 designated initializer extensions produce a warning by default in C++20 mode. People are going to learn the C++ rules based on what Clang diagnoses, so it's important we diagnose these properly by default. * In C++ <= 17, we apply the C++20 rules rather than the C99 rules, and so still diagnose C99 extensions as described above. We continue to accept designated C++20-compatible initializers in C++ <= 17 silently by default (but naturally still reject under -pedantic-errors). This is not a complete implementation of P0329R4. In particular, that paper introduces new non-C99-compatible syntax { .field { init } }, and we do not support that yet. This is based on a previous patch by Don Hinton, though I've made substantial changes when addressing the above interactions. Differential Revision: https://reviews.llvm.org/D59754 llvm-svn: 370544
* If capturing a variable fails, add a capture anyway (and mark itRichard Smith2019-05-281-2/+3
| | | | | | invalid) so that we can avoid repeated diagnostics for the same capture. llvm-svn: 361891
* Recommit r359859 "[Attribute/Diagnostics] Print macro if definition is an ↵Leonard Chan2019-05-071-2/+2
| | | | | | | | attribute declaration" Updated with fix for read of uninitialized memory. llvm-svn: 360109
* Revert "[Attribute/Diagnostics] Print macro if definition is an attribute ↵Leonard Chan2019-05-031-2/+2
| | | | | | | | declaration" This reverts commit fc40cbd9d8c63e65eed3590ba925321afe782e1d. llvm-svn: 359859
* [Attribute/Diagnostics] Print macro if definition is an attribute declarationLeonard Chan2019-05-021-2/+2
| | | | | | | | | | | | | If an address_space attribute is defined in a macro, print the macro instead when diagnosing a warning or error for incompatible pointers with different address_spaces. We allow this for all attributes (not just address_space), and for multiple attributes declared in the same macro. Differential Revision: https://reviews.llvm.org/D51329 llvm-svn: 359826
* [Sema][ObjC] Don't warn about an implicitly retained self if theAkira Hatanaka2019-04-171-0/+42
| | | | | | | | | | | | | | | | | retaining block and all of the enclosing blocks are non-escaping. If the block implicitly retaining self doesn't escape, there is no risk of creating retain cycles, so clang shouldn't diagnose it and force users to add self-> to silence the diagnostic. Also, fix a bug where clang was failing to diagnose an implicitly retained self inside a c++ lambda nested inside a block. rdar://problem/25059955 Differential Revision: https://reviews.llvm.org/D60736 llvm-svn: 358624
* Thread Safety: also look at ObjC methodsJF Bastien2019-03-253-17/+33
| | | | | | | | | | | | | | | | | Summary: SExprBuilder::translateDeclRefExpr was only looking at FunctionDecl and not also looking at ObjCMethodDecl. It should consider both because the attributes can be used on Objective-C as well. <rdar://problem/48941331> Reviewers: dexonsmith, erik.pilkington Subscribers: jkorous, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59523 llvm-svn: 356940
* [Sema] Deduplicate some availability checking logicErik Pilkington2019-03-201-3/+3
| | | | | | | | | | | | | | | Before this commit, we emit unavailable errors for calls to functions during overload resolution, and for references to all other declarations in DiagnoseUseOfDecl. The early checks during overload resolution aren't as good as the DiagnoseAvailabilityOfDecl based checks, as they error on the code from PR40991. This commit fixes this by removing the early checking. llvm.org/PR40991 rdar://48564179 Differential revision: https://reviews.llvm.org/D59394 llvm-svn: 356599
* [ObjC] Emit a boxed expression as a compile-time constant if theAkira Hatanaka2019-03-081-0/+8
| | | | | | | | | | | | | | | | | | expression inside the parentheses is a valid UTF-8 string literal. Previously clang emitted an expression like @("abc") as a message send to stringWithUTF8String. This commit makes clang emit the boxed expression as a compile-time constant instead. This commit also has the effect of silencing the nullable-to-nonnull conversion warning clang started emitting after r317727, which originally motivated this commit (see https://oleb.net/2018/@keypath). rdar://problem/42684601 Differential Revision: https://reviews.llvm.org/D58729 llvm-svn: 355662
* expected-no-diagnostics@ does not make sense, switching to a more idiomatic ↵Aaron Ballman2019-03-071-2/+4
| | | | | | form; NFC. llvm-svn: 355601
* [Sema][ObjC] Allow declaring ObjC pointer members with non-trivialAkira Hatanaka2019-02-022-2/+159
| | | | | | | | | | | | | | | ownership qualifications in C++ unions under ARC. An ObjC pointer member with non-trivial ownership qualifications causes all of the defaulted special functions of the enclosing union to be defined as deleted, except when the member has an in-class initializer, the default constructor isn't defined as deleted. rdar://problem/34213306 Differential Revision: https://reviews.llvm.org/D57438 llvm-svn: 352949
* [Sema][ObjC] Check whether a DelayedDiagnosticPool has been pushedAkira Hatanaka2019-01-231-0/+10
| | | | | | | | | | | before adding a delayed diagnostic to DelayedDiagnostics. This fixes an assertion failure in Sema::DelayedDiagnostics::add that was caused by the changes made in r141037. rdar://problem/42782323 llvm-svn: 351911
* Distinguish `__block` variables that are captured by escaping blocksAkira Hatanaka2018-10-012-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | from those that aren't. This patch changes the way __block variables that aren't captured by escaping blocks are handled: - Since non-escaping blocks on the stack never get copied to the heap (see https://reviews.llvm.org/D49303), Sema shouldn't error out when the type of a non-escaping __block variable doesn't have an accessible copy constructor. - IRGen doesn't have to use the specialized byref structure (see https://clang.llvm.org/docs/Block-ABI-Apple.html#id8) for a non-escaping __block variable anymore. Instead IRGen can emit the variable as a normal variable and copy the reference to the block literal. Byref copy/dispose helpers aren't needed either. This reapplies r343518 after fixing a use-after-free bug in function Sema::ActOnBlockStmtExpr where the BlockScopeInfo was dereferenced after it was popped and deleted. rdar://problem/39352313 Differential Revision: https://reviews.llvm.org/D51564 llvm-svn: 343542
* Revert r343518.Akira Hatanaka2018-10-012-32/+1
| | | | | | | | | Bots are still failing. http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/24420 http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/12958 llvm-svn: 343531
* Distinguish `__block` variables that are captured by escaping blocksAkira Hatanaka2018-10-012-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from those that aren't. This patch changes the way __block variables that aren't captured by escaping blocks are handled: - Since non-escaping blocks on the stack never get copied to the heap (see https://reviews.llvm.org/D49303), Sema shouldn't error out when the type of a non-escaping __block variable doesn't have an accessible copy constructor. - IRGen doesn't have to use the specialized byref structure (see https://clang.llvm.org/docs/Block-ABI-Apple.html#id8) for a non-escaping __block variable anymore. Instead IRGen can emit the variable as a normal variable and copy the reference to the block literal. Byref copy/dispose helpers aren't needed either. This reapplies r341754, which was reverted in r341757 because it broke a couple of bots. r341754 was calling markEscapingByrefs after the call to PopFunctionScopeInfo, which caused the popped function scope to be cleared out when the following code was compiled, for example: $ cat test.m struct A { id data[10]; }; void foo() { __block A v; ^{ (void)v; }; } This commit calls markEscapingByrefs before calling PopFunctionScopeInfo to prevent that from happening. rdar://problem/39352313 Differential Revision: https://reviews.llvm.org/D51564 llvm-svn: 343518
* [cxx2a] P0614R1: Support init-statements in range-based for loops.Richard Smith2018-09-281-0/+8
| | | | | | | We don't yet support this for the case where a range-based for loop is implicitly rewritten to an ObjC for..in statement. llvm-svn: 343350
* Thread safety analysis: Handle ObjCIvarRefExpr in SExprBuilder::translateAaron Puchert2018-09-191-0/+44
| | | | | | | | | | | | | | | | | Summary: This imitates the code for MemberExpr. Fixes PR38896. Reviewers: aaron.ballman, delesley, lukasza, rjmccall Reviewed By: delesley Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D52200 llvm-svn: 342600
* Revert r341754.Akira Hatanaka2018-09-092-32/+1
| | | | | | | | | The commit broke a couple of bots: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/12347 http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/7310 llvm-svn: 341757
* Distinguish `__block` variables that are captured by escaping blocksAkira Hatanaka2018-09-082-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | from those that aren't. This patch changes the way __block variables that aren't captured by escaping blocks are handled: - Since non-escaping blocks on the stack never get copied to the heap (see https://reviews.llvm.org/D49303), Sema shouldn't error out when the type of a non-escaping __block variable doesn't have an accessible copy constructor. - IRGen doesn't have to use the specialized byref structure (see https://clang.llvm.org/docs/Block-ABI-Apple.html#id8) for a non-escaping __block variable anymore. Instead IRGen can emit the variable as a normal variable and copy the reference to the block literal. Byref copy/dispose helpers aren't needed either. rdar://problem/39352313 Differential Revision: https://reviews.llvm.org/D51564 llvm-svn: 341754
* [Sema] Relax a failing assert in TemplateArgumentLocErik Pilkington2018-07-311-0/+7
| | | | | | | | | | | | | Any of these template argument kinds can be represented with an expression, so accept them in this constructor. Patch by Balaji Iyer! rdar://41459965 Differential revision: https://reviews.llvm.org/D49766 llvm-svn: 338338
* [Sema][ObjC] Warn when a method declared in a protocol takes aAkira Hatanaka2018-07-281-0/+39
| | | | | | | | | | | non-escaping parameter but the implementation's method takes an escaping parameter. rdar://problem/39548196 Differential Revision: https://reviews.llvm.org/D49119 llvm-svn: 338189
* [Sema] Produce diagnostics for attribute 'trivial_abi' that appearsAkira Hatanaka2018-06-191-0/+4
| | | | | | | | | | | | after the closing brace of a class declaration. Merge the two call sites of checkIllFormedTrivialABIStruct and sink it into CheckCompletedCXXClass so that it is called after the attribute has been attached to the CXXRecordDecl. rdar://problem/40873297 llvm-svn: 335021
* Improve diagnostics and error recovery for template name lookup.Richard Smith2018-05-111-1/+1
| | | | | | | | | | | | | For 'x::template y', consistently give a "no member named 'y' in 'x'" diagnostic if there is no such member, and give a 'template keyword not followed by a template' name error if there is such a member but it's not a template. In the latter case, add a note pointing at the non-template. Don't suggest inserting a 'template' keyword in 'X::Y<' if X is dependent if the lookup of X::Y was actually not a dependent lookup and found only non-templates. llvm-svn: 332076
* [Sema][ObjC] Ensure that the return type of an ObjC method is a completeAkira Hatanaka2018-04-121-3/+5
| | | | | | | | | | | | type. Copy the code in ActOnStartOfFunctionDef that checks a function's return type to ActOnStartOfObjCMethodDef. This fixes an assertion failure in IRGen caused by an uninstantiated return type. rdar://problem/38691818 llvm-svn: 329879
* Add support for attribute 'trivial_abi'.Akira Hatanaka2018-02-051-0/+93
| | | | | | | | | | | | | | | | | | | | | | | | | The 'trivial_abi' attribute can be applied to a C++ class, struct, or union. It makes special functions of the annotated class (the destructor and copy/move constructors) to be trivial for the purpose of calls and, as a result, enables the annotated class or containing classes to be passed or returned using the C ABI for the underlying type. When a type that is considered trivial for the purpose of calls despite having a non-trivial destructor (which happens only when the class type or one of its subobjects is a 'trivial_abi' class) is passed to a function, the callee is responsible for destroying the object. For more background, see the discussions that took place on the mailing list: http://lists.llvm.org/pipermail/cfe-dev/2017-November/055955.html http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20180101/thread.html#214043 rdar://problem/35204524 Differential Revision: https://reviews.llvm.org/D41039 llvm-svn: 324269
* Re-commit r321223, which adds a printing policy to the ASTDumper.Aaron Ballman2017-12-211-16/+16
| | | | | | | | This allows you to dump C++ code that spells bool instead of _Bool, leaves off the elaborated type specifiers when printing struct or class names, and other C-isms. Fixes the -Wreorder issue and fixes the ast-dump-color.cpp test. llvm-svn: 321310
* Reverting r321223 and its follow-up commit because of failing bots due to ↵Aaron Ballman2017-12-201-16/+16
| | | | | | Misc/ast-dump-color.cpp. llvm-svn: 321229
* Add a printing policy to the ASTDumper.Aaron Ballman2017-12-201-16/+16
| | | | | | This allows you to dump C++ code that spells bool instead of _Bool, leaves off the elaborated type specifiers when printing struct or class names, and other C-isms. llvm-svn: 321223
* [ObjC++] Don't warn about pessimizing move for __block variablesAlex Lorenz2017-11-071-0/+43
| | | | | | rdar://33316951 llvm-svn: 317620
* Typo correct the condition of 'do-while' before exiting its scopeAlex Lorenz2017-10-301-1/+33
| | | | | | rdar://35172419 llvm-svn: 316966
* [Sema][ObjC] Look for either objc_bridge or objc_bridge_mutable whenAkira Hatanaka2017-10-242-0/+18
| | | | | | | | | | | | determining whether a RecordDecl is CFError. CFErrorRef used to be declared with "objc_bridge(NSError)" but is now declared with "objc_bridge_mutable(NSError)". Look for either when checking whether a RecordDecl is CFError. rdar://problem/35034779 llvm-svn: 316531
* [Sema] Add support for flexible array members in Obj-C.Volodymyr Sapsai2017-10-231-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow Obj-C ivars with incomplete array type but only as the last ivar. Also add a requirement for ivars that contain a flexible array member to be at the end of class too. It is possible to add in a subclass another ivar at the end but we'll emit a warning in this case. Also we'll emit a warning if a variable sized ivar is declared in class extension or in implementation because subclasses won't know they should avoid adding new ivars. In ARC incomplete array objects are treated as __unsafe_unretained so require them to be marked as such. Prohibit synthesizing ivars with flexible array members because order of synthesized ivars is not obvious and tricky to control. Spelling out ivar explicitly gives control to developers and helps to avoid surprises with unexpected ivar ordering. For C and C++ changed diagnostic to tell explicitly a field is not the last one and point to the next field. It is not as useful as in Obj-C but it is an improvement and it is consistent with Obj-C. For C for unions emit more specific err_flexible_array_union instead of generic err_field_incomplete. rdar://problem/21054495 Reviewers: rjmccall, theraven Reviewed By: rjmccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D38773 llvm-svn: 316381
* [Sema] Put nullability fix-it after the end of the pointer.Volodymyr Sapsai2017-09-281-1/+1
| | | | | | | | | | | | | | | | | | Fixes nullability fix-it for `id<SomeProtocol>`. With this change nullability specifier is inserted after ">" instead of between "id" and "<". rdar://problem/34260995 Reviewers: jordan_rose, doug.gregor, ahatanak, arphaman Reviewed By: jordan_rose Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D38327 llvm-svn: 314473
* Add test cases that weren't committed in r313945.Akira Hatanaka2017-09-221-0/+90
| | | | llvm-svn: 313952
* Revert "Add support for attribute 'noescape'."Akira Hatanaka2017-09-201-90/+0
| | | | | | | | | | This reverts commit r313722. It looks like compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc cannot be compiled because some of the functions declared in the file do not match the ones in the SDK headers (which are annotated with 'noescape'). llvm-svn: 313725
* Add support for attribute 'noescape'.Akira Hatanaka2017-09-201-0/+90
| | | | | | | | | | | | | | | The attribute informs the compiler that the annotated pointer parameter of a function cannot escape and enables IRGen to attach attribute 'nocapture' to parameters that are annotated with the attribute. That is the only optimization that currently takes advantage of 'noescape', but there are other optimizations that will be added later that improves IRGen for ObjC blocks. rdar://problem/19886775 Differential Revision: https://reviews.llvm.org/D32210 llvm-svn: 313722
* Revert "Add support for attribute 'noescape'."Akira Hatanaka2017-09-201-90/+0
| | | | | | | | This reverts r313717. I closed the wrong phabricator review. llvm-svn: 313721
* Add support for attribute 'noescape'.Akira Hatanaka2017-09-201-0/+90
| | | | | | | | | | | | | | | The attribute informs the compiler that the annotated pointer parameter of a function cannot escape and enables IRGen to attach attribute 'nocapture' to parameters that are annotated with the attribute. That is the only optimization that currently takes advantage of 'noescape', but there are other optimizations that will be added later that improves IRGen for ObjC blocks. rdar://problem/19886775 Differential Revision: https://reviews.llvm.org/D32520 llvm-svn: 313720
* [Sema] Correct typos in LHS, RHS before building a binop expression.Volodymyr Sapsai2017-09-151-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifically, typo correction should be done before dispatching between different kinds of binary operations like pseudo-object assignment, overloaded binary operation, etc. Without this change we hit an assertion Assertion failed: (!LHSExpr->hasPlaceholderType(BuiltinType::PseudoObject)), function CheckAssignmentOperands when in Objective-C we reference a property without `self` and there are 2 equally good typo correction candidates: ivar and a class name. In this case LHS expression in `BuildBinOp` is CXXDependentScopeMemberExpr `-TypoExpr and instead of handling Obj-C property assignment as pseudo-object assignment, we call `CreateBuiltinBinOp` which corrects typo to ObjCPropertyRefExpr '<pseudo-object type>' but cannot handle pseudo-objects and asserts about it (indirectly, through `CheckAssignmentOperands`). rdar://problem/33102722 Reviewers: rsmith, ahatanak, majnemer Reviewed By: ahatanak Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D37322 llvm-svn: 313323
* Fix errored return value in CheckFunctionReturnType and add a fixit hintErich Keane2017-05-101-0/+7
| | | | | | | | | | | As discovered by ChenWJ and listed on cfe-dev, the error for Objective C return type ended up being wrong. This fixes that. Additionally, as a "while we're there", the other usages of this error and the usage of the FP above both use a FixItHint, so I'll add it here. Differential Revision: https://reviews.llvm.org/D32759 llvm-svn: 302720
* [Sema] Objective-C++ support for type trait __is_base_ofErik Pilkington2017-05-101-0/+25
| | | | | | | | rdar://24308607 Differential revision: https://reviews.llvm.org/D32891 llvm-svn: 302695
* Reusing an existing attribute diagnosticOren Ben Simhon2017-05-031-1/+1
| | | | | | | | | In a previous patch, a new generic error diagnostic for inconsistent attributes was added. In this commit I reuse this diagnostic for ns_returns_retained attribute check. Differential Revision: https://reviews.llvm.org/D32697 llvm-svn: 302024
* Sema: protect against ObjC++ typo-correction failureSaleem Abdulrasool2017-04-201-0/+9
| | | | | | | | | ObjC++ has two different types of "pointer" types (ObjCClassPointerType and PointerType). Both can be indirected through. However, the former is not a member expression. Ensure that we do not try to rebuild the MRE in that case. llvm-svn: 300909
OpenPOWER on IntegriCloud