| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
instantiating class members as part of an explicit
instantiation. Addresses a compilation problem in
Boost.Serialization.
llvm-svn: 101725
|
|
|
|
|
|
|
|
|
|
|
| |
intended for redeclarations, fixing those that need it. Fixes PR6831.
This uncovered an issue where the C++ type-specifier-seq parsing logic
would try to perform name lookup on an identifier after it already had
a type-specifier, which could also lead to spurious ambiguity errors
(as in PR6831, but with a different test case).
llvm-svn: 101419
|
|
|
|
|
|
|
| |
ActOnClassTemplateSpecialization and being very confused.
Fixes PR6514 (for non-templated-scope friends).
llvm-svn: 101198
|
|
|
|
|
|
|
|
| |
code the first time.
Fixes PR6827.
llvm-svn: 101184
|
|
|
|
|
|
|
|
|
| |
name-lookup ambiguities when there are multiple base classes that are
all specializations of the same class template. This is part of a
general cleanup for ambiguities in template-name lookup. Fixes
PR6717.
llvm-svn: 101065
|
|
|
|
|
|
|
| |
ended up finding a function template that we didn't expect. Recover
more gracefully, and fix a similar issue for class templates.
llvm-svn: 101040
|
|
|
|
|
|
|
|
|
|
|
|
| |
specializations when the explicit instantiation was... explicitly
written, i.e., not the product of an explicit instantiation of an
enclosing class. Fixes this spurious warning when Clang builds LLVM:
/Volumes/Data/dgregor/Projects/llvm/lib/CodeGen/MachineDominators.cpp:22:1:
warning: explicit instantiation of 'addRoot' that occurs after an
explicit specialization will be ignored (C++0x extension) [-pedantic]
llvm-svn: 100900
|
|
|
|
|
|
|
|
| |
Remove -faccess-control from -cc1; add -fno-access-control.
Make the driver pass -fno-access-control by default.
Update a bunch of tests to be correct under access control.
llvm-svn: 100880
|
|
|
|
|
|
| |
type isn't dependent. Fixes rdar://problem/7838962.
llvm-svn: 100871
|
|
|
|
|
|
| |
Fixes PR6752.
llvm-svn: 100806
|
|
|
|
|
|
|
| |
Declarator that depends on it. This fixes several redundant errors and bad
recoveries.
llvm-svn: 100779
|
|
|
|
| |
llvm-svn: 100753
|
|
|
|
|
|
|
|
|
|
|
| |
- When instantiating a friend type template, perform semantic
analysis on the resulting type.
- Downgrade the errors concerning friend type declarations that do
not refer to classes to ExtWarns in C++98/03. C++0x allows
practically any type to be befriended, and ignores the friend
declaration if the type is not a class.
llvm-svn: 100635
|
|
|
|
|
|
|
|
|
|
|
| |
an object or function. Our previous checking was too lax, and ended up
allowing missing or extraneous address-of operators, among other
evils. The new checking provides better diagnostics and adheres more
closely to the standard.
Fixes PR6563 and PR6749.
llvm-svn: 100125
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
check deduced non-type template arguments and template template
arguments against the template parameters for which they were deduced,
performing conversions as appropriate so that deduced template
arguments get the same treatment as explicitly-specified template
arguments. This is the bulk of PR6723.
Also keep track of whether deduction of a non-type template argument
came from an array bound (vs. anywhere else). With this information,
we enforce C++ [temp.deduct.type]p17, which requires exact type
matches when deduction deduces a non-type template argument from
something that is not an array bound.
Finally, when in a SFINAE context, translate the "zero sized
arrays are an extension" extension diagnostic into a hard error (for
better standard conformance), which was a minor part of PR6723.
llvm-svn: 99734
|
|
|
|
| |
llvm-svn: 99708
|
|
|
|
| |
llvm-svn: 99613
|
|
|
|
|
|
| |
pattern if it has a body.
llvm-svn: 99610
|
|
|
|
| |
llvm-svn: 99601
|
|
|
|
|
|
|
|
|
| |
that we extend/truncate then correct the sign to convert the non-type
template argument to the template parameter's type. Previously, we
reported an error when the non-type template argument was out of
range; now we just warn.
llvm-svn: 99600
|
|
|
|
| |
llvm-svn: 99596
|
|
|
|
|
|
| |
broken tramp3d-v4.
llvm-svn: 99583
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the type of its corresponding non-type template parameter changes the
value. Previously, we were diagnosing this as an error, which was
wrong. We give reasonably nice warnings like:
test/SemaTemplate/temp_arg_nontype.cpp:100:10: warning: non-type template
argument value '256' truncated to '0' for template parameter of type
'unsigned char'
Overflow<256> *overflow3; // expected-warning{{non-type template ...
^~~
test/SemaTemplate/temp_arg_nontype.cpp:96:24: note: template parameter is
declared here
template<unsigned char C> struct Overflow;
^
llvm-svn: 99561
|
|
|
|
|
|
|
| |
we look for shadow friend decls in the appropriate scope before injecting
a new declaration.
llvm-svn: 99552
|
|
|
|
|
|
|
| |
the redeclaration chain. Recommitted from r99477 with a fix: we need to
merge in default template arguments from previous declarations.
llvm-svn: 99496
|
|
|
|
|
|
|
|
|
|
|
| |
buildbot. The tramp3d test fails.
--- Reverse-merging r99477 into '.':
U test/SemaTemplate/friend-template.cpp
U test/CXX/temp/temp.decls/temp.friend/p1.cpp
U lib/Sema/SemaTemplateInstantiateDecl.cpp
U lib/Sema/SemaAccess.cpp
llvm-svn: 99481
|
|
|
|
| |
llvm-svn: 99477
|
|
|
|
|
|
|
|
| |
since we have absolutely no way to match them when they are declared
nor do we have a way to represent these parsed-but-not-checked friend
declarations.
llvm-svn: 99407
|
|
|
|
| |
llvm-svn: 99389
|
|
|
|
|
|
|
|
|
| |
templates. So delay access-control diagnostics when (for example) the target
of a friend declaration is a specific specialization of a template.
I was surprised to find that this was required for an access-controlled selfhost.
llvm-svn: 99383
|
|
|
|
| |
llvm-svn: 98764
|
|
|
|
|
|
|
| |
comparing DeclContext pointers, to avoid having to remember to call
getPrimaryContext() everywhere. This is the last part PR6594.
llvm-svn: 98546
|
|
|
|
|
|
|
|
|
|
|
| |
parameter hides a namespace-scope declararion with the same name in an
out-of-line definition of a template. The lookup requires a strange
interleaving of lexical and semantic scopes (go C++), which I have not
yet handled in the typo correction/code completion path.
Fixes PR6594.
llvm-svn: 98544
|
|
|
|
|
|
|
|
|
| |
iterations of this patch gave explicit template instantiation
link-once ODR linkage, which permitted the back end to eliminate
unused symbols. Weak ODR linkage still requires the symbols to be
generated.
llvm-svn: 98441
|
|
|
|
|
|
| |
to look incompetent
llvm-svn: 98425
|
|
|
|
| |
llvm-svn: 98424
|
|
|
|
|
|
| |
amiss
llvm-svn: 98332
|
|
|
|
|
|
| |
them). Fixes PR6578.
llvm-svn: 98328
|
|
|
|
|
|
|
|
|
|
|
|
| |
declarations after the member has been explicitly specialized. We already
did this after explicit instantiation definitions; not doing it for
declarations meant that subsequent definitions would see a previous
member declaration with specialization kind "explicit instantiation decl",
which would then happily get overridden.
Fixes PR 6458.
llvm-svn: 97605
|
|
|
|
|
|
|
|
| |
*not* entering the context of the nested-name-specifier. This was
causing us to look into an uninstantiated template that we shouldn't
look into. Fixes PR6376.
llvm-svn: 97524
|
|
|
|
| |
llvm-svn: 97404
|
|
|
|
|
|
|
|
|
|
| |
propagating error conditions out of the various annotate-me-a-snowflake
routines. Generally (but not universally) removes redundant diagnostics
as well as, you know, not crashing on bad code. On the other hand,
I have just signed myself up to fix fiddly parser errors for the next
week. Again.
llvm-svn: 97221
|
|
|
|
|
|
|
| |
instantiation so long as that explicit specialization was declared
previously. Fixes PR6160.
llvm-svn: 97210
|
|
|
|
|
|
| |
between cv1 T* and cv2 T*.
llvm-svn: 96787
|
|
|
|
|
|
|
| |
qualified declarator-ids. This patch is actually due to Cornelius;
fixes PR6179.
llvm-svn: 96082
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sema::ActOnUninitializedDecl over to InitializationSequence (with
default initialization), eliminating redundancy. More importantly, we
now check that a const definition in C++ has an initilizer, which was
an #if 0'd code for many, many months. A few other tweaks were needed
to get everything working again:
- Fix all of the places in the testsuite where we defined const
objects without initializers (now that we diagnose this issue)
- Teach instantiation of static data members to find the previous
declaration, so that we build proper redeclaration
chains. Previously, we had the redeclaration chain but built it
too late to be useful, because...
- Teach instantiation of static data member definitions not to try
to check an initializer if a previous declaration already had an
initializer. This makes sure that we don't complain about static
const data members with in-class initializers and out-of-line
definitions.
- Move all of the incomplete-type checking logic out of
Sema::FinalizeDeclaratorGroup; it makes more sense in
ActOnUnitializedDecl.
There may still be a few places where we can improve these
diagnostics. I'll address that as a separate commit.
llvm-svn: 95657
|
|
|
|
|
|
|
|
| |
non-type template parameter that has reference type, augment the
qualifiers of the non-type template argument with those of the
referenced type. Fixes PR6250.
llvm-svn: 95607
|
|
|
|
| |
llvm-svn: 95562
|
|
|
|
|
|
|
| |
non-type template argument for a non-type template parameter of
pointer type. Fixes PR6244.
llvm-svn: 95447
|
|
|
|
|
|
|
|
|
| |
template parameter, perform array/function decay (if needed), take the
address of the argument (if needed), perform qualification conversions
(if needed), and remove any top-level cv-qualifiers from the resulting
expression. Fixes PR6226.
llvm-svn: 95309
|