[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / FixIt / fixit-vexing-parse-cxx0x.cpp
bloba870794b27ced5d65f1fa52d8f5c8809cf8346a4
1 // RUN: %clang_cc1 -verify -x c++ -std=c++11 %s
2 // RUN: %clang_cc1 -fdiagnostics-parseable-fixits -x c++ -std=c++11 %s 2>&1 | FileCheck %s
4 struct X {
5 int i;
6 };
8 void func() {
9 // CHECK: fix-it:"{{.*}}":{10:6-10:8}:"{}"
10 X x(); // expected-warning {{function declaration}} expected-note{{replace parentheses with an initializer}}
12 typedef int *Ptr;
13 // CHECK: fix-it:"{{.*}}":{14:8-14:10}:" = nullptr"
14 Ptr p(); // expected-warning {{function declaration}} expected-note {{replace parentheses with an initializer}}
16 // CHECK: fix-it:"{{.*}}":{17:15-17:17}:" = u'\\0'"
17 char16_t u16(); // expected-warning {{function declaration}} expected-note {{replace parentheses with an initializer}}
19 // CHECK: fix-it:"{{.*}}":{20:15-20:17}:" = U'\\0'"
20 char32_t u32(); // expected-warning {{function declaration}} expected-note {{replace parentheses with an initializer}}