- Feb 26, 2009
-
-
http://llvm.org/bugs/show_bug.cgi?id=3544Steve Naroff authored
The code for looking up local/private method in Sema::ActOnInstanceMessage() was not handling categories properly. Sema::ActOnClassMessage() didn't have this bug. Created a helper with the correct logic and changed both methods to use it. llvm-svn: 65532
-
- Feb 24, 2009
-
-
Chris Lattner authored
The big difference here is that (like string literal) @encode has array type, not pointer type. llvm-svn: 65391
-
- Feb 23, 2009
-
-
Steve Naroff authored
I don't think casting super makes any sense (since it won't effect method lookup). Will discuss with other offline and decide what to do. llvm-svn: 65317
-
Steve Naroff authored
Sema::ActOnInstanceMessage(): Tighen up the lookup rules for handling messages to 'Class'. Also improve "super" handling. llvm-svn: 65300
-
- Feb 22, 2009
-
-
Steve Naroff authored
llvm-svn: 65293
-
Steve Naroff authored
Contains the following (related to problems found while investigting <rdar://problem/6497631> Message lookup is sometimes different than gcc's). - Implement instance/class overloading in ObjCContainerDecl (removing a FIXME). This involved hacking NamedDecl::declarationReplaces(), which took awhile to figure out (didn't realize replace was the default). - Changed Sema::ActOnInstanceMessage() to remove redundant warnings when dealing with protocols. For now, I've omitted the "protocol" term in the diagnostic. It simplifies the code flow and wan't always 100% accurate (e.g. "Foo<Prot>" looks in the class interface, not just the protocol). - Changed several test cases to jive with the above changes. llvm-svn: 65292
-
Steve Naroff authored
llvm-svn: 65257
-
- Feb 21, 2009
-
-
Steve Naroff authored
This is necessary 'plumbing' to fix <rdar://problem/6497631> Message lookup is sometimes different than gcc's. llvm-svn: 65248
-
- Feb 20, 2009
-
-
Chris Lattner authored
interfaces more consistently. llvm-svn: 65138
-
- Feb 18, 2009
-
-
Douglas Gregor authored
(as GCC does), except when we've performed overload resolution and found an unavailable function: in this case, we actually error. Merge the checking of unavailable functions with the checking for deprecated functions. This unifies a bit of code, and makes sure that we're checking for unavailable functions in the right places. Also, this check can cause an error. We may, eventually, want an option to make "unavailable" warnings into errors. Implement much of the logic needed for C++0x deleted functions, which are effectively the same as "unavailable" functions (but always cause an error when referenced). However, we don't have the syntax to specify deleted functions yet :) llvm-svn: 64955
-
Chris Lattner authored
Sema::ParseObjCStringLiteral. llvm-svn: 64900
-
Chris Lattner authored
stuff behind a private static function. llvm-svn: 64898
-
Chris Lattner authored
llvm-svn: 64896
-
Chris Lattner authored
it faster in the common case when NSConstantString is around. llvm-svn: 64895
-
Chris Lattner authored
llvm-svn: 64894
-
Chris Lattner authored
the various PPTokens that are pasted together to make it. In the course of working on this, I discovered ParseObjCStringLiteral which needs some work. I'll tackle it next. llvm-svn: 64892
-
- Feb 15, 2009
-
-
Chris Lattner authored
DiagnoseUseOfDeprecatedDecl method. This ensures that they are treated consistently. This gets us 'unavailable' support on a few new types of decls, and makes sure we consistently silence deprecated when the caller is also deprecated. llvm-svn: 64612
-
Chris Lattner authored
This implements gcc/testsuite/objc.dg/method-attribute-1.m llvm-svn: 64581
-
- Feb 14, 2009
-
-
Anders Carlsson authored
llvm-svn: 64562
-
Anders Carlsson authored
llvm-svn: 64560
-
- Feb 12, 2009
-
-
Steve Naroff authored
- rename isObjCIdType/isObjCClassType -> isObjCIdStructType/isObjCClassStructType. The previous name didn't do what you would expect. - add back isObjCIdType/isObjCClassType to do what you would expect. Not currently used, however many of the isObjCIdStructType/isObjCClassStructType clients could be converted over time. - move static Sema function areComparableObjCInterfaces to ASTContext (renamed to areComparableObjCPointerTypes, since it now operates on pointer types). llvm-svn: 64385
-
- Feb 07, 2009
-
-
Ted Kremenek authored
- Made allocation of Stmt objects using vanilla new/delete a *compiler error* by making this new/delete "protected" within class Stmt. - Now the only way to allocate Stmt objects is by using the new operator that takes ASTContext& as an argument. This ensures that all Stmt nodes are allocated from the same (pool) allocator. - Naturally, these two changes required that *all* creation sites for AST nodes use new (ASTContext&). This is a large patch, but the majority of the changes are just this mechanical adjustment. - The above changes also mean that AST nodes can no longer be deallocated using 'delete'. Instead, one most do StmtObject->Destroy(ASTContext&) or do ASTContextObject.Deallocate(StmtObject) (the latter not running the 'Destroy' method). Along the way I also... - Made CompoundStmt allocate its array of Stmt* using the allocator in ASTContext (previously it used std::vector). There are a whole bunch of other Stmt classes that need to be similarly changed to ensure that all memory allocated for ASTs comes from the allocator in ASTContext. - Added a new smart pointer ExprOwningPtr to Sema.h. This replaces the uses of llvm::OwningPtr within Sema, as llvm::OwningPtr used 'delete' to free memory instead of a Stmt's 'Destroy' method. Big thanks to Doug Gregor for helping with the acrobatics of making 'new/delete' private and the new smart pointer ExprOwningPtr! llvm-svn: 63997
-
- Feb 06, 2009
-
-
Ted Kremenek authored
ASTContext. This required changing all clients to pass in the ASTContext& to the constructor of StringLiteral. I also changed all allocations of StringLiteral to use new(ASTContext&). Along the way, I updated a bunch of new()'s in StmtSerialization.cpp to use the allocator from ASTContext& (not complete). llvm-svn: 63958
-
- Feb 04, 2009
-
-
Douglas Gregor authored
- Changes Lookup*Name functions to return NamedDecls, instead of Decls. Unfortunately my recent statement that it will simplify lot of code, was not quite right, but it simplifies some... - Makes MergeLookupResult SmallPtrSet instead of vector, following Douglas suggestions. - Adds %qN format for printing qualified names to Diagnostic. - Avoids searching for using-directives in Scopes, which are not DeclScope, during unqualified name lookup. llvm-svn: 63739
-
- Jan 30, 2009
-
-
Douglas Gregor authored
LookupName et al. Instead, use an enum and a bool to describe its contents. Optimized the C/Objective-C path through LookupName, eliminating any unnecessarily C++isms. Simplify IdentifierResolver::iterator, removing some code and arguments that are no longer used. Eliminated LookupDeclInScope/LookupDeclInContext, moving all callers over to LookupName, LookupQualifiedName, or LookupParsedName, as appropriate. All together, I'm seeing a 0.2% speedup on Cocoa.h with PTH and -disable-free. Plus, we're down to three name-lookup routines. llvm-svn: 63354
-
- Jan 29, 2009
-
-
Chris Lattner authored
redundant #includes. Patch by Anders Johnsen! llvm-svn: 63271
-
Steve Naroff authored
The previous interface was very confusing. This is much more explicit, which will be easier to understand/optimize/convert. The plan is to eventually deprecate both of these functions. For now, I'm focused on performance. llvm-svn: 63256
-
- Jan 28, 2009
-
-
Steve Naroff authored
Even though Sema::LookupDecl() is deprecated, it's still used all over the place. Simplifying the interface will make it easier to understand/optimize/convert. llvm-svn: 63210
-
- Jan 27, 2009
-
-
Chris Lattner authored
.def file for each library. This means that adding a diagnostic to sema doesn't require all the other libraries to be rebuilt. Patch by Anders Johnsen! llvm-svn: 63111
-
- Jan 26, 2009
-
-
Douglas Gregor authored
- When it's safe, ActionResult uses the low bit of the pointer for the "invalid" flag rather than a separate "bool" value. This keeps GCC from generating some truly awful code, for a > 3x speedup in the result-passing microbenchmark. - When DISABLE_SMART_POINTERS is defined, store an ActionResult within ASTOwningResult rather than an ASTOwningPtr. Brings the performance benefits of the above to smart pointers with DISABLE_SMART_POINTERS defined. Sadly, these micro-benchmark performance improvements don't seem to make much of a difference on Cocoa.h right now. However, they're harmless and might help with future optimizations. llvm-svn: 63061
-
- Jan 16, 2009
-
-
Fariborz Jahanian authored
type. llvm-svn: 62355
-
Anders Carlsson authored
Use a single function for doing vararg argument promotion. Also, make sure to do the promotion before checking the type - fixes PR3340. llvm-svn: 62323
-
- Jan 13, 2009
-
-
Anders Carlsson authored
llvm-svn: 62148
-
- Jan 09, 2009
-
-
Douglas Gregor authored
filters the decls seen by decl_iterator with two criteria: the dynamic type of the declaration and a run-time predicate described by a member function. This simplifies EnumDecl, RecordDecl, and ObjCContainerDecl considerably. It has no measurable performance impact. llvm-svn: 61994
-
- Jan 07, 2009
-
-
Fariborz Jahanian authored
of category implementation is undeclared. Issue error instead. llvm-svn: 61882
-
- Dec 16, 2008
-
-
Eli Friedman authored
change the semantics. Please correct this if the precedence was actually supposed to be something different. llvm-svn: 61099
-
- Nov 24, 2008
-
-
Chris Lattner authored
instead of converting them to strings first. This also fixes a bunch of minor inconsistencies in the diagnostics emitted by clang and adds a bunch of FIXME's to DiagnosticKinds.def. llvm-svn: 59948
-
Chris Lattner authored
uses of getName() with uses of getDeclName(). This upgrades a bunch of diags to take DeclNames instead of std::strings. This also tweaks a couple of diagnostics to be cleaner and changes CheckInitializerTypes/PerformInitializationByConstructor to pass around DeclarationNames instead of std::strings. llvm-svn: 59947
-
Chris Lattner authored
a new NamedDecl::getAsString() method. Change uses of Selector::getName() to just pass in a Selector where possible (e.g. to diagnostics) instead of going through an std::string. This also adds new formatters for objcinstance and objcclass as described in the dox. llvm-svn: 59933
-
- Nov 23, 2008
-
-
Chris Lattner authored
with implicit quotes around them. This has a bunch of follow-on effects and requires tweaking to a whole lot of code. This causes a regression in two tests (xfailed) by causing it to emit things like: Line 10: duplicate interface declaration for category 'MyClass1' ('Category1') instead of: Line 10: duplicate interface declaration for category 'MyClass1(Category1)' I will fix this in a follow-up commit. As part of this, I had to start switching stuff to use ->getDeclName() instead of Decl::getName() for consistency. This is good, but I was planning to do this as an independent patch. There will be several follow-on patches to clean up some of the mess, but this patch is already too big. llvm-svn: 59917
-