| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes PR4704 problems
Addresses Eli's patch feedback re: ugly cast code
Updates all postfix operators to remove ParenListExprs. While this is awful,
no better solution (say, in the parser) is obvious to me. Better solutions
welcome.
llvm-svn: 78621
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
--- Reverse-merging r78535 into '.':
D test/Sema/altivec-init.c
U include/clang/Basic/DiagnosticSemaKinds.td
U include/clang/AST/Expr.h
U include/clang/AST/StmtNodes.def
U include/clang/Parse/Parser.h
U include/clang/Parse/Action.h
U tools/clang-cc/clang-cc.cpp
U lib/Frontend/PrintParserCallbacks.cpp
U lib/CodeGen/CGExprScalar.cpp
U lib/Sema/SemaInit.cpp
U lib/Sema/Sema.h
U lib/Sema/SemaExpr.cpp
U lib/Sema/SemaTemplateInstantiateExpr.cpp
U lib/AST/StmtProfile.cpp
U lib/AST/Expr.cpp
U lib/AST/StmtPrinter.cpp
U lib/Parse/ParseExpr.cpp
U lib/Parse/ParseExprCXX.cpp
llvm-svn: 78551
|
|
|
|
|
|
|
|
| |
In addition to being defined by the AltiVec PIM, this is also the vector
initializer syntax used by OpenCL, so that vector literals are compatible
with macro arguments.
llvm-svn: 78535
|
|
|
|
| |
llvm-svn: 78452
|
|
|
|
|
|
|
| |
or expression (Destroy) from the virtual function used to actually
destroy a given expression (DoDestroy).
llvm-svn: 78375
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
Type::getAsRecordType() -> Type::getAs<RecordType>()
Type::getAsPointerType() -> Type::getAs<PointerType>()
Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>()
Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>()
Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>()
Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>()
Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
Type::getAsTagType() -> Type::getAs<TagType>()
And remove Type::getAsReferenceType(), etc.
This change is similar to one I made a couple weeks ago, but that was partly
reverted pending some additional design discussion. With Doug's pending smart
pointer changes for Types, it seemed natural to take this approach.
llvm-svn: 77510
|
|
|
|
| |
llvm-svn: 77344
|
|
|
|
| |
llvm-svn: 77302
|
|
|
|
|
|
|
|
| |
Enhance test case to cover 'isa' access on interface types (clang produces an error, GCC produces a warning).
Still need back-end CodeGen for ObjCIsaExpr.
llvm-svn: 76979
|
|
|
|
| |
llvm-svn: 76327
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 76179
|
|
|
|
|
|
| |
code with the new method.
llvm-svn: 76164
|
|
|
|
|
|
| |
Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents.
llvm-svn: 76139
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This method is intended to eventually replace the individual
Type::getAsXXXType<> methods.
The motivation behind this change is twofold:
1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of
them are basically copy-and-paste.
2) By centralizing the implementation of the getAs<Type> logic we can more
smoothly move over to Doug Gregor's proposed canonical type smart pointer
scheme.
Along with this patch:
a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>.
b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>.
llvm-svn: 76098
|
|
|
|
|
|
| |
Convert all clients to use the new predicate on Type.
llvm-svn: 76076
|
|
|
|
| |
llvm-svn: 75641
|
|
|
|
| |
llvm-svn: 75598
|
|
|
|
|
|
|
|
|
|
|
|
| |
The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches.
This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic.
By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time.
Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks.
llvm-svn: 75314
|
|
|
|
|
|
|
|
| |
function template. Most of the change here is in factoring out the
common bits used for template argument deduction from a function call
and when taking the address of a function template.
llvm-svn: 75044
|
|
|
|
| |
llvm-svn: 74830
|
|
|
|
|
|
|
|
|
| |
The implementations of these methods can Use Decl::getASTContext() to get the ASTContext.
This commit touches a lot of files since call sites for these methods are everywhere.
I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it.
llvm-svn: 74501
|
|
|
|
|
|
| |
by pointer.
llvm-svn: 74432
|
|
|
|
|
|
| |
index.
llvm-svn: 74202
|
|
|
|
|
|
| |
building obj-c++ clients. "Protocol" is a class name in Cocoa.h
llvm-svn: 73854
|
|
|
|
| |
llvm-svn: 73702
|
|
|
|
|
|
|
|
| |
preprocessor and initialize it early in clang-cc. This
ensures that __has_builtin works in all modes, not just
when ASTContext is around.
llvm-svn: 73319
|
|
|
|
|
|
| |
and @protocol expressions.
llvm-svn: 73036
|
|
|
|
|
|
| |
for the Next runtime.
llvm-svn: 72703
|
|
|
|
|
|
|
|
| |
an integral constant expression, maintain a cache of the value and the
is-an-ICE flag within the VarDecl itself. This eliminates
exponential-time behavior of the Fibonacci template metaprogram.
llvm-svn: 72428
|
|
|
|
|
|
| |
No intended functionality change.
llvm-svn: 72410
|
|
|
|
| |
llvm-svn: 72409
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
operator in C++, and verify that template instantiation for the
condition operator does the right thing.
llvm-svn: 72127
|
|
|
|
| |
llvm-svn: 72058
|
|
|
|
| |
llvm-svn: 71989
|
|
|
|
|
|
| |
these are testable yet, though.
llvm-svn: 71953
|
|
|
|
| |
llvm-svn: 71907
|
|
|
|
| |
llvm-svn: 71405
|
|
|
|
| |
llvm-svn: 71041
|
|
|
|
|
|
| |
extension warning.
llvm-svn: 70805
|
|
|
|
|
|
|
|
|
| |
into the left-hand side of an assignment expression. This completes
most of PR3500; the only remaining part is to deal with the
GCC-specific implementation-defined behavior for "unsigned long" (and
other) bit-fields.
llvm-svn: 70623
|
|
|
|
| |
llvm-svn: 70384
|
|
|
|
| |
llvm-svn: 70145
|
|
|
|
|
|
| |
the missing bits of ObjCMessageExpr.
llvm-svn: 70100
|
|
|
|
|
|
| |
any issues now that we have our own tgmath.h.
llvm-svn: 70090
|
|
|
|
|
|
| |
aggregates even though we already accept explicit ones. Easy fix.
llvm-svn: 69661
|
|
|
|
|
|
|
|
| |
lazy PCH deserialization. Propagate that argument wherever it needs to
be. No functionality change, except that I've tightened up a few PCH
tests in preparation.
llvm-svn: 69406
|
|
|
|
|
|
|
|
|
| |
1) Accidentally used delete [] on an array of statements that was allocated with ASTContext's allocator
2) Deserialization of names with multiple declarations (e.g., a struct and a function) used the wrong mangling constant, causing it to view declaration IDs as Decl*s.
403.gcc builds and links properly.
llvm-svn: 69390
|
|
|
|
|
|
| |
Add a few commented lines to the test case that point out things that don't work yet.
llvm-svn: 69354
|