brintos

brintos / llvm-project-archived public Read only

0
0
Text · 659 B · ef4243e Raw
32 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s2// expected-no-diagnostics3 4// C++0x [basic.lookup.classref]p3:5//   If the unqualified-id is ~type-name, the type-name is looked up in the 6//   context of the entire postfix-expression. If the type T of the object 7//   expression is of a class type C, the type-name is also looked up in the 8//   scope of class C. At least one of the lookups shall find a name that 9//   refers to (possibly cv-qualified) T.10 11// From core issue 30512struct A {13};14 15struct C {16  struct A {};17  void f ();18};19 20void C::f () {21  ::A *a;22  a->~A ();23}24 25// From core issue 41426struct X {};27void f() {28  X x;29  struct X {};30  x.~X();31}32