| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
types, from David Majnemer
llvm-svn: 74850
|
| |
|
|
|
|
| |
from Enea Zaffanella!
llvm-svn: 74831
|
| |
|
|
| |
llvm-svn: 74787
|
| |
|
|
|
|
| |
using ASTContxt allocation.
llvm-svn: 74717
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
declaration in the AST.
The new ASTContext::getCommentForDecl function searches for a comment
that is attached to the given declaration, and returns that comment,
which may be composed of several comment blocks.
Comments are always available in an AST. However, to avoid harming
performance, we don't actually parse the comments. Rather, we keep the
source ranges of all of the comments within a large, sorted vector,
then lazily extract comments via a binary search in that vector only
when needed (which never occurs in a "normal" compile).
Comments are written to a precompiled header/AST file as a blob of
source ranges. That blob is only lazily loaded when one requests a
comment for a declaration (this never occurs in a "normal" compile).
The indexer testbed now supports comment extraction. When the
-point-at location points to a declaration with a Doxygen-style
comment, the indexer testbed prints the associated comment
block(s). See test/Index/comments.c for an example.
Some notes:
- We don't actually attempt to parse the comment blocks themselves,
beyond identifying them as Doxygen comment blocks to associate them
with a declaration.
- We won't find comment blocks that aren't adjacent to the
declaration, because we start our search based on the location of
the declaration.
- We don't go through the necessary hops to find, for example,
whether some redeclaration of a declaration has comments when our
current declaration does not. Similarly, we don't attempt to
associate a \param Foo marker in a function body comment with the
parameter named Foo (although that is certainly possible).
- Verification of my "no performance impact" claims is still "to be
done".
llvm-svn: 74704
|
| |
|
|
|
|
| |
Per Doug's comments. Doug please review.
llvm-svn: 74666
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
by distinguishing between substitution that occurs for template
argument deduction vs. explicitly-specifiad template arguments. This
is used both to improve diagnostics and to make sure we only provide
SFINAE in those cases where SFINAE should apply.
In addition, deal with the sticky issue where SFINAE only considers
substitution of template arguments into the *type* of a function
template; we need to issue hard errors beyond this point, as
test/SemaTemplate/operator-template.cpp illustrates.
llvm-svn: 74651
|
| |
|
|
|
|
| |
Also has fix for bugzilla-4469.
llvm-svn: 74631
|
| |
|
|
|
|
|
|
|
| |
This was necessary to simplify some other changes I'm making (wrt ObjC type cleanups).
The idea is to separate the constraint checks for block pointers, ObjC pointers, and C pointers (the previous code combined them into one clause).
Note: This routine will be further simplified when I integrate the ObjC type cleanups (forthcoming).
llvm-svn: 74604
|
| |
|
|
|
|
|
| |
are fewer template arguments than there are template parameters for
that function.
llvm-svn: 74578
|
| |
|
|
|
|
|
|
|
| |
substitute those template arguments into the function parameter types
prior to template argument deduction. There's still a bit of work to
do to make this work properly when only some of the template arguments
are specified.
llvm-svn: 74576
|
| |
|
|
|
|
| |
list.
llvm-svn: 74571
|
| |
|
|
|
|
|
| |
templates, such as make<int&>. These template-ids are only barely
functional for function calls; much more to come.
llvm-svn: 74563
|
| |
|
|
|
|
| |
fields in the ctor-initializer list.
llvm-svn: 74554
|
| |
|
|
|
|
| |
in ctor-initializer list.
llvm-svn: 74541
|
| |
|
|
|
|
|
|
|
|
|
|
| |
instantiation stack so that we provide a full instantiation
backtrace. Previously, we performed all of the instantiations implied
by the recursion, but each looked like a "top-level" instantiation.
The included test case tests the previous fix for the instantiation of
DeclRefExprs. Note that the "instantiated from" diagnostics still
don't tell us which template arguments we're instantiating with.
llvm-svn: 74540
|
| |
|
|
| |
llvm-svn: 74533
|
| |
|
|
|
|
|
|
|
|
|
| |
"semantic analysis" part. Use the "semantic analysis" part when
performing template instantiation on a DeclRefExpr, rather than an ad
hoc list of rules to construct DeclRefExprs from the instantiation.
A test case for this change will come in with a large commit, which
illustrates what I was actually trying to work on.
llvm-svn: 74528
|
| |
|
|
|
|
| |
David Majnemer!
llvm-svn: 74513
|
| |
|
|
|
|
|
| |
Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating".
Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit.
llvm-svn: 74506
|
| |
|
|
|
|
|
|
| |
subclasses.
Timings showed no significant difference before and after the commit.
llvm-svn: 74504
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 74486
|
| |
|
|
| |
llvm-svn: 74481
|
| |
|
|
|
|
| |
list.
llvm-svn: 74480
|
| |
|
|
|
|
| |
overloaded function decl.
llvm-svn: 74472
|
| |
|
|
|
|
| |
in the ctor-initializer list. More to come.
llvm-svn: 74465
|
| |
|
|
| |
llvm-svn: 74460
|
| |
|
|
|
|
|
| |
redundant, implicit instantiations of function templates and provide a
place where we can hang function template specializations.
llvm-svn: 74454
|
| |
|
|
|
|
| |
by pointer.
llvm-svn: 74432
|
| |
|
|
|
|
| |
Convert clients to use ASTContext::getObjCObjectPointerType().
llvm-svn: 74424
|
| |
|
|
|
|
| |
Fixes PR4470.
llvm-svn: 74413
|
| |
|
|
|
|
| |
The issue this was working around is no longer present in TOT clang.
llvm-svn: 74411
|
| |
|
|
|
|
|
|
| |
Handle rules for ExtVector + ExtVector and ExtVector + Scalar operations.
Fix problem Eli noticed where we were allowing pointer types to be splatted to
vector elements.
llvm-svn: 74404
|
| |
|
|
| |
llvm-svn: 74397
|
| |
|
|
| |
llvm-svn: 74390
|
| |
|
|
| |
llvm-svn: 74386
|
| |
|
|
|
|
| |
parameter has a dependent type.
llvm-svn: 74380
|
| |
|
|
| |
llvm-svn: 74369
|
| |
|
|
| |
llvm-svn: 74362
|
| |
|
|
| |
llvm-svn: 74359
|
| |
|
|
|
|
|
| |
deduction using a base class of the argument type. No actual
functionality change; this is just a hook.
llvm-svn: 74356
|
| |
|
|
|
|
|
|
| |
deduction from pointer and pointer-to-member types to work even in the
presence of a qualification conversion (C++ [temp.deduct.type]p3
bullet 2).
llvm-svn: 74354
|
| |
|
|
| |
llvm-svn: 74339
|
| |
|
|
|
|
|
|
|
|
| |
of template instantiation, we were dropping cv-qualifiers on the
instantiated type in a few places. This change reshuffles the
type-instantiation code a little bit so that there's a single place
where we add qualifiers to the instantiated type, so that we won't end
up with this same bug in the future.
llvm-svn: 74331
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
non-dependent parameter types. Instead, class template partial
specializations perform a final check of all of the instantiated
arguments. This model is cleaner, and works better for function
templates where the "final check" occurs during overload resolution.
Also, cope with cv-qualifiers when the parameter type was originally a
reference type, so that the deduced argument can be more qualified
than the transformed argument.
llvm-svn: 74323
|
| |
|
|
| |
llvm-svn: 74314
|
| |
|
|
| |
llvm-svn: 74312
|
| |
|
|
| |
llvm-svn: 74307
|
| |
|
|
|
|
|
| |
deducing template arguments from a function call. Plus, add a bunch of
tests.
llvm-svn: 74301
|