15 lines · cpp
1// RUN: %clang_cc1 -verify %s2// RUN: not %clang_cc1 -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s3 4class Foo { // #defined-here5 int get() const; // expected-note {{because it is const qualified}}6 void set(int); // expected-note {{because it is not const qualified}}7};8 9// CHECK: fix-it:"{{.*}}":{[[@LINE+1]]:15-[[@LINE+1]]:15}:" const"10int Foo::get() {} // expected-error {{does not match any declaration}}11 // expected-note@#defined-here {{defined here}}12// CHECK: fix-it:"{{.*}}":{[[@LINE+1]]:20-[[@LINE+1]]:26}:""13void Foo::set(int) const {} // expected-error {{does not match any declaration}}14 // expected-note@#defined-here {{defined here}}15