diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:44:14 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:44:14 +0000 |
commit | 2b6b257f4e5503a7a2675bdb8735693db769f75c (patch) | |
tree | e85e046ae7003fe3bcc8b5454cd0fa3f7407b470 /test/SemaTemplate/ms-delayed-default-template-args.cpp | |
parent | b4348ed0b7e90c0831b925fbee00b5f179a99796 (diff) |
Notes
Diffstat (limited to 'test/SemaTemplate/ms-delayed-default-template-args.cpp')
-rw-r--r-- | test/SemaTemplate/ms-delayed-default-template-args.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/SemaTemplate/ms-delayed-default-template-args.cpp b/test/SemaTemplate/ms-delayed-default-template-args.cpp index ca9ddb0d9d15..0c0546942475 100644 --- a/test/SemaTemplate/ms-delayed-default-template-args.cpp +++ b/test/SemaTemplate/ms-delayed-default-template-args.cpp @@ -55,6 +55,15 @@ struct Foo { typedef int Weber; } +// MSVC accepts this, but Clang doesn't. +namespace test_scope_spec { +template <typename T = ns::Bar> // expected-error {{use of undeclared identifier 'ns'}} +struct Foo { + static_assert(sizeof(T) == 4, "Bar should have gotten int"); +}; +namespace ns { typedef int Bar; } +} + #ifdef __clang__ // These are negative test cases that MSVC doesn't compile either. Try to use // unique undeclared identifiers so typo correction doesn't find types declared |