hanchenye-llvm-project/clang/test/SemaTemplate
Reid Kleckner 062be331e2 Limit our MSVC compat hack for nested names from dependent bases
Previously, any undeclared unqualified id starting a nested name
specifier in a dependent context would have its lookup retried during
template instantiation.  Now we limit that retry hack to methods of a
class with dependent bases.  Free function templates in particular are
no longer affected by this hack.

Also, diagnose this as a Microsoft extension. This has the downside that
template authors may see this warning *and* an error during
instantiation time about this identifier. Fixing that will probably
require formalizing some kind of "delayed" identifier, instead of our
ad-hoc solutions of forming dependent AST nodes when lookup fails.

Based on a patch by Kim Gräsman!

Differential Revision: http://reviews.llvm.org/D4854

llvm-svn: 215683
2014-08-14 23:34:52 +00:00
..
ackermann.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
address-spaces.cpp
alias-church-numerals.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
alias-nested-nontag.cpp PR17567: Improve diagnostic for a mistyped constructor name. If we see something 2013-10-15 00:00:26 +00:00
alias-template-template-param.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
alias-templates.cpp Fix for dependent contexts in alias templates. 2013-08-15 23:59:20 +00:00
alignas.cpp Handle alignas(foo...) pack expansions. 2013-02-22 08:32:16 +00:00
ambiguous-ovl-print.cpp
anonymous-union.cpp
array-to-pointer-decay.cpp [analyzer] Fix a crash that occurs when processing an rvalue array. 2013-06-06 00:19:36 +00:00
atomics.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
attributes.cpp There is no such thing as __attribute__((align)); that's a __declspec attribute. Fixing these test cases to use the proper spelling for their syntax. 2014-01-13 21:30:03 +00:00
canonical-expr-type-0x.cpp
canonical-expr-type.cpp Sema: Do not merge new decls with invalid, old decls 2013-07-07 23:49:50 +00:00
class-template-ctor-initializer.cpp Don't produce diagnostics for missing ctor-initializers during template 2012-09-25 00:23:05 +00:00
class-template-decl.cpp Sema: Reject templates in all extern "C" contexts. 2014-02-02 16:35:43 +00:00
class-template-id-2.cpp
class-template-id.cpp Add quotation marks to template names in diagnostics. 2013-03-05 06:21:38 +00:00
class-template-spec.cpp PR16519, PR18009: When checking a partial specialization for uses of its own 2014-02-09 00:54:43 +00:00
constexpr-instantiate.cpp Tweak diagnostic wording for init list narrowing 2014-05-17 01:13:18 +00:00
constructor-template.cpp
copy-ctor-assign.cpp
crash-8204126.cpp
crash-10438657.cpp
current-instantiation.cpp When rebuilding a DependentScopeDeclRefExpr, perform a lookup into the scope 2012-10-23 19:56:01 +00:00
deduction-crash.cpp Add 'not' to commands that are expected to fail. 2013-07-04 16:16:58 +00:00
deduction.cpp
default-arguments-cxx0x.cpp Sema: Subst type default template args earlier 2013-08-28 23:48:32 +00:00
default-arguments.cpp Sema: Subst type default template args earlier 2013-08-28 23:48:32 +00:00
default-expr-arguments-2.cpp Implement AST dumper for Decls. 2012-12-20 02:09:13 +00:00
default-expr-arguments.cpp PR14428: When instantiating a 'new' expression, if we had a non-dependent 2012-11-26 08:32:48 +00:00
delegating-constructors.cpp Make delegating initializers use a similar codepath to base initializers in dependent contexts. PR12890. 2012-05-19 23:35:23 +00:00
dependent-base-classes.cpp Recover properly if a class member declaration starts with a scope specifier 2012-05-09 08:23:23 +00:00
dependent-base-member-init.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
dependent-class-member-operator.cpp
dependent-expr.cpp PR18152: When computing the semantic form for an initializer list, keep track 2013-12-06 01:27:24 +00:00
dependent-names-no-std.cpp
dependent-names.cpp PR19936: Fix a really dumb bug where we would profile dependent operator* expressions incorrectly. 2014-06-05 22:43:40 +00:00
dependent-sized_array.cpp PR13788: Don't perform checks on the initializer of a dependently-typed 2012-11-09 23:03:14 +00:00
dependent-template-recover.cpp
dependent-type-identity.cpp PR18275: If a member function of a class template is declared with a 2014-03-13 00:28:45 +00:00
derived.cpp [test] Add test case for rdar://14183893. 2013-06-28 23:47:22 +00:00
destructor-template.cpp Correctly profile CXXPseudoDestructorExprs. 2013-08-09 23:37:05 +00:00
elaborated-type-specifier.cpp
enum-argument.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
enum-forward.cpp
example-typelist.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
exception-spec-crash.cpp Fix missed exception spec checks and crashes 2013-10-18 05:54:19 +00:00
explicit-instantiation.cpp Revert "Don't require -re suffix on -verify directives with regexes." 2013-12-14 01:07:05 +00:00
explicit-specialization-member.cpp PR19340: If we see a declaration of a member of an unspecialized class template 2014-04-17 03:52:20 +00:00
ext-vector-type.cpp
extension-sfinae.cpp Extra test for r194444. 2013-11-12 02:42:08 +00:00
extern-templates.cpp
fibonacci.cpp
friend-template.cpp Issue a diagnostic if we see a templated friend declaration that we do not 2013-11-08 18:59:56 +00:00
friend.cpp
fun-template-def.cpp Fold together the two implementations of 6.7.3p2 in SemaType. Fix two bugs, each of which was only present in one version: 2013-03-28 00:03:10 +00:00
function-template-specialization-noreturn.cpp Ignore noreturn when checking function template specializations 2013-09-10 22:21:37 +00:00
function-template-specialization.cpp FIXME fix: improving diagnostics for template arguments deduction of class templates and explicit specializations 2013-07-19 23:00:19 +00:00
implicit-instantiation-1.cpp
inject-templated-friend-post.cpp Sema: Implement DR317 2014-03-30 06:44:54 +00:00
inject-templated-friend.cpp Sema: Implement DR317 2014-03-30 06:44:54 +00:00
injected-class-name.cpp
instantiate-anonymous-union.cpp
instantiate-array.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
instantiate-attr.cpp Add missing check to warning for packed attribute. PR14259. 2012-11-07 00:35:20 +00:00
instantiate-c99.cpp
instantiate-call.cpp
instantiate-case.cpp
instantiate-cast.cpp
instantiate-clang.cpp
instantiate-complete.cpp Remove the -cxx-abi command-line flag. 2014-01-14 19:35:09 +00:00
instantiate-decl-dtor.cpp
instantiate-decl-init.cpp PR20346: fix aggregate initialization / template instantiation bug: 2014-07-17 23:12:06 +00:00
instantiate-declref-ice.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
instantiate-declref.cpp
instantiate-deeply.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
instantiate-default-assignment-operator.cpp Fix/Improve SourceRange of explicitly defaulted members 2014-06-20 08:44:22 +00:00
instantiate-dependent-nested-name.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
instantiate-elab-type-specifier.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
instantiate-enum-2.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
instantiate-enum.cpp Do not add enums to prototype scope in C++ modes. 2014-02-22 03:05:49 +00:00
instantiate-exception-spec-cxx11.cpp Remove the -cxx-abi command-line flag. 2014-01-14 19:35:09 +00:00
instantiate-exception-spec.cpp Use the appropriate SourceLocation for the template backtrace when doing 2014-01-11 02:37:12 +00:00
instantiate-expr-1.cpp Fix tests Clang::Sema/statements.c and Clang::SemaTemplate/instantiate-expr-1.cpp when AArch64 is the default target. 2014-08-04 10:13:09 +00:00
instantiate-expr-2.cpp
instantiate-expr-3.cpp
instantiate-expr-4.cpp
instantiate-expr-5.cpp Fix crash-on-invalid: only use TransformAddressOfOperand when transforming the 2013-05-21 23:29:46 +00:00
instantiate-expr-basic.cpp
instantiate-field.cpp
instantiate-friend-class.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
instantiate-function-1.cpp
instantiate-function-1.mm
instantiate-function-2.cpp [Sema] Don't look for the instantiation of a local extern decl in a different 2013-11-27 08:34:14 +00:00
instantiate-function-params.cpp Use the appropriate SourceLocation for the template backtrace when doing 2014-01-11 02:37:12 +00:00
instantiate-init.cpp Properly track l-paren of a CXXFucntionalCastExpr. 2013-08-15 22:02:56 +00:00
instantiate-invalid.cpp
instantiate-local-class.cpp Sema: Don't crash when trying to instantiate a local class with an invalid base specifier 2014-02-22 00:17:46 +00:00
instantiate-member-class.cpp Implement DR85: Redeclaration of member is forbidden 2013-06-11 03:51:23 +00:00
instantiate-member-expr.cpp Unrevert r166268, reverted in r166272, with a fix for the issue which Nick 2012-10-21 03:28:35 +00:00
instantiate-member-initializers.cpp Fix regression in r170489: when instantiating a direct initializer which is a 2012-12-21 08:13:35 +00:00
instantiate-member-pointers.cpp Sema: Enforce C++11 pointer-to-member template arguments should rules 2013-12-10 00:40:58 +00:00
instantiate-member-template.cpp
instantiate-method.cpp Revert "Don't require -re suffix on -verify directives with regexes." 2013-12-14 01:07:05 +00:00
instantiate-non-dependent-types.cpp
instantiate-non-type-template-parameter.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
instantiate-objc-1.mm Fix test cases broken by 155936. 2012-05-01 21:29:03 +00:00
instantiate-overload-candidates.cpp Implement DR61: Address of ambiguous bound methods should be disallowed 2013-06-11 03:56:29 +00:00
instantiate-overloaded-arrow.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
instantiate-partial-spec.cpp If a partial specialization of a member template is declared within a class 2013-09-26 03:49:48 +00:00
instantiate-self.cpp
instantiate-sizeof.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
instantiate-static-var.cpp
instantiate-subscript.cpp
instantiate-template-template-parm.cpp
instantiate-try-catch.cpp
instantiate-type.cpp <rdar://problem/13094134> Don't try to wire up typedef names for invalid anonymous tag declarations encountered during template instantiation. 2013-03-08 22:15:15 +00:00
instantiate-typedef.cpp
instantiate-typeof.cpp
instantiate-using-decl.cpp Fix name lookup with dependent using decls. 2013-08-20 00:39:40 +00:00
instantiate-var-template.cpp PR17846, PR17848: don't build a VarTemplateSpecializationDecl for a use of a 2014-02-03 20:09:56 +00:00
instantiation-backtrace.cpp Use the appropriate SourceLocation for the template backtrace when doing 2014-01-11 02:37:12 +00:00
instantiation-default-1.cpp
instantiation-default-2.cpp
instantiation-default-3.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
instantiation-depth-defarg.cpp PR13368: Halve the instantiation depth of this test again. Apparently, FreeBSD 2012-07-15 23:29:50 +00:00
instantiation-depth-exception-spec.cpp Fix bug which sometimes resulted in further diagnostics being produced after a 2012-09-22 00:53:56 +00:00
instantiation-depth-subst-2.cpp Use the appropriate SourceLocation for the template backtrace when doing 2014-01-11 02:37:12 +00:00
instantiation-depth-subst.cpp Use the appropriate SourceLocation for the template backtrace when doing 2014-01-11 02:37:12 +00:00
instantiation-depth.cpp Final piece of core issue 1330: delay computing the exception specification of 2012-07-27 04:22:15 +00:00
instantiation-order.cpp Use the appropriate SourceLocation for the template backtrace when doing 2014-01-11 02:37:12 +00:00
issue150.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
lookup-dependent-bases.cpp Limit our MSVC compat hack for nested names from dependent bases 2014-08-14 23:34:52 +00:00
member-access-ambig.cpp PR41111, PR5925, PR13210: Teach tentative parsing to annotate identifiers and 2012-08-18 00:55:03 +00:00
member-access-expr.cpp
member-function-template.cpp
member-inclass-init-value-dependent.cpp
member-initializers.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
member-template-access-expr.cpp Improve some of the conversion warnings to fire on conversion to bool. 2012-05-15 16:56:36 +00:00
metafun-apply.cpp
missing-class-keyword-crash.cpp
ms-class-specialization-class-scope.cpp PR18232: implement instantiation for class-scope explicit specializations of 2013-12-14 01:04:22 +00:00
ms-class-specialization-duplicate.cpp Permit duplicate explicit class instantiations if MSVCCompat is enabled 2014-05-09 09:52:13 +00:00
ms-delayed-default-template-args.cpp Delay lookup of simple default template arguments under -fms-compatibility 2014-06-06 22:36:36 +00:00
ms-function-specialization-class-scope.cpp Add a testcase and a FIXME for an accepts-invalid. 2013-12-13 22:28:48 +00:00
ms-if-exists.cpp Normalize line endings 2014-03-02 18:46:05 +00:00
ms-lookup-template-base-classes.cpp Limit our MSVC compat hack for nested names from dependent bases 2014-08-14 23:34:52 +00:00
ms-sizeof-missing-typename.cpp Recover from missing 'typename' in sizeof(T::InnerType) 2014-06-12 23:03:48 +00:00
nested-incomplete-class.cpp
nested-linkage.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
nested-name-spec-template.cpp
nested-template.cpp Add test. 2013-06-20 20:56:57 +00:00
operator-function-id-template.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
operator-template.cpp Use the appropriate SourceLocation for the template backtrace when doing 2014-01-11 02:37:12 +00:00
overload-candidates.cpp Part of PR15673: If a function template has a default argument in which 2013-07-04 01:01:24 +00:00
overload-uneval.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
pack-deduction.cpp PR14615: add (passing) tests for this already-fixed bug 2014-07-22 23:56:53 +00:00
partial-spec-instantiate.cpp
pragma-ms_struct.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
qualified-id.cpp
qualified-names-diag.cpp
rdar9173693.cpp
recovery-crash.cpp Fix to PR16225 (Assert-on-invalid: isa<LabelDecl>(D) && "declaration not instantiated in this scope") 2013-08-10 12:00:21 +00:00
recursive-template-instantiation.cpp Improve 'failed template argument deduction' diagnostic for the case where we 2013-01-31 05:19:49 +00:00
resolve-single-template-id.cpp Move the warning about unused relational comparison from -Wunused-value to 2014-03-11 03:11:08 +00:00
self-comparison.cpp
temp.cpp
temp_arg.cpp Add quotation marks to template names in diagnostics. 2013-03-05 06:21:38 +00:00
temp_arg_nontype.cpp Revert "Don't require -re suffix on -verify directives with regexes." 2013-12-14 01:07:05 +00:00
temp_arg_nontype_cxx11.cpp Take the canonical type when forming a canonical template argument with 2014-07-24 02:27:39 +00:00
temp_arg_template.cpp Richard makes a good point, clean up this test. 2013-08-28 05:45:53 +00:00
temp_arg_type.cpp Add quotation marks to template names in diagnostics. 2013-03-05 06:21:38 +00:00
temp_class_order.cpp
temp_class_spec.cpp
temp_class_spec_blocks.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
temp_class_spec_neg.cpp
temp_explicit.cpp
temp_explicit_cxx0x.cpp
temp_func_order.cpp
template-class-traits.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
template-decl-fail.cpp
template-id-expr.cpp
template-id-printing.cpp
typename-specifier-2.cpp
typename-specifier-3.cpp
typename-specifier-4.cpp
typename-specifier.cpp Recover from missing typenames on template args for MSVC compatibility 2014-06-10 23:29:48 +00:00
typo-dependent-name.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
unresolved-construct.cpp Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
unused-variables.cpp
value-dependent-null-pointer-constant.cpp
virtual-member-functions.cpp Avoid referencing the vtable when calling the ctor without emitting it 2014-07-16 00:30:59 +00:00