summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-04-10 20:43:46 +0000
committerDouglas Gregor <dgregor@apple.com>2012-04-10 20:43:46 +0000
commit69a30b838c723cb1850de55cfa48a402cfeeb6e0 (patch)
tree9862f828934ae9c63773d3a3e57963327ada10bf /test/SemaCXX
parentabf65ce5ddfb8db0d34280d30a91253930732f4f (diff)
When we determine that an initialization sequence failed due to an
incomplete type, keep track of the actual type that was incomplete. Otherwise, we might fail to produce a diagnostic. Fixes PR12498. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154432 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX')
-rw-r--r--test/SemaCXX/cxx0x-initializer-constructor.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaCXX/cxx0x-initializer-constructor.cpp b/test/SemaCXX/cxx0x-initializer-constructor.cpp
index 68c149218a..09aca24b70 100644
--- a/test/SemaCXX/cxx0x-initializer-constructor.cpp
+++ b/test/SemaCXX/cxx0x-initializer-constructor.cpp
@@ -267,3 +267,17 @@ namespace PR12120 {
struct B { explicit B(short); B(long); }; // expected-note 2 {{candidate}}
B b = { 0 }; // expected-error {{ambiguous}}
}
+
+namespace PR12498 {
+ class ArrayRef; // expected-note{{forward declaration}}
+
+ struct C {
+ void foo(const ArrayRef&); // expected-note{{passing argument to parameter here}}
+ };
+
+ static void bar(C* c)
+ {
+ c->foo({ nullptr, 1 }); // expected-error{{initialization of incomplete type 'const PR12498::ArrayRef'}}
+ }
+
+}