| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
@selector probably gets this wrong also.
llvm-svn: 43048
|
|
|
|
|
|
|
|
| |
Rename SourceRange::Begin()/End() to getBegin()/getEnd() for
consistency with other code.
Start building the rewriter towards handling @encode.
llvm-svn: 43047
|
|
|
|
| |
llvm-svn: 43046
|
|
|
|
|
|
|
|
| |
used/needed.
Change ObjcMethodDecl::getMethodType to getResultType, to match FunctionDecl.
llvm-svn: 43045
|
|
|
|
| |
llvm-svn: 43038
|
|
|
|
| |
llvm-svn: 43037
|
|
|
|
|
|
| |
This fixes a bug Anders noticed.
llvm-svn: 43024
|
|
|
|
|
|
| |
Sema::InitBuiltinVaListType (which had the same bug).
llvm-svn: 43023
|
|
|
|
|
|
|
|
|
|
| |
"NSConstantString *".
This makes the typecheck much happier. Without this change, the type checker would have to special case "struct __builtin_CFString *". This change does assume the interface for NSConstantString is declared in the translation unit.
I left ASTContext::getCFConstantStringType() around for now (with a comment that says it is currently unused).
llvm-svn: 43021
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
predicates are now instance methods (they were previously static class methods on Type).
This allowed me to fix the following hack from this weekend...
// FIXME: Devise a way to do this without using strcmp.
// Would like to say..."return getAsStructureType() == IdStructType;", but
// we don't have a pointer to ASTContext.
bool Type::isObjcIdType() const {
if (const RecordType *RT = getAsStructureType())
return !strcmp(RT->getDecl()->getName(), "objc_object");
return false;
}
...which is now...
bool isObjcIdType(QualType T) const {
return T->getAsStructureType() == IdStructType;
}
Side notes:
- I had to remove a convenience function from the TypesCompatibleExpr class.
int typesAreCompatible() const {return Type::typesAreCompatible(Type1,Type2);}
Which required a couple clients get a little more verbose...
- Result = TCE->typesAreCompatible();
+ Result = Ctx.typesAreCompatible(TCE->getArgType1(), TCE->getArgType2());
Overall, I think this change also makes sense for a couple reasons...
1) Since ASTContext vends types, it makes sense for the type compatibility API to be there.
2) This allows the type compatibility predeciates to refer to data not strictly present in the AST (which I have found problematic on several occasions).
llvm-svn: 43009
|
|
|
|
| |
llvm-svn: 43006
|
|
|
|
| |
llvm-svn: 43000
|
|
|
|
|
|
| |
Also noticed ASTContext::BuiltinVaListType wasn't being initialized to the null type (so I set it).
llvm-svn: 42983
|
|
|
|
| |
llvm-svn: 42974
|
|
|
|
|
|
|
| |
- Start looking up methods in the global method pools (for "id").
- Start integrating interface types into the type system.
llvm-svn: 42971
|
|
|
|
|
|
| |
Changed ObjcInterfaceDecl::ListCategories->CategoryList.
llvm-svn: 42968
|
|
|
|
|
|
|
|
|
|
|
| |
Sema::AddInstanceMethodToGlobalPool and DenseMaps. This will allow us to efficiently lookup a method from a selector given no type information (for the "id" data type).
- Fixed some funky "}
else {" indentation in Sema::ActOnAddMethodsToObjcDecl(). I'd prefer we stay away from this style...it wastes space and isn't any easier to read (from my perspective, at least:-)
- Changed Parser::ParseObjCInterfaceDeclList() to only call Action::ActOnAddMethodsToObjcDecl() when it actually has methods to add (since most interface have methods, this is a very minor cleanup).
llvm-svn: 42957
|
|
|
|
| |
llvm-svn: 42939
|
|
|
|
| |
llvm-svn: 42938
|
|
|
|
| |
llvm-svn: 42936
|
|
|
|
|
|
|
|
|
| |
printf format strings. Added type checking to see if the matching
width/precision argument was of type 'int'.
Thanks to Anders Carlsson for reporting this missing feature.
llvm-svn: 42933
|
|
|
|
| |
llvm-svn: 42928
|
|
|
|
|
|
|
|
| |
lookup
ok class names and streamlined this logic to do the lookup once.
llvm-svn: 42926
|
|
|
|
|
|
| |
decl will only be 0 when we have an error on the ObjC decl. I would prefer we pass in a decl that is marked as invalid. I don't think this is critical to fix now, however I'd like us to be consistent. There are currently many places that don't mark the decl as invalid (which need to be fixed)...
llvm-svn: 42923
|
|
|
|
|
|
| |
new diags.
llvm-svn: 42917
|
|
|
|
|
|
| |
and hid them.
llvm-svn: 42915
|
|
|
|
|
|
| |
specifiers.
llvm-svn: 42886
|
|
|
|
| |
llvm-svn: 42883
|
|
|
|
|
|
| |
available to builtin functions.
llvm-svn: 42857
|
|
|
|
| |
llvm-svn: 42856
|
|
|
|
| |
llvm-svn: 42849
|
|
|
|
|
|
|
|
|
| |
- Cache the typedef, not the type (avoids importing AST/Type.h).
- Emit an error if "id" cannot be found.
- Comment the routine and add a FIXME to reconsider how we emulate GCC's new fangled behavior. This isn't a priority for now, since almost no code depends on having "id" built-in.
- Add a test.
llvm-svn: 42845
|
|
|
|
|
|
|
| |
- Cache the "id" type in Sema...initialize ObjcIdType and TUScope (oops).
- Fix ActOnInstanceMessage to allow for "id" type receivers...still work to do (next).
llvm-svn: 42842
|
|
|
|
| |
llvm-svn: 42840
|
|
|
|
|
|
|
|
| |
use TUScope.
Also improve a recently added comment.
llvm-svn: 42826
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
predefined macros. Previously, these were handled by the driver,
now they are handled by the preprocessor.
Some fallout of this:
1. Instead of preprocessing two buffers (the predefines, then the
main source file) we now start preprocessing the main source
file and inject the predefines as a "psuedo #include" from the
main source file.
2. #1 allows us to nuke the Lexer::IsMainFile flag and simplify
Preprocessor::isInPrimaryFile.
3. The driver doesn't have to know about standard #defines, the
preprocessor knows, which is nice for people wanting to define
their own drivers.
4. This allows us to put normal tokens in the predefine buffer,
for example a definition for __builtin_va_list that is
target-specific, and a typedef for id in objc.
llvm-svn: 42818
|
|
|
|
|
|
|
|
|
|
| |
This fixes a crasher in Sema::MatchTwoMethodDeclarations(), identified by selector-overload.m (just added).
Added Action::ActOnTranslationUnitScope() and renamed Action::PopScope to ActOnPopScope.
Added a Translation Unit Scope instance variable to Sema (will be very useful to ObjC-related actions, since ObjC declarations are always file-scoped).
llvm-svn: 42817
|
|
|
|
| |
llvm-svn: 42803
|
|
|
|
| |
llvm-svn: 42802
|
|
|
|
|
|
|
| |
DenseMap to keep track of such declarations and derive ObjcProtocolDecl
directyly from NamedScope.
llvm-svn: 42801
|
|
|
|
|
|
|
|
| |
ParseFunctionDefinition so that ActOnFunctionDefBody is always
called if ActOnStartOfFunctionDef is called. This fixes a crash
reported by Nuno Lopes.
llvm-svn: 42793
|
|
|
|
|
|
| |
fatal error of category's undefined interface.
llvm-svn: 42790
|
|
|
|
|
|
| |
DenseMapInfo in IdentifierTable.h).
llvm-svn: 42767
|
|
|
|
| |
llvm-svn: 42754
|
|
|
|
| |
llvm-svn: 42730
|
|
|
|
|
|
| |
This fixes strange assertions that just started triggering.
llvm-svn: 42721
|
|
|
|
| |
llvm-svn: 42715
|
|
|
|
| |
llvm-svn: 42714
|
|
|
|
|
|
| |
argument.
llvm-svn: 42711
|
|
|
|
|
|
|
|
|
|
| |
NamedDecl is a Decl that has an IdentifierInfo (for example, ScopedDecl),
but not ObjcMethodDecl.
Simplify some code in ActOnAddMethodsToObjcDecl, by doing the cast from
DeclTy to Decl at the start of the method.
llvm-svn: 42710
|