diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-12-21 07:41:49 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-12-21 07:41:49 +0000 |
commit | 7c84229db6d0fa6fc1a150b26d1efe029aabef85 (patch) | |
tree | 7e16f82958677f03517cbf8ce1a3736393b33a2f /clang/test/SemaCXX/using-decl-1.cpp | |
parent | b14dbd73b9d25673581e3b6c277d3453f0d3fa55 (diff) | |
download | bcm5719-llvm-7c84229db6d0fa6fc1a150b26d1efe029aabef85.tar.gz bcm5719-llvm-7c84229db6d0fa6fc1a150b26d1efe029aabef85.zip |
When checking a using declaration, make sure that the context we're
looking in is complete. Fixes PR8756.
llvm-svn: 122323
Diffstat (limited to 'clang/test/SemaCXX/using-decl-1.cpp')
-rw-r--r-- | clang/test/SemaCXX/using-decl-1.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/using-decl-1.cpp b/clang/test/SemaCXX/using-decl-1.cpp index 65be0bc3aae..ebe97f6cca0 100644 --- a/clang/test/SemaCXX/using-decl-1.cpp +++ b/clang/test/SemaCXX/using-decl-1.cpp @@ -108,3 +108,13 @@ namespace test2 { template <typename T> using A::f<T>; // expected-error {{cannot template a using declaration}} }; } + +// PR8756 +namespace foo +{ + class Class1; // expected-note{{forward declaration}} + class Class2 + { + using ::foo::Class1::Function; // expected-error{{incomplete type 'foo::Class1' named in nested name specifier}} + }; +} |