mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1123459 - Add an informational note to the diagnostic explaining to use the explicit keyword; r=jrmuizel
This commit is contained in:
parent
2d9e6659e7
commit
739a4dfd9f
@ -241,7 +241,10 @@ public:
|
||||
}
|
||||
unsigned ctorID = Diag.getDiagnosticIDs()->getCustomDiagID(
|
||||
DiagnosticIDs::Error, "bad implicit conversion constructor for %0");
|
||||
unsigned noteID = Diag.getDiagnosticIDs()->getCustomDiagID(
|
||||
DiagnosticIDs::Note, "consider adding the explicit keyword to the constructor");
|
||||
Diag.Report(ctor->getLocation(), ctorID) << d->getDeclName();
|
||||
Diag.Report(ctor->getLocation(), noteID);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
#define MOZ_IMPLICIT __attribute__((annotate("moz_implicit")))
|
||||
|
||||
struct Foo {
|
||||
Foo(int); // expected-error {{bad implicit conversion constructor for 'Foo'}}
|
||||
Foo(int, char=0); // expected-error {{bad implicit conversion constructor for 'Foo'}}
|
||||
Foo(...); // expected-error {{bad implicit conversion constructor for 'Foo'}}
|
||||
Foo(int); // expected-error {{bad implicit conversion constructor for 'Foo'}} expected-note {{consider adding the explicit keyword to the constructor}}
|
||||
Foo(int, char=0); // expected-error {{bad implicit conversion constructor for 'Foo'}} expected-note {{consider adding the explicit keyword to the constructor}}
|
||||
Foo(...); // expected-error {{bad implicit conversion constructor for 'Foo'}} expected-note {{consider adding the explicit keyword to the constructor}}
|
||||
Foo(int, unsigned);
|
||||
Foo(Foo&);
|
||||
Foo(const Foo&);
|
||||
|
Loading…
Reference in New Issue
Block a user