xref: /llvm-project/clang/test/CodeCompletion/invalid-initialized-class.cpp (revision cf9b25e0adc42546e4dc5ff51ee8674d45bac26b)
1 struct Foo { Foo(int); int abc; };
2 
test1()3 void test1() {
4   Foo foo;
5   foo.;
6   // RUN: not %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):7 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
7   // CHECK-CC1: COMPLETION: abc
8 }
9 
test2()10 void test2() {
11   Foo foo = garbage();
12   foo.;
13   // RUN: not %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):7 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s
14   // CHECK-CC2: COMPLETION: abc
15 }
16