| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unused warnings for functions:
-static functions
-functions in anonymous namespace
-class methods in anonymous namespace
-class method specializations in anonymous namespace
-function specializations in anonymous namespace
Unused warnings for variables:
-static variables
-variables in anonymous namespace
-static data members in anonymous namespace
-static data members specializations in anonymous namespace
Reveals lots of opportunities for dead code removal in llvm codebase that will
interest my esteemed colleagues.
llvm-svn: 111086
|
|
|
|
| |
llvm-svn: 111036
|
|
|
|
|
|
|
|
|
| |
-static variables
-variables in anonymous namespace (fixes rdar://7794535)
-static data members in anonymous namespace
-static data members specializations in anonymous namespace
llvm-svn: 111027
|
|
|
|
|
|
|
|
|
|
| |
-static function declarations
-functions in anonymous namespace
-class methods in anonymous namespace
-class method specializations in anonymous namespace
-function specializations in anonymous namespace
llvm-svn: 111026
|
|
|
|
| |
llvm-svn: 110945
|
|
|
|
| |
llvm-svn: 110912
|
|
|
|
| |
llvm-svn: 110860
|
|
|
|
| |
llvm-svn: 110432
|
|
|
|
|
|
| |
a class template. Fixes rdar://problem/8243419.
llvm-svn: 109967
|
|
|
|
|
|
| |
since we aren't going to be calling them ever.
llvm-svn: 109377
|
|
|
|
|
|
|
|
|
|
|
| |
detail and introduce
FunctionTemplateDecl::findSpecialization.
Redeclarations of specializations will not cause the previous decl to be removed from the set,
the set will keep the canonical decl. findSpecialization will return the most recent redeclaration.
llvm-svn: 108834
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
implementation detail (InsertPos
leaks though) and add methods to its interface for adding/finding specializations.
Simplifies its users a bit and we no longer need to replace specializations in the folding set with
their redeclarations. We just return the most recent redeclarations.
As a bonus, it fixes http://llvm.org/PR7670.
llvm-svn: 108832
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
template
The rationale is that we are copying the entire definition including
parameter names which may differ between the declaration and the
definition.
This is particularly important if any parameters are unnamed in the
declaration, as a DeclRef to an unnamed ParmVarDecl would cause the
pretty printer to produce invalid output.
llvm-svn: 108643
|
|
|
|
|
|
|
| |
to set that of VarDecl for block variables
(they are already set). Per Doug's comment.
llvm-svn: 108273
|
|
|
|
|
|
| |
to block context when first instantiating them.
llvm-svn: 108266
|
|
|
|
|
|
| |
VarDecl.
llvm-svn: 108218
|
|
|
|
| |
llvm-svn: 108195
|
|
|
|
|
|
|
| |
a template, be sure to include the template arguments from the
injected-class-name. Fixes PR7587.
llvm-svn: 107895
|
|
|
|
|
|
|
|
| |
of getBody() when we are just checking the existence of a body, to avoid de-serialization of the body from PCH.
Makes de-serialization of the function body even more "lazier".
llvm-svn: 107768
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
current attribute system, but it is enough to handle class templates which
specify parts of their alignment in terms of their template parameters.
This also replaces the attributes test in SemaTemplate with one that actually
tests working attributes instead of broken ones. I plan to add more tests here
for non-dependent attributes in a subsequent patch.
Thanks to John for walking me through some of this. =D
llvm-svn: 106818
|
|
|
|
|
|
|
|
|
| |
attribute as part of the calculation. Sema::MarkDeclReferenced(), and
a few other places, want only to consider the "used" bit to determine,
e.g, whether to perform template instantiation. Fixes a linkage issue
with Boost.Serialization.
llvm-svn: 106252
|
|
|
|
| |
llvm-svn: 106100
|
|
|
|
| |
llvm-svn: 106099
|
|
|
|
| |
llvm-svn: 106003
|
|
|
|
| |
llvm-svn: 105716
|
|
|
|
| |
llvm-svn: 105525
|
|
|
|
| |
llvm-svn: 105465
|
|
|
|
|
|
|
|
| |
The macros required for DeclNodes use have changed to match the use of
StmtNodes. The FooFirst enumerator constants have been named firstFoo
to match usage elsewhere.
llvm-svn: 105165
|
|
|
|
|
|
| |
aren't dependent. Fixes <rdar://problem/8020206>.
llvm-svn: 104511
|
|
|
|
|
|
|
| |
be sure to merge its parameter scope with its parent's scope. Fixes
PR7184.
llvm-svn: 104386
|
|
|
|
|
|
|
|
|
| |
sure that the anonymous struct/union record declaration gets
instantiated before the variable declaration, and that it and its
fields (recursively) get entries in the local instantiation map. Fixes
PR7088.
llvm-svn: 104305
|
|
|
|
| |
llvm-svn: 104121
|
|
|
|
| |
llvm-svn: 104106
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Revert much of the implementation of C++98/03 [temp.friend]p5 in
r103943 and its follow-ons r103948 and r103952. While our
implementation was technically correct, other compilers don't seem to
implement this paragraph (which forces the instantiation of friend
functions defined in a class template when a class template
specialization is instantiated), and doing so broke a bunch of Boost
libraries.
Since this behavior has changed in C++0x (which instantiates the
friend function definitions when they are used), we're going to skip
the nowhere-implemented C++98/03 semantics and go straight to the
C++0x semantics.
This commit is a band-aid to get Boost up and running again. It
doesn't really fix PR6952 (which this commit un-fixes), but it does
deal with the way Boost.Units abuses this particular paragraph.
llvm-svn: 104014
|
|
|
|
|
|
|
| |
when we really need a proper audit of our handling of attributes in
templates.
llvm-svn: 103999
|
|
|
|
|
|
|
| |
functions defined inside a class template. Fixes PR6952, the last
Boost.Units failure.
llvm-svn: 103952
|
|
|
|
|
|
|
| |
class template conflicts with an existing (non-template)
definition. This is another part of PR6952.
llvm-svn: 103948
|
|
|
|
|
|
|
|
| |
within class templates be instantiated along with each class template
specialization, even if the functions are not used. Do so, as a baby
step toward PR6952.
llvm-svn: 103943
|
|
|
|
|
|
|
| |
potentially-evaluated expression context, to ensure that used
declarations get properly marked. Fixes PR7123.
llvm-svn: 103624
|
|
|
|
|
|
|
|
|
| |
particular, don't complain about unused variables that have dependent
type until instantiation time, so that we can look at the type of the
variable. Moreover, only complain about unused variables that have
neither a user-declared constructor nor a non-trivial destructor.
llvm-svn: 103362
|
|
|
|
|
|
|
| |
mark any declarations we see inside of that type as
"referenced". Fixes PR7079.
llvm-svn: 103323
|
|
|
|
|
|
|
|
|
| |
different tag kind ("struct" vs. "class") than the primary template,
which has an affect on access control.
Should fix the last remaining Boost.Accumulors failure.
llvm-svn: 103144
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
typedef int functype(int, int);
functype func;
also instantiate the synthesized function parameters for the resulting
function declaration.
With this change, Boost.Wave builds and passes all of its regression
tests.
llvm-svn: 103025
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
friend function template, be sure to adjust the computed template
argument lists based on the location of the definition of the function
template: it's possible that the definition we're instantiating with
and the template declaration that we found when creating the
specialization are in different contexts, which meant that we would
end up using the wrong template arguments for instantiation.
Fixes PR7013; all Boost.DynamicBitset tests now pass.
llvm-svn: 102974
|
|
|
|
|
|
|
|
| |
mapping from the declaration in the template to the instantiated
declaration before transforming the initializer, in case some crazy
lunatic decides to use a variable in its own initializer. Fixes PR7016.
llvm-svn: 102945
|
|
|
|
|
|
|
| |
to enter the instantiated parameter declarations into the local
instantiation scope; they can't be referenced anyway. Fixes PR7022.
llvm-svn: 102914
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of the mapping from local declarations to their instantiated
counterparts during template instantiation. Previously, we tried to do
some unholy merging of local instantiation scopes that involved
storing a single hash table along with an "undo" list on the
side... which was ugly, and never handled function parameters
properly.
Now, we just keep separate hash tables for each local instantiation
scope, and "combining" two scopes means that we'll look in each of the
combined hash tables. The combined scope stack is rarely deep, and
this makes it easy to avoid the "undo" issues we were hitting. Also,
I've simplified the logic for function parameters: if we're declaring
a function and we need the function parameters to live longer, we just
push them back into the local instantiation scope where we need them.
Fixes PR6990.
llvm-svn: 102732
|
|
|
|
|
|
|
|
|
|
|
| |
specializations, which keeps track of the order in which they were
originally declared. We use this number so that we can always walk the
list of partial specializations in a predictable order during matching
or template instantiation. This also fixes a failure in Boost.Proto,
where SourceManager::isBeforeInTranslationUnit was behaving
poorly in inconsistent ways.
llvm-svn: 102693
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of a class template or class template partial specialization. That is to
say, in
template <class T> class A { ... };
or
template <class T> class B<const T*> { ... };
make 'A<T>' and 'B<const T*>' sugar for the corresponding InjectedClassNameType
when written inside the appropriate context. This allows us to track the
current instantiation appropriately even inside AST routines. It also allows
us to compute a DeclContext for a type much more efficiently, at some extra
cost every time we write a template specialization (which can be optimized,
but I've left it simple in this patch).
llvm-svn: 102407
|
|
|
|
|
|
|
| |
declaration" (i.e. the only which will actually be looked up) to have the
non-member-operator bit.
llvm-svn: 102231
|