| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
HandleCXXStaticMemberVarInstantiation. Suggested by Argyrios.
llvm-svn: 152320
|
| |
|
|
|
|
|
| |
user-defined-floating-literal. Support for raw forms of these literals
to follow.
llvm-svn: 152302
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
starting with an underscore is ill-formed.
Since this rule rejects programs that were using <inttypes.h>'s macros, recover
from this error by treating the ud-suffix as a separate preprocessing-token,
with a DefaultError ExtWarn. The approach of treating such cases as two tokens
is under discussion for standardization, but is in any case a conforming
extension and allows existing codebases to keep building while the committee
makes up its mind.
Reword the warning on the definition of literal operators not starting with
underscores (which are, strangely, legal) to more explicitly state that such
operators can't be called by literals. Remove the special-case diagnostic for
hexfloats, since it was both triggering in the wrong cases and incorrect.
llvm-svn: 152287
|
| |
|
|
|
|
| |
builds. Sheesh.
llvm-svn: 152279
|
| |
|
|
| |
llvm-svn: 152277
|
| |
|
|
|
|
| |
to its own member function.
llvm-svn: 152276
|
| |
|
|
|
|
|
| |
an uninitialized block variable is being called inside the
block literal. // rdar://10817031
llvm-svn: 152271
|
| |
|
|
| |
llvm-svn: 152231
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
analysis to make the AST representation testable. They are represented by a
new UserDefinedLiteral AST node, which is a sugared CallExpr. All semantic
properties, including full CodeGen support, are achieved for free by this
representation.
UserDefinedLiterals can never be dependent, so no custom instantiation
behavior is required. They are mangled as if they were direct calls to the
underlying literal operator. This matches g++'s apparent behavior (but not its
actual mangling, which is broken for literal-operator-ids).
User-defined *string* literals are now fully-operational, but the semantic
analysis is quite hacky and needs more work. No other forms of user-defined
literal are created yet, but the AST support for them is present.
This patch committed after midnight because we had already hit the quota for
new kinds of literal yesterday.
llvm-svn: 152211
|
| |
|
|
|
|
| |
when debugging. // rdar://10997647
llvm-svn: 152187
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This submission improves Clang sema handling by using Clang tablegen
to generate common boilerplate code. As a start, it implements AttributeList
enumerator generation and case statements for AttributeList::getKind.
A new field "SemaHandler" is introduced in Attr.td and by default set to 1
as most of attributes in Attr.td have semantic checking in Sema. For a small
number of attributes that don't appear in Sema, the value is set to 0.
Also there are a small number of attributes that only appear in Sema but not
in Attr.td. Currently these attributes are still hardcoded in Sema AttributeList.
Reviewed by Delesley Hutchins.
llvm-svn: 152169
|
| |
|
|
|
|
| |
this.
llvm-svn: 152158
|
| |
|
|
| |
llvm-svn: 152154
|
| |
|
|
|
|
|
|
| |
blocks with unknown return types. This allows
LLDB to call blocks even when their return types
aren't provided in the debug information.
llvm-svn: 152147
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
NSNumber, and boolean literals. This includes both Sema and Codegen support.
Included is also support for new Objective-C container subscripting.
My apologies for the large patch. It was very difficult to break apart.
The patch introduces changes to the driver as well to cause clang to link
in additional runtime support when needed to support the new language features.
Docs are forthcoming to document the implementation and behavior of these features.
llvm-svn: 152137
|
| |
|
|
| |
llvm-svn: 152128
|
| |
|
|
|
|
|
| |
string literal, and adjust the diagnostic code to match. This also causes us
to escape any control characters in the message.
llvm-svn: 152069
|
| |
|
|
|
|
| |
check it. Fixes PR12178.
llvm-svn: 152048
|
| |
|
|
|
|
| |
return types that return non-void values. // rdar://10735698
llvm-svn: 152047
|
| |
|
|
| |
llvm-svn: 152033
|
| |
|
|
|
|
|
|
|
|
|
|
| |
In the included testcase, soma thinks that we already have a definition after we
see the out of line decl. Codegen puts it in a deferred list, to be output if
a use is seen. This would break when we saw an explicit template instantiation
definition, since codegen would not be notified.
This patch adds a method to the consumer interface so that soma can notify
codegen that this decl is now required.
llvm-svn: 152024
|
| |
|
|
| |
llvm-svn: 151997
|
| |
|
|
|
|
|
|
| |
It doesn't warn if the integer is known at compile time and within
the bounds of the string.
Discussion: http://comments.gmane.org/gmane.comp.compilers.clang.scm/47203
llvm-svn: 151943
|
| |
|
|
|
|
|
| |
issue the note if it is because message is sent to a forward class
declaration in delayed diagnostic. // rdar://10290322
llvm-svn: 151942
|
| |
|
|
|
|
|
|
|
|
| |
@class I;
@implementation I(cat) // crashes here
@end
rdar://10968158
llvm-svn: 151931
|
| |
|
|
|
|
| |
// rdar://10961370
llvm-svn: 151923
|
| |
|
|
|
|
|
|
|
| |
early, since their values can be used in constant expressions in C++11. For
odr-use checking, the opposite change is required, since references are
odr-used whether or not they satisfy the requirements for appearing in a
constant expression.
llvm-svn: 151881
|
| |
|
|
|
|
|
|
|
| |
But it is in the underlying c part of clang. clang crashes
in IRGen when passing an incomplete type argument to
variadic function (instead of diagnosing the bug).
// rdar://10961370
llvm-svn: 151862
|
| |
|
|
| |
llvm-svn: 151837
|
| |
|
|
|
|
|
|
| |
generated block literal for lambdas which are immediately converted to block pointer type. This simplifies the AST, avoids an unnecessary copy of the lambda and makes it much easier to avoid copying the result onto the heap.
Note that this transformation has a substantial semantic effect outside of ARC: it gives the converted lambda lifetime semantics similar to a block literal. With ARC, the effect is much less obvious because the lifetime of blocks is already managed.
llvm-svn: 151797
|
| |
|
|
|
|
| |
__attribute__((NSObject)) on a property declaration. This is needed to have retain properties for non-object pointers. Fixes <rdar://problem/10930507>.
llvm-svn: 151786
|
| |
|
|
|
|
| |
used.
llvm-svn: 151783
|
| |
|
|
|
|
|
| |
have matching user defined setter/getter and a warning is issued.
In this case, a fixit note is displayed. // rdar://10267155
llvm-svn: 151766
|
| |
|
|
| |
llvm-svn: 151754
|
| |
|
|
|
|
| |
existing tests still pass, but there may still be corner cases.
llvm-svn: 151716
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The bug that was caught by Apple's internal buildbots was valid and also showed another bug in my implementation.
These are now fixed, with regression tests added to catch them both (not Darwin-specific).
Original log:
====================
Revert r151638 because it causes assertion hit on PCH creation for Cocoa.h
Original log:
---------------------
Correctly track tags and enum members defined in the prototype of a function, and ensure they are properly scoped.
This fixes code such as:
enum e {x, y};
int f(enum {y, x} n) {
return 0;
}
This finally fixes PR5464 and PR5477.
---------------------
I also reverted r151641 which was enhancement on top of r151638.
====================
llvm-svn: 151712
|
| |
|
|
|
|
| |
are sometimes potentially evaluated.
llvm-svn: 151707
|
| |
|
|
| |
llvm-svn: 151699
|
| |
|
|
|
|
|
|
| |
of the SmallPtrSet way up to avoid commonly reallocating the buffer size.
- I didn't see a good argument against it, so I bumped the limit to cover the
max size we see during parsing Cocoa.h.
llvm-svn: 151698
|
| |
|
|
|
|
| |
conversions. PR12121.
llvm-svn: 151674
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Original log:
---------------------
Correctly track tags and enum members defined in the prototype of a function, and ensure they are properly scoped.
This fixes code such as:
enum e {x, y};
int f(enum {y, x} n) {
return 0;
}
This finally fixes PR5464 and PR5477.
---------------------
I also reverted r151641 which was enhancement on top of r151638.
llvm-svn: 151667
|
| |
|
|
|
|
| |
list-initializations. Fixes PR12118.
llvm-svn: 151666
|
| |
|
|
|
|
| |
name change went horribly wrong and I forgot to retest afterwards.
llvm-svn: 151641
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
function, and ensure they are properly scoped.
This fixes code such as:
enum e {x, y};
int f(enum {y, x} n) {
return 0;
}
This finally fixes PR5464 and PR5477.
llvm-svn: 151638
|
| |
|
|
|
|
|
|
|
|
| |
make sure to record the source location of the ivar name.
[libclang] When indexing @synthesized objc methods, report the @implementation
as the lexical container.
Fixes rdar://10905472
llvm-svn: 151635
|
| |
|
|
|
|
|
|
|
|
| |
extension.
[libclang] Index the getter/setter methods of a property of a objc class extension.
Fixes rdar://10907597
llvm-svn: 151633
|
| |
|
|
|
|
| |
mention the actual method. This looks better within an IDE, where text isn't always regurgitated in the presentation of a warning. Fixes radar 10914035.
llvm-svn: 151579
|
| |
|
|
| |
llvm-svn: 151577
|
| |
|
|
|
|
| |
checking. Specifically, make sure we don't ignore explicit casts in indexes, and make sure we use unsigned extension/comparisons on indexes. Fixes <rdar://problem/10916006>.
llvm-svn: 151569
|
| |
|
|
|
|
| |
assignment of init lists to built-in types and resolves PR12088.
llvm-svn: 151551
|