Commit Graph

883 Commits

Author SHA1 Message Date
Manman Ren 7391f7f03c Addressing review comments for r261163.
Use "strict" instead of "nopartial". Also make strictly not-introduced
share the same diagnostics as Obsolete and Unavailable.

rdar://23791325


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261512 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-22 04:47:24 +00:00
Saleem Abdulrasool 1d51805adb Sema: provide an extension warning for enable_if
Clang implements an enable_if attribute as an extension.  Hook up `-Wpedantic`
to issue an extension usage warning when __enable_if__ is used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261192 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-18 06:49:31 +00:00
Manman Ren 83a9e40e5f Add 'nopartial' qualifier for availability attributes.
An optional nopartial can be placed after the platform name.
int bar() __attribute__((availability(macosx,nopartial,introduced=10.12))

When deploying back to a platform version prior to when the declaration was
introduced, with 'nopartial', Clang emits an error specifying that the function
is not introduced yet; without 'nopartial', the behavior stays the same: the
declaration is `weakly linked`.

A member is added to the end of AttributeList to save the location of the
'nopartial' keyword. A bool member is added to AvailabilityAttr.

The diagnostics for 'nopartial' not-yet-introduced is handled in the same way as
we handle unavailable cases.

Reviewed by Doug Gregor and Jordan Rose.

rdar://23791325


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261163 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 22:05:48 +00:00
Benjamin Kramer c563475a9f Fix a leak in the generated code for attributes with strings.
Storing std::strings in attributes simply doesn't work, we never call
the destructor. Use an array of StringRefs instead of std::strings and
copy the data into memory taken from the ASTContext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260831 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 18:11:49 +00:00
Eugene Zelenko 24d973f5ae Fix remaining Clang-tidy readability-redundant-control-flow warnings; other minor fixes.
Differential revision: http://reviews.llvm.org/D17218


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260757 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 22:53:10 +00:00
Denis Zobnin e733f6bc15 Fix for PR8901: attribute "mode" rejected for enums and dependent types.
Allow "mode" attribute for enum types, except for vector modes, for compatibility with GCC.
Support "mode" attribute with dependent types.

Differential Revision: http://reviews.llvm.org/D16219


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259497 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-02 13:50:39 +00:00
Reid Kleckner ba0b391504 Fix attribute((mode([word|unwind_word]))) for x32
Patch by H.J. Lu

```
typedef unsigned int gcc_word __attribute__((mode(word)));
```
and

```
typedef unsigned int gcc_unwind_word __attribute__((mode(unwind_word)));
```
define the largest unsigned integer types which can be stored in a
general purpose register, which may not be the pointer type.  For x32,
they aren't pointer nor unsigned long.  We should

1. Make getUnwindWordWidth and getRegisterWidth virtual,
2. Override them for x32, similar to hasInt128Type.
3. Use getRegisterWidth for __attribute__((mode(word)));

This fixes PR 24706.

Reviewers: rnk

Differential Revision: http://reviews.llvm.org/D16779

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259383 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-01 18:58:24 +00:00
David Majnemer 202433cccd [MS ABI] Allow a member pointers' converted type to change
Member pointers in the MS ABI are tricky for a variety of reasons.
The size of a member pointer is indeterminate until the program reaches
a point where the representation is required to be known.  However,
*pointers* to member pointers may exist without knowing the pointee
type's representation.  In these cases, we synthesize an opaque LLVM
type for the pointee type.

However, we can be in a situation where the underlying member pointer's
representation became known mid-way through the program.  To account for
this, we attempted to manicure CodeGen's type-cache so that we can
replace the opaque member pointer type with the real deal while leaving
the pointer types unperturbed.  This, unfortunately, is a problematic
approach to take as we will violate CodeGen's invariants.

These violations are mostly harmless but let's do the right thing
instead: invalidate the type-cache if a member pointer's LLVM
representation changes.

This fixes PR26313.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258839 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-26 19:30:26 +00:00
Justin Lebar 937c06abd5 [CUDA] Reject the alias attribute in CUDA device code.
Summary: CUDA (well, strictly speaking, NVPTX) doesn't support aliases.

Reviewers: echristo

Subscribers: cfe-commits, jhen, tra

Differential Revision: http://reviews.llvm.org/D16502

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258641 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-23 21:28:10 +00:00
Justin Lebar f946780157 [CUDA] Only allow __global__ on free functions and static member functions.
Summary:
Warn for NVCC compatibility if you declare a static member function or
inline function as __global__.

Reviewers: tra

Subscribers: jhen, echristo, cfe-commits

Differential Revision: http://reviews.llvm.org/D16261

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258263 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-20 00:26:57 +00:00
Aaron Ballman 1d2a84e04f Allow __attribute__((mode)) to appertain to field declarations again. Corrects compile issues with LibreOffice.
Patch by Stephan Bergmann

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258213 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 22:54:26 +00:00
Alexey Bataev 0fb199899e PR26111: segmentation fault with __attribute__((mode(QI))) on function declaration, by Denis Zobnin
Allow "mode" attribute to be applied to VarDecl, not ValueDecl (which includes FunctionDecl and EnumConstantDecl), emit an error if this attribute is used with function declarations and enum constants.
Differential Revision: http://reviews.llvm.org/D16112


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@257868 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 04:36:32 +00:00
Alexey Bataev c08aea954f [X86] Support 'interrupt' attribute for x86
This attribute may be attached to a function definition and instructs the backend to generate appropriate function entry/exit code so that
it can be used directly as an interrupt handler.
The IRET instruction, instead of the RET instruction, is used to return from interrupt or exception handlers. All registers, except for the EFLAGS register which is restored by the IRET instruction, are preserved by the compiler.
Any interruptible-without-stack-switch code must be compiled with -mno-red-zone since interrupt handlers can and will, because of the hardware design, touch
the red zone.

interrupt handler must be declared with a mandatory pointer argument:
struct interrupt_frame;

__attribute__ ((interrupt))
void f (struct interrupt_frame *frame) {
    ...
}
and user must properly define the structure the pointer pointing to.

exception handler: 

The exception handler is very similar to the interrupt handler with a different mandatory function signature:
#ifdef __x86_64__
typedef unsigned long long int uword_t;
#else
typedef unsigned int uword_t;
#endif

struct interrupt_frame;

__attribute__ ((interrupt))
void f (struct interrupt_frame *frame, uword_t error_code) {
    ...
}
and compiler pops the error code off stack before the IRET instruction.

The exception handler should only be used for exceptions which push an error code and all other exceptions must use the interrupt handler.
The system will crash if the wrong handler is used.
Differential Revision: http://reviews.llvm.org/D15709


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@257867 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 04:06:31 +00:00
Justin Lebar a9b21a2f1a [CUDA] Report an error if code tries to mix incompatible CUDA attributes.
Summary: Thanks to jhen for helping me figure this out.

Reviewers: tra, echristo

Subscribers: jhen

Differential Revision: http://reviews.llvm.org/D16129

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@257554 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 01:07:35 +00:00
Alexander Kornienko 769d8f4822 Revert "Fix for merging decls in pragma weak Calling CheckFunctionDeclaration so that 2 decls for the 'weak' are merged. Differential Revision: http://reviews.llvm.org/D13048"
This reverts commit r254143 which introduces a crash on the following input:
  f(char *);
  g(char *);
  #pragma weak f = g
  int g(char *p) {}


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254605 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 11:37:28 +00:00
Alexey Bataev 1f64d37106 PR25575: Make GCC 4.4+ comatible layout for packed bit-fileds of char type, patch by D. Polukhin
This CL is for discussion how to better fix bit-filed layout compatibility issue with GCC (see PR25575 for test case and more details). Current clang behavior is compatible with GCC 4.1-4.3 series but it was fixed in 4.4+. Ignoring packed attribute looks very odd and because it was also fixed in GCC 4.4+, it makes sense also fix it in clang.
Differential Revision: http://reviews.llvm.org/D14872


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254596 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 09:34:49 +00:00
George Burgess IV 7727f3dca1 Add the `pass_object_size` attribute to clang.
`pass_object_size` is our way of enabling `__builtin_object_size` to
produce high quality results without requiring inlining to happen
everywhere.

A link to the design doc for this attribute is available at the
Differential review link below.

Differential Revision: http://reviews.llvm.org/D13263


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254554 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 21:58:08 +00:00
Daniel Sanders 91f593226b [mips] Interrupt attribute support.
Summary: This patch adds support for the interrupt attribute for mips32r2+.

Patch by Simon Dardis.

Reviewers: dsanders, aaron.ballman

Subscribers: aaron.ballman, cfe-commits

Differential Revision: http://reviews.llvm.org/D10802


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254205 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-27 18:03:44 +00:00
Daniel Sanders b4dacc31f3 Revert r254203: [mips] Interrupt attribute support.
I forgot to credit the author.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254204 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-27 18:00:36 +00:00
Daniel Sanders 16e3a3a943 [mips] Interrupt attribute support.
Summary: This patch adds support for the interrupt attribute for mips32r2+.

Reviewers: dsanders, aaron.ballman

Subscribers: aaron.ballman, cfe-commits

Differential Revision: http://reviews.llvm.org/D10802

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254203 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-27 17:39:20 +00:00
Alexander Musman f4db326a17 Fix for merging decls in pragma weak
Calling CheckFunctionDeclaration so that 2 decls for the 'weak' are merged.
Differential Revision: http://reviews.llvm.org/D13048



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254143 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-26 09:34:30 +00:00
Alexey Bataev ad01cf79a7 PR10235: support for vector mode attributes + warning, by Dmitry Polukhin.
Add support for vector mode attributes like "attribute((mode(V4SF)))". Also add warning about deprecated vector modes like GCC does.
Differential Revision: http://reviews.llvm.org/D14744


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253551 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-19 10:13:11 +00:00
Craig Topper 5c9558ca58 [Sema] Minor formatting fixes. NFC
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253314 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 05:40:05 +00:00
Craig Topper ee5949e86b Use Sema::getLocForEndOfToken instead of Preprocessor::getLocForEndOfToken. NFC
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253155 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-15 02:31:46 +00:00
Akira Hatanaka 361b11deda Add support for function attribute 'disable_tail_calls'.
The ``disable_tail_calls`` attribute instructs the backend to not
perform tail call optimization inside the marked function.

For example, 

int callee(int);

int foo(int a) __attribute__((disable_tail_calls)) {
  return callee(a); // This call is not tail-call optimized.
}

Note that this attribute is different from 'not_tail_called', which
prevents tail-call optimization to the marked function.

rdar://problem/8973573

Differential Revision: http://reviews.llvm.org/D12547


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@252986 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 00:42:21 +00:00
Evgeniy Stepanov b964ad11c0 Implement __attribute__((internal_linkage)).
The attrubite is applicable to functions and variables and changes
the linkage of the subject to internal.

This is the same functionality as C-style "static", but applicable to
class methods; and the same as anonymouns namespaces, but can apply
to individual methods of a class.

Following the proposal in
http://lists.llvm.org/pipermail/cfe-dev/2015-October/045580.html

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@252648 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-10 21:28:44 +00:00
Akira Hatanaka 08bdfb571a Add support for function attribute 'not_tail_called'.
This attribute is used to prevent tail-call optimizations to the marked
function. For example, in the following piece of code, foo1 will not be
tail-call optimized: 

int __attribute__((not_tail_called)) foo1(int);

int foo2(int a) {
  return foo1(a); // Tail-call optimization is not performed.
}

The attribute has effect only on statically bound calls. It has no
effect on indirect calls. Also, virtual functions and objective-c
methods cannot be marked as 'not_tail_called'.

rdar://problem/22667622

Differential Revision: http://reviews.llvm.org/D12922


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@252369 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-06 23:56:15 +00:00
Tim Northover b1250fb274 Support tvOS and watchOS availability attributes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251711 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-30 16:30:49 +00:00
John McCall 46c4622350 Refine r251469 to give better (and more localizable) diagnostics
for all the reasons that ARC makes things implicitly unavailable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251496 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-28 05:03:19 +00:00
John McCall 68098861a7 Add the ability to define "fake" arguments on attributes.
Fake arguments are automatically handled for serialization, cloning,
and other representational tasks, but aren't included in pretty-printing
or parsing (should we eventually ever automate that).

This is chiefly useful for attributes that can be written by the
user, but which are also frequently synthesized by the compiler,
and which we'd like to remember details of the synthesis for.
As a simple example, use this to narrow the cases in which we were
generating a specialized note for implicitly unavailable declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251469 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-28 00:17:34 +00:00
John McCall b4f5854951 Be more conservative about diagnosing "incorrect" uses of __weak:
allow them to be written in certain kinds of user declaration and
diagnose on the use-site instead.

Also, improve and fix some diagnostics relating to __weak and
properties.

rdar://23228631

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251384 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-27 04:54:50 +00:00
Aaron Ballman 2b1ded52c2 Amending r249721 to properly handle pathological attribute-related names like __ and ____.
Patch by Adrian Zgorzalek!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249833 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-09 13:53:24 +00:00
Aaron Ballman 5e8b924038 When mapping no_sanitize_* attributes to no_sanitize attributes, handle GNU-style formatting that involves prefix and suffix underscores. Cleans up other usages of similar functionality.
Patch by Adrian Zgorzalek!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249721 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-08 19:24:08 +00:00
Douglas Gregor bd3ba16165 Don't inherit availability information when implementing a protocol requirement.
When an Objective-C method implements a protocol requirement, do not
inherit any availability information from the protocol
requirement. Rather, check that the implementation is not less
available than the protocol requirement, as we do when overriding a
method that has availability. Fixes rdar://problem/22734745.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248949 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-30 21:27:42 +00:00
DeLesley Hutchins 78011164eb Thread Safety Analysis: allow capability attribute on unions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248805 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-29 16:24:18 +00:00
Artem Belevich b7a9667a41 [CUDA] __global__ functions should always be visible externally.
Adjust __global__ functions with DiscardableODR linkage to use
StrongODR linkage instead, so they are visible externally.

Differential Revision: http://reviews.llvm.org/D13067

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248400 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-23 17:44:53 +00:00
Artem Belevich 2ead4d5eab [CUDA] Add implicit __attribute__((used)) to all __global__ functions.
This makes sure that we emit kernels that were instantiated from the
host code and which would never be explicitly referenced by anything
else on device side.

Differential Revision: http://reviews.llvm.org/D11666

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248293 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-22 17:22:51 +00:00
Hans Wennborg faa64297d5 MS ABI: Don't allow dllexport/import on lambdas
This is to follow up on David's comment in
http://reviews.llvm.org/D12422#235509

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247718 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-15 21:05:30 +00:00
Eric Christopher 424a1694ae Fix some coding standard issues and delete a dead conditional.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244959 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-13 21:34:35 +00:00
Daniel Jasper a92ab3bb56 Revert "[CUDA] Add implicit __attribute__((used)) to all __global__ functions."
This is breaking internal test. I'll provide a reproduction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244583 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-11 11:02:09 +00:00
Artem Belevich 830e9302b9 [CUDA] Add implicit __attribute__((used)) to all __global__ functions.
This allows emitting kernels that were instantiated from the host code
and which would never be explicitly referenced otherwise.

Differential Revision: http://reviews.llvm.org/D11666

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244501 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-10 20:57:02 +00:00
David Majnemer a15ae4a506 [Sema] Refactor AddAlignedAttr to reduce indentation
No functionality change intended, just a tidy-up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243242 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-26 09:02:21 +00:00
David Majnemer 22e268be98 [Sema] The alignment of an object has an upper bound from the object file format
Don't use the spelling of the alignment attribute to determine whether
or not an alignment amount makes sense.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243233 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-26 01:48:59 +00:00
Benjamin Kramer af49942c7c [AST] Turn the callbacks of lookupInBases and forallBases into a function_ref
This lets us pass functors (and lambdas) without void * tricks. On the
downside we can't pass CXXRecordDecl's Find* members (which are now type
safe) to lookupInBases directly, but a lambda trampoline is a small
price to pay. No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243217 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-25 15:07:25 +00:00
Bob Wilson 4e5f9fb46e Ignore the "novtable" declspec when not using the Microsoft C++ ABI.
Clang used to silently ignore __declspec(novtable). It is implemented
now, but leaving the vtable uninitialized does not work when using the
Itanium ABI, where the class layout for complex class hierarchies is
stored in the vtable. It might be possible to honor the novtable
attribute in some simple cases and either report an error or ignore
it in more complex situations, but it’s not clear if that would be
worthwhile. There is also value in having a simple and predictable
behavior, so this changes clang to simply ignore novtable when not using
the Microsoft C++ ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@242730 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-20 22:57:31 +00:00
David Majnemer f3e8e6409f [MS Compat] Add support for __declspec(noalias)
The attribute '__declspec(noalias)' communicates that the function only
accesses memory pointed to by its pointer-typed arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@242728 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-20 22:51:52 +00:00
Paul Robinson d574782178 Add a "maximum TLS alignment" characteristic to the target info, so it
can be different from the normal variable maximum.
Add an error diagnostic for when TLS variables exceed maximum TLS alignment.
Currenty only PS4 sets an explicit maximum TLS alignment.

Patch by Charles Li!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@242198 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-14 20:52:32 +00:00
Alex Denisov 3849076ca6 [ObjC] Add NSValue support for objc_boxed_expressions
Patch extends ObjCBoxedExpr to accept records (structs and unions):

typedef struct __attribute__((objc_boxable)) _Color {
  int r, g, b;
} Color;

Color color;
NSValue *boxedColor = @(color); // [NSValue valueWithBytes:&color objCType:@encode(Color)];



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240761 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-26 05:28:36 +00:00
Douglas Gregor 619f53c205 Allow the cf_returns_[not_]retained attributes to appear on out-parameters.
Includes a simple static analyzer check and not much else, but we'll also
be able to take advantage of this in Swift.

This feature can be tested for using __has_feature(cf_returns_on_parameters).

This commit also contains two fixes:
- Look through non-typedef sugar when deciding whether something is a CF type.
- When (cf|ns)_returns(_not)?_retained is applied to invalid properties,
  refer to "property" instead of "method" in the error message.

rdar://problem/18742441

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240185 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-19 23:17:46 +00:00
Alexey Bataev ed0926c176 [ATTRIBUTE] Support base vector types of __attribute__((mode)), patch by Alexey Frolov
Base type of attribute((mode)) can actually be a vector type.
The patch is to distinguish between base type and base element type.

This fixes http://llvm.org/PR17453.
Differential Revision: http://reviews.llvm.org/D10058


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240125 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-19 07:46:21 +00:00