| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Sema::ParseObjCStringLiteral.
llvm-svn: 64900
|
|
|
|
|
|
| |
stuff behind a private static function.
llvm-svn: 64898
|
|
|
|
| |
llvm-svn: 64896
|
|
|
|
|
|
| |
it faster in the common case when NSConstantString is around.
llvm-svn: 64895
|
|
|
|
| |
llvm-svn: 64894
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
This implements gcc/testsuite/objc.dg/method-attribute-1.m
llvm-svn: 64581
|
|
|
|
|
|
| |
gcc has.
llvm-svn: 64562
|
|
|
|
|
|
| |
ActOnClassMessage/ActOnInstanceMessage.
llvm-svn: 64560
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
redundant #includes. Patch by Anders Johnsen!
llvm-svn: 63271
|
|
|
|
|
|
|
|
|
|
| |
LookupDeclInContext().
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
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
.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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
| |
type.
llvm-svn: 62355
|
|
|
|
|
|
| |
to do the promotion before checking the type - fixes PR3340.
llvm-svn: 62323
|
|
|
|
|
|
| |
function/method/block.
llvm-svn: 62148
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
of category implementation is undeclared. Issue error instead.
llvm-svn: 61882
|
|
|
|
|
|
|
| |
change the semantics. Please correct this if the precedence was
actually supposed to be something different.
llvm-svn: 61099
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 59831
|
|
|
|
| |
llvm-svn: 59714
|
|
|
|
|
|
|
| |
just check for it when needed. It doesn't incur real cost
in any hot paths.
llvm-svn: 59708
|
|
|
|
|
|
| |
The core fix in Sema::ActOnClassMessage(). All the other changes have to do with passing down the SourceLocation for the receiver (to properly position the cursor when producing an error diagnostic).
llvm-svn: 59639
|
|
|
|
| |
llvm-svn: 59609
|
|
|
|
|
|
|
|
| |
__builtin_prefetch code to only emit one diagnostic per builtin_prefetch.
While this has nothing to do with the rest of the patch, the code seemed
like overkill when I was updating it.
llvm-svn: 59588
|
|
|
|
|
|
| |
Missing special lookup rule in Sema::ActOnInstanceMessage().
llvm-svn: 59467
|
|
|
|
|
|
| |
'super'. Remove ObjCThis from PredefinedExpr
llvm-svn: 58698
|
|
|
|
|
|
|
|
| |
scope) fails to handle overloaded selectors properly.
Long standing bug in Sema::ActOnInstanceMessage(). We now warn when messaging an "id" with multiple method signatures in scope. The diags are a little verbose, however they can be streamlined if necessary.
llvm-svn: 56843
|
|
|
|
| |
llvm-svn: 56791
|
|
|
|
|
|
| |
effectively declare it for methods below.
llvm-svn: 56771
|
|
|
|
|
|
|
|
|
| |
(1) Additional arguments to variadic methods should have default
promotions applied.
(2) Additional arguments to non-variadic methods were allowed.
llvm-svn: 56084
|
|
|
|
|
|
|
|
|
| |
no method declaration was found.
- This was allowing arrays to pass "by value" among other things.
Add assert in CodeGen that arguments cannot have array type.
llvm-svn: 56080
|
|
|
|
|
|
|
| |
CheckMessageArgumentTypes.
- No functionality change.
llvm-svn: 56079
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Added as private members for each because it is not clear where to
put the common definition. Perhaps the IdentifierInfos all of these
"pseudo-keywords" should be collected into one place (this would
KnownFunctionIDs and Objective-C property IDs, for example).
Remove Token::isNamedIdentifier.
- There isn't a good reason to use strcmp when we have interned
strings, and there isn't a good reason to encourage clients to do
so.
llvm-svn: 54794
|
|
|
|
|
|
|
| |
- Drop TokenKinds.h from Action.h
- Move DeclSpec.h from Sema.h into individual Sema .cpp files
llvm-svn: 54625
|
|
|
|
| |
llvm-svn: 54605
|
|
|
|
|
|
| |
ASTContext::getCanonicalType instead (PR2189)
llvm-svn: 54105
|
|
|
|
|
|
|
| |
(a) removes a bogus warning.
(b) removes an undesirable usage of the ObjCMessageExpr constructor that takes an IdentifierInfo * (which I will abolish).
llvm-svn: 54042
|
|
|
|
|
|
|
|
| |
This fixes a critical rewriter bug (<rdar://problem/6096760> clang ObjC rewriter: 'self' not expected value in class method called with 'super').
Also added a couple FIXME's since I'm not happy with my fix to Sema. It would be nicer if the super handling for class/instance messages was the same (based on PreDefinedExpr).
llvm-svn: 53994
|