| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
per Jordan's review.
llvm-svn: 197540
|
| |
|
|
|
|
| |
a category implementation. // rdar://15397430
llvm-svn: 197534
|
| |
|
|
|
|
|
|
| |
when diagnosing casting of a cstring literal to
NSString in default and -fobjc-arc mode.
// rdar://14106083
llvm-svn: 197515
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We would previously emit redundant diagnostics for the following code:
struct S {
virtual ~S() = delete;
void operator delete(void*, int);
void operator delete(void*, double);
} s;
First we would check on ~S() and error about the ambigous delete functions,
and then we would error about using the deleted destructor.
If the destructor is deleted, there's no need to check it.
Also, move the check from Sema::ActOnFields to CheckCompleteCXXClass. These
are run at almost the same time, called from ActOnFinishCXXMemberSpecification.
However, CHeckCompleteCXXClass may mark a defaulted destructor as deleted, and
if that's the case we don't want to check it.
Differential Revision: http://llvm-reviews.chandlerc.com/D2421
llvm-svn: 197509
|
| |
|
|
|
|
|
|
|
|
| |
of objc_bridge_related attribute; eliminate
unnecessary diagnostics which is issued elsewhere,
fixit now produces a valid AST tree per convention.
This results in some simplification in handling of
this attribute as well. // rdar://15499111
llvm-svn: 197436
|
| |
|
|
|
|
|
|
|
| |
This reverts commit 2b43f500cfea10a8c59c986dcfc24fd08eecc77d.
This was accidentally committed because I failed to notice my client
wasn't clean prior to submitting a fix for a crasher.
llvm-svn: 197410
|
| |
|
|
|
|
|
|
| |
CXXScopeSpec when necessary while performing typo correction. This fixes
the crash reported in PR18213 (the problem existed since r185487, and
r193020 made it easier to hit).
llvm-svn: 197409
|
| |
|
|
| |
llvm-svn: 197408
|
| |
|
|
|
|
|
|
|
|
| |
attributes via the ParseKind field. Attributes will be given a common parsed attribute identifier (the AttributeList::AT_* enum), but retain distinct Attr subclasses.
This new functionality is used to implement the ARM and MSP430 interrupt attribute.
Patch reviewed by Richard Smith over IRC.
llvm-svn: 197343
|
| |
|
|
|
|
|
|
|
|
| |
is specialized by an explicit specialization, start from the first declaration
in case we've got a member of a class template (redeclarations might not number
the template parameters the same way).
Our recover here is still far from ideal.
llvm-svn: 197305
|
| |
|
|
|
|
| |
class templates (a Microsoft extension).
llvm-svn: 197298
|
| |
|
|
| |
llvm-svn: 197274
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's nothing special about type traits accepting two arguments.
This commit eliminates BinaryTypeTraitExpr and switches all related handling
over to TypeTraitExpr.
Also fixes a CodeGen failure with variadic type traits appearing in a
non-constant expression.
The BTT/TT prefix and evaluation code is retained as-is for now but will soon
be further cleaned up.
This is part of the ongoing work to unify type traits.
llvm-svn: 197273
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
property declaration has a memory management
attribute (retain, copy, etc.). Sich properties
are usually overridden to become 'readwrite'
via a class extension (which require the memory
management attribute specified). In the absence of class
extension override, memory management attribute is
needed to produce correct Code Gen. for the
property getter in any case and this warning becomes
confusing to user. // rdar://15641300
llvm-svn: 197251
|
| |
|
|
|
|
|
|
| |
are used on non-kernel functions.
Reviewed by Aaron over IRC!
llvm-svn: 197243
|
| |
|
|
|
|
| |
handle indirect protocols.
llvm-svn: 197209
|
| |
|
|
| |
llvm-svn: 197208
|
| |
|
|
|
|
|
|
|
| |
the protocol.
This removes an extra "note:", which wasn't really all that more useful
and overall reduces the diagnostic spew for this case.
llvm-svn: 197207
|
| |
|
|
| |
llvm-svn: 197206
|
| |
|
|
|
|
|
|
|
| |
superclass are,
assume that a [super init..] inside a designated initializer also refers to a designated one
and do not warn.
llvm-svn: 197202
|
| |
|
|
|
|
|
|
| |
property and protocol name.
Implements <rdar://problem/15617839>.
llvm-svn: 197187
|
| |
|
|
|
|
|
|
| |
The check for bitfields that are longer than their base type needed to
be checked in microsoft mode (cl.exe does not support the C++ extnetion
for bitfields longer than their type).
llvm-svn: 197186
|
| |
|
|
| |
llvm-svn: 197185
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Type trait parsing is all over the place at the moment with unary, binary and
n-ary C++11 type traits that were developed independently at different points
in clang's history.
There's no good reason to handle them separately -- there are three parsers,
three AST nodes and lots of duplicated handling code with slightly different
implementations and diags for each kind.
This commit unifies parsing of type traits and sets the stage for further
consolidation.
No change in behaviour other than more consistent error recovery.
llvm-svn: 197179
|
| |
|
|
|
|
|
|
| |
Thanks to Jonathan Sauer for providing initial test cases.
Fixes PR16093 and PR18147.
llvm-svn: 197150
|
| |
|
|
|
|
|
| |
conversion on the LHS of a .* or ->*. Slightly improve diagnostics in case
of an ambiguous base class.
llvm-svn: 197125
|
| |
|
|
|
|
| |
more consistent with other attributes.
llvm-svn: 197104
|
| |
|
|
|
|
|
|
|
| |
declarations that might lifetime-extend multiple temporaries. In passing, fix a
crasher (PR18217) if an initializer was dependent and exactly the wrong shape,
and remove a bogus function (Expr::findMaterializedTemporary) now its last use
is gone.
llvm-svn: 197103
|
| |
|
|
|
|
| |
except for GNU attributes, or C++11-style attributes in the GNU namespace. This prevents attributes such as __declspec(__dllexport__) or [[__noreturn__]] from being treated as known attributes.
llvm-svn: 197082
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Methods are thiscall by default in the MS ABI, and also in MinGW targetting GCC 4.7 or later.
This changes the diagnostic from the technically correct but hard to understand:
virtual function 'foo' has different calling convention attributes ('void ()') than the function it overrides (which has calling convention 'void () __attribute__((thiscall))')
to the more intuitive and also correct:
'static' member function 'foo' overrides a virtual function
We already have a test for this. Let's just run it in both ABI modes.
Differential Revision: http://llvm-reviews.chandlerc.com/D2375
llvm-svn: 197055
|
| |
|
|
|
|
|
|
|
|
| |
With the introduction of explicit address space casts into LLVM, there's
a need to provide a new cast kind the front-end can create for C/OpenCL/CUDA
and code to produce address space casts from those kinds when appropriate.
Patch by Michele Scandale!
llvm-svn: 197036
|
| |
|
|
|
|
| |
any local extern declaration, not just a local extern function.
llvm-svn: 197000
|
| |
|
|
|
|
|
| |
warning is coming out incorrectly too early
becuase of unrelated scope pop. // rdar://15630719
llvm-svn: 196989
|
| |
|
|
|
|
|
| |
when selector in objc_bridge_related attribute names
a property. // rdar://15517899
llvm-svn: 196984
|
| |
|
|
|
|
| |
// rdar://15499111
llvm-svn: 196977
|
| |
|
|
| |
llvm-svn: 196959
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'objc_protocol_requires_explicit_implementation'.
That's a mouthful, and not necessarily the final name. This also
reflects a semantic change where this attribute is now on the
protocol itself instead of a class. This attribute will require
that a protocol, when adopted by a class, is explicitly implemented
by the class itself (instead of walking the super class chain).
Note that this attribute is not "done". This should be considered
a WIP.
llvm-svn: 196955
|
| |
|
|
|
|
| |
// rdar://15499111
llvm-svn: 196950
|
| |
|
|
|
|
|
| |
attributed CF to ObjC type conversions.
// rdar://15499111
llvm-svn: 196935
|
| |
|
|
|
|
|
|
|
| |
more than one such initializer in a union, make mem-initializers override
default initializers for other union members, handle anonymous unions with
anonymous struct members better. Fix a couple of semi-related bugs exposed by
the tests for same.
llvm-svn: 196892
|
| |
|
|
| |
llvm-svn: 196888
|
| |
|
|
|
|
| |
This fixes pr18141.
llvm-svn: 196855
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The standard is pretty clear on what it allows inside of template
arguments for non-type template parameters of pointer-to-member.
They must be of the form &qualified-id and cannot come from sources like
constexpr VarDecls or things of that nature.
This fixes PR18192.
llvm-svn: 196852
|
| |
|
|
|
|
| |
use of objc_bridge_related attribute. // rdar://15499111
llvm-svn: 196828
|
| |
|
|
| |
llvm-svn: 196803
|
| |
|
|
| |
llvm-svn: 196740
|
| |
|
|
|
|
| |
argh!
llvm-svn: 196722
|
| |
|
|
|
|
| |
Add back the test that was triggering the assertion (which I removed mistakenly thinking it was triggering just a warning and not an assertion). My error was brought to my attention by Rafael (Thanks!).
llvm-svn: 196721
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Employed the following refactorings:
- Renamed some functions
- Introduced explaining variables
- Cleaned up & added comments
- Used Optional<unsigned> for return value instead of an out parameter
- Added assertions
- Constified a few member functions
No functionality change.
All regressions pass.
llvm-svn: 196662
|
| |
|
|
|
|
| |
assert(sanity()) reads so much better than preprocessor conditional blocks.
llvm-svn: 196657
|