| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 196510
|
| |
|
|
|
|
|
|
|
|
|
| |
introduces at least one new initializer,
don't assume that it inherits the designated initializers from the super class.
If the assumption was wrong because a new initializer was a designated one that was not marked as such,
we will emit misleading warnings for subclasses of the interface.
llvm-svn: 196476
|
| |
|
|
|
|
|
| |
This patch tries to avoid unrelated changes other than fixing a few
hyphen-related ambiguities in nearby lines.
llvm-svn: 196466
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
In general, this type node can be used to represent any type adjustment
that occurs implicitly without losing type sugar. The immediate use of
this is to adjust the calling conventions of member function pointer
types without breaking template instantiation.
Fixes PR17996.
Reviewers: rsmith
Differential Revision: http://llvm-reviews.chandlerc.com/D2332
llvm-svn: 196451
|
| |
|
|
|
|
|
|
|
|
|
| |
super another initializer and when the implementation does not delegate to
another initializer via a call on 'self'.
A secondary initializer is an initializer method not marked as a designated
initializer within a class that has at least one initializer marked as a
designated initializer.
llvm-svn: 196318
|
| |
|
|
|
|
|
|
| |
calls on
super an initializer that is not a designated one or any initializer on self.
llvm-svn: 196317
|
| |
|
|
|
|
|
|
| |
does not chain to
an init method that is a designated initializer for the superclass.
llvm-svn: 196316
|
| |
|
|
|
|
|
|
|
|
| |
designated initializers of an interface.
If the interface declaration does not have methods marked as designated
initializers then the interface inherits the designated initializers of
its super class.
llvm-svn: 196315
|
| |
|
|
|
|
|
|
| |
token.
This would crash if the token is used in another diagnostic. PR18051.
llvm-svn: 196048
|
| |
|
|
|
|
| |
On a Release build this takes the testcase in pr18055 from 0m3.892s to 0m1.452s.
llvm-svn: 195768
|
| |
|
|
| |
llvm-svn: 195767
|
| |
|
|
| |
llvm-svn: 195714
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It wasn't possible for an anonymous type to show up inside of function arguments.
However, decltype (which MSVC added support for in 2010) makes this
possible. Further, backrefs to these anonymous types can now be formed.
This fixes PR18022.
N.B. We do not, and very likely _will not_, support MSVC's bug where
subsequent typedefs of anonymous types leak into the linkage name; this
is a gross violation of the ABI. A warning should be introduced to
inform our users of this particular shortcoming.
llvm-svn: 195669
|
| |
|
|
|
|
| |
whether a defaulted special member function should be deleted.
llvm-svn: 195620
|
| |
|
|
| |
llvm-svn: 195561
|
| |
|
|
|
|
| |
into a helper.
llvm-svn: 195559
|
| |
|
|
|
|
|
|
| |
This will allow the completer to order results by relevance.
Differential Revision: http://llvm-reviews.chandlerc.com/D2209
llvm-svn: 195540
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
renamed).
This is still an experimental attribute, but I wanted it in tree
for review. It may still get yanked.
This attribute can only be applied to a class @interface, not
a class extension or category. It does not change the type
system rules for Objective-C, but rather the implementation checking
for Objective-C classes that explicitly conform to a protocol.
During protocol conformance checking, clang recursively searches
up the class hierarchy for the set of methods that compose
a protocol. This attribute will cause the compiler to not consider
the methods contributed by a super class, its categories, and those
from its ancestor classes. Thus this attribute is used to force
subclasses to redeclare (and hopefully re-implement) methods if
they decide to explicitly conform to a protocol where some of those
methods may be provided by a super class.
This attribute intentionally leaves out properties, which are associated
with state. This attribute only considers methods (at least right now)
that are non-property accessors. These represent methods that "do something"
as dictated by the protocol. This may be further refined, and this
should be considered a WIP until documentation gets written or this
gets removed.
llvm-svn: 195533
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
argument.
This enables a micro-optimization in protocol conformance checking
to not examine the class hierarchy twice per method.
As part of this change, remove the default arguments from lookupInstanceMethod()
and lookupClassMethod(). It was becoming very redundant. For clients
needing the default arguments, have them use the full API instead of
these convenience methods.
llvm-svn: 195532
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
can't accidentally be allocated the wrong way (missing prefix data for decls
from AST files, for instance) and simplifies the CreateDeserialized functions a
little. An extra DeclContext* parameter to the not-from-AST-file operator new
allows us to ensure that we don't accidentally call the wrong one when
deserializing (when we don't have a DeclContext), allows some extra checks, and
prepares for some planned modules-related changes to Decl allocation.
No functionality change intended.
llvm-svn: 195426
|
| |
|
|
|
|
| |
"UNSUPPORTED" comment because unsigned __int128 type is in fact supported.
llvm-svn: 195378
|
| |
|
|
|
|
|
|
|
|
|
| |
conformance for a class."
After implementing this patch, a few concerns about the language
feature itself emerged in my head that I had previously not considered.
I want to resolve those design concerns first before having
a half-designed language feature in the tree.
llvm-svn: 195328
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for a class.
The idea is to allow a class to stipulate that its methods (and those
of its parents) cannot be used for protocol conformance in a subclass.
A subclass is then explicitly required to re-implement those methods
of they are present in the class marked with this attribute.
Currently the attribute can only be applied to an @interface, and
not a category or class extension. This is by design. Unlike
protocol conformance, where a category can add explicit conformance
of a protocol to class, this anti-conformance really needs to be
observed uniformly by all clients of the class. That's because
the absence of the attribute implies more permissive checking of
protocol conformance.
This unfortunately required changing method lookup in ObjCInterfaceDecl
to take an optional protocol parameter. This should not slow down
method lookup in most cases, and is just used for protocol conformance.
llvm-svn: 195323
|
| |
|
|
|
|
|
| |
from qualified-id objects to CF types with
objc_bridge annotation. // rdar://15454846
llvm-svn: 195264
|
| |
|
|
|
|
|
| |
to or from 'id' and qualified-id types.
// rdar://15454846
llvm-svn: 195178
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
RTTI is not yet implemented for the Microsoft C++ ABI and isn't expected
soon. We could easily add the mangling, but the error is what prevents
us from silently miscompiling code that expects RTTI.
Instead, add a new mangleTypeName entry point that simply forwards to
mangleName or mangleType to produce a string that isn't part of the ABI.
Itanium can continue to use RTTI names to avoid unecessary test
breakage.
This also seems like the right design. The fact that TBAA names happen
to be RTTI names is now an implementation detail of the mangler, rather
than part of TBAA.
Differential Revision: http://llvm-reviews.chandlerc.com/D2153
llvm-svn: 195168
|
| |
|
|
|
|
|
|
|
|
| |
Microsoft adds an extra byte of padding before laying out zero sized
non-virtual bases if the non-virtual base before it contains a vbptr.
This patch adds the same behavior to clang.
Differential Revision: http://llvm-reviews.chandlerc.com/D2106
llvm-svn: 195158
|
| |
|
|
|
|
| |
minor bug with poly64 name mangling.
llvm-svn: 194952
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of storing the vtable offset directly in the function pointer and
doing a branch to check for virtualness at each call site, the MS ABI
generates a thunk for calling the function at a specific vtable offset,
and puts that in the function pointer.
This patch adds support for emitting such thunks. However, it doesn't support
pointers to virtual member functions that are variadic, have an incomplete
aggregate return type or parameter, or are overriding a function in a virtual
base class.
Differential Revision: http://llvm-reviews.chandlerc.com/D2104
llvm-svn: 194827
|
| |
|
|
|
|
|
| |
where we didn't. Extend our constant evaluation for __builtin_strlen to handle
any constant array of chars, not just string literals, to match.
llvm-svn: 194762
|
| |
|
|
|
|
|
|
|
|
| |
template, that member has a dependent type (even if we can see the definition
of the member of the primary template), because the array size could change in
a member specialization.
Patch by Karthik Bhat!
llvm-svn: 194740
|
| |
|
|
| |
llvm-svn: 194717
|
| |
|
|
|
|
|
|
|
|
| |
bit fields of zero size. Warnings are generated in C++ mode and if
only such type is defined inside extern "C" block.
The patch fixed PR5065.
Differential Revision: http://llvm-reviews.chandlerc.com/D2151
llvm-svn: 194653
|
| |
|
|
|
|
|
|
| |
improving comments to make documentation more accurate.
Differential Revision:http://llvm-reviews.chandlerc.com/D2172
llvm-svn: 194609
|
| |
|
|
|
|
|
|
| |
The xcore llvm backend does not handle 8 byte alignment viz:
"%BadAlignment = alloca i64, align 8"
So getPreferredTypeAlign() must never overalign.
llvm-svn: 194462
|
| |
|
|
|
|
| |
Patch by Will Wilson!
llvm-svn: 194441
|
| |
|
|
| |
llvm-svn: 194355
|
| |
|
|
| |
llvm-svn: 194354
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This makes it consistent with -fdump-record-layouts, which was moved to
outs() in r186219. My reasoning for going with stdout is that when one
of these options is present, the layouts are really a program output,
and shouldn't be interleaved with diagnostics, which are on stderr.
Reviewers: timurrrr
Differential Revision: http://llvm-reviews.chandlerc.com/D2127
llvm-svn: 194279
|
| |
|
|
|
|
| |
Reviewed at http://llvm-reviews.chandlerc.com/D2120
llvm-svn: 194256
|
| |
|
|
|
|
| |
forget to clean up temporaries at the end of it.
llvm-svn: 194213
|
| |
|
|
|
|
| |
field with a more appropriate name
llvm-svn: 194202
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Similar to __FUNCTION__, MSVC exposes the name of the enclosing mangled
function name via __FUNCDNAME__. This implementation is very naive and
unoptimized, it is expected that __FUNCDNAME__ would be used rarely in
practice.
Reviewers: rnk, rsmith, thakis
CC: cfe-commits, silvas
Differential Revision: http://llvm-reviews.chandlerc.com/D2109
llvm-svn: 194181
|
| |
|
|
|
|
| |
when they actually do.
llvm-svn: 194156
|
| |
|
|
| |
llvm-svn: 194132
|
| |
|
|
|
|
|
| |
earlier 'non-constant' diagnostic with a later one if the earlier one was from
a side-effect we thought we could evaluate past.
llvm-svn: 194117
|
| |
|
|
|
|
|
|
|
|
| |
bitfield
This patch adds the same behavior to clang.
Differential Revision: http://llvm-reviews.chandlerc.com/D2103
llvm-svn: 194115
|
| |
|
|
|
|
|
|
|
| |
These functions can generally be applied to multiple kinds of AST node,
so it makes sense to add them to DynTypedNode.
Differential Revision: http://llvm-reviews.chandlerc.com/D2096
llvm-svn: 194113
|
| |
|
|
|
|
| |
checking an expression for constant overflow.
llvm-svn: 194099
|
| |
|
|
|
|
|
|
|
| |
bit more robust against future changes. This includes a slight diagnostic
improvement: if we know we're only trying to form a constant expression, take
the first diagnostic which shows the expression is not a constant expression,
rather than preferring the first one which makes the expression unfoldable.
llvm-svn: 194098
|