| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
until Doug Gregor's Type smart pointer code lands (or more discussion occurs).
These methods just call the new Type::getAs<XXX> methods, so we still have
reduced implementation redundancy. Having explicit getAsXXXType() methods makes
it easier to set breakpoints in the debugger.
llvm-svn: 76193
|
| |
|
|
|
|
| |
Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents.
llvm-svn: 76139
|
| |
|
|
| |
llvm-svn: 74951
|
| |
|
|
|
|
| |
from Enea Zaffanella!
llvm-svn: 74831
|
| |
|
|
|
|
|
| |
Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating".
Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit.
llvm-svn: 74506
|
| |
|
|
|
|
|
|
|
|
| |
these are usually because the parser was thoroughly confused. In addition
to typing the value being declared as an int and hoping for the best, we
mark the value as invalid so we don't get chains of errors when it is
used downstream. In C, implicit int actually is valid, so typing the thing
as int is good and marking it invalid is bad. :)
llvm-svn: 74266
|
| |
|
|
|
|
| |
of the elements. Issue reported on cfe-dev by Mattias Holm.
llvm-svn: 73292
|
| |
|
|
|
|
| |
string.
llvm-svn: 72663
|
| |
|
|
| |
llvm-svn: 72633
|
| |
|
|
|
|
| |
need to take a VarDecl anymore. (It still does, but it won't for long)
llvm-svn: 72630
|
| |
|
|
|
|
|
| |
hadError (suppressing future diagnostics) if we didn't print an
error.
llvm-svn: 72588
|
| |
|
|
|
|
| |
VLAs.
llvm-svn: 72587
|
| |
|
|
|
|
| |
handle the construct in question correctly.
llvm-svn: 72581
|
| |
|
|
|
|
| |
a vla is used.
llvm-svn: 72575
|
| |
|
|
| |
llvm-svn: 72478
|
| |
|
|
| |
llvm-svn: 72477
|
| |
|
|
| |
llvm-svn: 72474
|
| |
|
|
| |
llvm-svn: 72234
|
| |
|
|
|
|
|
|
| |
can. Also, delay semantic analysis of initialization for
value-dependent as well as type-dependent expressions, since we can't
always properly type-check a value-dependent expression.
llvm-svn: 72233
|
| |
|
|
| |
llvm-svn: 72210
|
| |
|
|
|
|
|
|
|
| |
This patch isn't quite ideal in that it eliminates the warning for
constructs like "int a = {1};", where the braces are in fact redundant.
However, that would have required a bunch of refactoring, and it's
much less likely to cause confusion compared to redundant nested braces.
llvm-svn: 71939
|
| |
|
|
| |
llvm-svn: 71936
|
| |
|
|
| |
llvm-svn: 70567
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
VerifyIntegerConstantExpression instead of isIntegerConstantExpr.
This makes it ext-warn but tolerate things that fold to a constant
but that are not valid i-c-e's.
There must be a bug in the i-c-e computation though, because it
doesn't catch this case even with pedantic.
This also switches the later code to use EvaluateAsInt which is
simpler and handles everything that evaluate does.
llvm-svn: 70081
|
| |
|
|
|
|
| |
Douglas, can you check that this is doing the right thing?
llvm-svn: 69298
|
| |
|
|
|
|
| |
anonymous structs or unions. Fixes PR3778.
llvm-svn: 69153
|
| |
|
|
|
|
| |
to using designator indices. No functionality change.
llvm-svn: 69147
|
| |
|
|
|
|
| |
No functionality change (really).
llvm-svn: 68726
|
| |
|
|
| |
llvm-svn: 68261
|
| |
|
|
|
|
|
| |
syntax into extension warnings, and provide code-modification hints
showing how to fix the problem.
llvm-svn: 67885
|
| |
|
|
|
|
|
|
|
|
| |
lists. The code wasn't accounting for the distinction between the
top-level call to getStructuredSubobjectInit and later calls that
occur deeper in the hierarchy. This problem manifested itself as
over-allocation in cases where we have large arrays of small
structures (<rdar://problem/6707362>).
llvm-svn: 67452
|
| |
|
|
|
|
|
|
|
|
|
| |
its vectors based on the subobject type we're initializing and the
(unstructured) initializer list. This eliminates some malloc thrashing
when parsing initializers (from 117 vector reallocations down to 0
when parsing Cocoa.h). We can't always pre-allocate the right amount
of storage, since designated initializers can cause us to initialize
in non-predictable patterns.
llvm-svn: 67421
|
| |
|
|
|
|
|
|
| |
braces. We now build the appropriate fully-structured initializer list
for such things. Per PR3618, verified that we're getting the right
code generation.
llvm-svn: 67353
|
| |
|
|
|
|
| |
unclear areas. Maybe Doug can shed some light on some of the fixmes.
llvm-svn: 67059
|
| |
|
|
| |
llvm-svn: 65777
|
| |
|
|
| |
llvm-svn: 65671
|
| |
|
|
| |
llvm-svn: 65589
|
| |
|
|
|
|
|
| |
initialization of wchar_t arrays with wide strings, and generalizes
wchar_size.c to work on all targets.
llvm-svn: 65586
|
| |
|
|
|
|
|
| |
Unfortunately this doesn't work yet because wchar_t is completely
broken in C.
llvm-svn: 65585
|
| |
|
|
| |
llvm-svn: 65401
|
| |
|
|
|
|
| |
string size as an argument.
llvm-svn: 65400
|
| |
|
|
| |
llvm-svn: 65399
|
| |
|
|
| |
llvm-svn: 65398
|
| |
|
|
| |
llvm-svn: 65397
|
| |
|
|
| |
llvm-svn: 65396
|
| |
|
|
| |
llvm-svn: 65395
|
| |
|
|
|
|
| |
to SemaInit.cpp, no functionality change.
llvm-svn: 65394
|
| |
|
|
|
|
| |
C*. They're required errors in C++.
llvm-svn: 64964
|
| |
|
|
|
|
|
|
|
| |
union subobject initialization before checking whether the next
initiailizer was actually a designated initializer. This led to
spurious "excess elements in union initializer" errors. Thanks to
rdivacky for reporting the bug!
llvm-svn: 64392
|
| |
|
|
|
|
|
|
| |
to tell it that it wasn't (directly) designated. This way, we unwind
back to the explicit initializer list properly rather than getting
stuck in the wrong subobject. Fixes llvm.org/PR3519
llvm-svn: 64155
|