1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 // From `test/Sema/typo-correction.c` but for C++ since the behavior varies
4 // between the two languages.
9 void rdar38642201_callee(int x
, int y
);
10 void rdar38642201_caller() {
11 struct rdar38642201 structVar
;
13 structVar1
.fieldName1
.member1
, //expected-error{{use of undeclared identifier 'structVar1'}}
14 structVar2
.fieldName2
.member2
); //expected-error{{use of undeclared identifier 'structVar2'}}
17 // Similar reproducer.
20 int minut() const = delete;
21 int hour() const = delete;
23 int longit() const; //expected-note{{'longit' declared here}}
29 A
depar() const { return A(); }
33 return b
.deparT().hours() * 60 + //expected-error{{no member named 'deparT' in 'B'}}
34 b
.deparT().minutes(); //expected-error{{no member named 'deparT' in 'B'}}
38 return b
.depar().longitude() + //expected-error{{no member named 'longitude' in 'A'; did you mean 'longit'?}}
39 b
.depar().latitude(); //expected-error{{no member named 'latitude' in 'A'}}