- Oct 17, 2007
-
-
Hartmut Kaiser authored
Silenced some VC++ warnings. Had to rephrase a partial specialization of the IntrospectionTrait struct in SerializationTest.cpp, please review. Added a compiler specific workaround in IdentifierTable.h. Is that the way to fix this kind of issues? llvm-svn: 43074
-
Chris Lattner authored
llvm-svn: 43067
-
Anders Carlsson authored
Generate code for static variables that don't have initializers. Also, report an error if a static initializer is not constant. llvm-svn: 43058
-
Anders Carlsson authored
llvm-svn: 43057
-
Ted Kremenek authored
llvm-svn: 43054
-
Ted Kremenek authored
serialization logic as well as driver code is now in Driver/SerializationTest.cpp. The status of this code is that it should be used by no clients. Added --test-pickling option to driver to run the serialization code. Modified IdentifierInfo and IdentifierTable to have friend classes that permit object serialization. Such friendship may not be needed in the final design. llvm-svn: 43052
-
Fariborz Jahanian authored
llvm-svn: 43051
-
Steve Naroff authored
Add Sema::CheckMessageArgumentTypes()... llvm-svn: 43050
-
Chris Lattner authored
@selector probably gets this wrong also. llvm-svn: 43048
-
Chris Lattner authored
Rename SourceRange::Begin()/End() to getBegin()/getEnd() for consistency with other code. Start building the rewriter towards handling @encode. llvm-svn: 43047
-
- Oct 16, 2007
-
-
Fariborz Jahanian authored
llvm-svn: 43046
-
Steve Naroff authored
Remove ObjcMethodDecl::getNumMethodParams/getMethodParamDecl, they aren't used/needed. Change ObjcMethodDecl::getMethodType to getResultType, to match FunctionDecl. llvm-svn: 43045
-
Chris Lattner authored
llvm-svn: 43044
-
Fariborz Jahanian authored
llvm-svn: 43042
-
Chris Lattner authored
#import to #include's as a test. llvm-svn: 43041
-
Chris Lattner authored
llvm-svn: 43040
-
Fariborz Jahanian authored
llvm-svn: 43039
-
Fariborz Jahanian authored
llvm-svn: 43038
-
Steve Naroff authored
Emit diagnostics for methods not found. llvm-svn: 43037
-
Anton Korobeynikov authored
llvm-svn: 43029
-
Chris Lattner authored
This fixes a bug Anders noticed. llvm-svn: 43024
-
Steve Naroff authored
Bad cast...need to use dyn_cast_or_null. Also changed Sema::InitBuiltinVaListType (which had the same bug). llvm-svn: 43023
-
Fariborz Jahanian authored
llvm-svn: 43022
-
Steve Naroff authored
Change the type of ObjCStringLiteral from "struct __builtin_CFString *" to "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
-
- Oct 15, 2007
-
-
Steve Naroff authored
Fix a parser bug with message expressions - need to call ParsePostfixExpressionSuffix(). Now were correctly allow the following... i = [str rangeOfString:@"]"].length; llvm-svn: 43012
-
Steve Naroff authored
Move type compatibility predicates from Type to ASTContext. In addition, the 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
-
Anders Carlsson authored
llvm-svn: 43006
-
Fariborz Jahanian authored
llvm-svn: 43000
-
Steve Naroff authored
Added ASTContext::setObjcIdType/getObjcIdType(), set by Sema. Also noticed ASTContext::BuiltinVaListType wasn't being initialized to the null type (so I set it). llvm-svn: 42983
-
Steve Naroff authored
Teach the type checker about "id". This removes the following bogus warning... [dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang t.m t.m:29:18: warning: incompatible pointer types assigning 'id' to 'NSString *' resultString = [[NSString alloc] initWithFormat:0 arguments:0]; ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ llvm-svn: 42975
-
Anders Carlsson authored
llvm-svn: 42974
-
Anders Carlsson authored
llvm-svn: 42973
-
Steve Naroff authored
- Teach ObjcInterfaceDecl::lookupInstance/ClassMethod to look through protocols. - Start looking up methods in the global method pools (for "id"). - Start integrating interface types into the type system. llvm-svn: 42971
-
- Oct 14, 2007
-
-
Steve Naroff authored
Add category lookup (removing a couple FIXME's). Changed ObjcInterfaceDecl::ListCategories->CategoryList. llvm-svn: 42968
-
Steve Naroff authored
Fix -ast-dump for ObjC. llvm-svn: 42967
-
Steve Naroff authored
- Added Sema::AddFactoryMethodToGlobalPool and 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
-
- Oct 13, 2007
-
-
Anders Carlsson authored
llvm-svn: 42951
-
Chris Lattner authored
$ clang rewrite.c -rewrite-test prints: int foo() { b: foo(); f: foo(); foo(); } for: int foo() { b: foo(); f: foo(); foo(); } amazing. llvm-svn: 42944
-
Anders Carlsson authored
llvm-svn: 42943
-
Chris Lattner authored
llvm-svn: 42942
-