mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 19:16:43 +00:00
Fixed some warn-override tests in SemaCXX (#122680)
The `.cpp` extension have been added to test files, so that they can be runned. Besides, the `warn-suggest-override.cpp` tests have been fixed. --------- Co-authored-by: LoS <aurumpuro@gmail.com>
This commit is contained in:
parent
9025c269aa
commit
e33f456ae5
@ -17,13 +17,13 @@ struct C {
|
||||
|
||||
struct D : public C {
|
||||
void run();
|
||||
// expected-warning@-1 {{'run()' overrides a member function but is not marked 'override'}}
|
||||
// expected-warning@-1 {{'run' overrides a member function but is not marked 'override'}}
|
||||
~D();
|
||||
};
|
||||
|
||||
struct E : public C {
|
||||
virtual void run();
|
||||
// expected-warning@-1 {{'run()' overrides a member function but is not marked 'override'}}
|
||||
// expected-warning@-1 {{'run' overrides a member function but is not marked 'override'}}
|
||||
virtual ~E();
|
||||
};
|
||||
|
||||
@ -32,7 +32,8 @@ struct F : public C {
|
||||
~F() override;
|
||||
};
|
||||
|
||||
struct G : public C {
|
||||
struct G : public C { // expected-note {{mark 'G' as 'final'}}
|
||||
void run() final;
|
||||
~G() final;
|
||||
// expected-warning@-1 {{class with destructor marked 'final' cannot be inherited from}}
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user