1// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3struct C {
4  typedef int I;
5};
6
7typedef int I1, I2;
8extern int* p;
9extern int* q;
10
11void f() {
12  p->C::I::~I();
13  q->I1::~I2();
14}
15
16struct A {
17  ~A();
18};
19
20typedef A AB;
21int main() {
22  AB *p;
23  p->AB::~AB(); // expected-error{{expected the class name after '~' to name a destructor}}
24}
25