blob: a45078055de9a9c0da460787f59cd87bb7a734c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// RUN: %clang_cc1 %s -O3 -emit-llvm -o - | FileCheck %s
namespace Test1 {
struct A {
virtual int f() __attribute__((final)) { return 1; }
};
// CHECK: define i32 @_ZN5Test11fEPNS_1AE
int f(A *a) {
// CHECK: ret i32 1
return a->f();
}
}
namespace Test2 {
struct __attribute__((final)) A {
virtual int f() { return 1; }
};
// CHECK: define i32 @_ZN5Test21fEPNS_1AE
int f(A *a) {
// CHECK: ret i32 1
return a->f();
}
}
|