Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CXX / basic / basic.lookup / basic.lookup.classref / p3.cpp
blobef4243e28e8931f9ede28cc39367f44c117ae263
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // expected-no-diagnostics
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.
11 // From core issue 305
12 struct A {
15 struct C {
16 struct A {};
17 void f ();
20 void C::f () {
21 ::A *a;
22 a->~A ();
25 // From core issue 414
26 struct X {};
27 void f() {
28 X x;
29 struct X {};
30 x.~X();