• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 struct NoCopyCstr {
NoCopyCstrNoCopyCstr2   NoCopyCstr() {}
3   // No copy constructor but a move constructor means we have an
4   // implicitly deleted copy constructor (C++11 [class.copy]p7, p18).
5   NoCopyCstr(NoCopyCstr &&);
6 };
7 struct IndirectlyDeletedCopyCstr {
8   // This field indirectly deletes the implicit copy constructor.
9   NoCopyCstr field;
10   // Completing in the constructor or constructing the class
11   // will cause Sema to declare the special members of IndirectlyDeletedCopyCstr.
12   // If we correctly set the deleted implicit copy constructor in NoCopyCstr then this
13   // should have propagated to this record and Clang won't crash.
IndirectlyDeletedCopyCstrIndirectlyDeletedCopyCstr14   IndirectlyDeletedCopyCstr() { //%self.expect_expr("IndirectlyDeletedCopyCstr x; 1+1", result_type="int", result_value="2")
15                                 //%self.dbg.GetCommandInterpreter().HandleCompletion("e ", len("e "), 0, -1, lldb.SBStringList())
16   }
17 };
main()18 int main() {
19   IndirectlyDeletedCopyCstr{};
20 }
21