Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / debug-info-deleted.cpp
blob564f7fff00fb961704a2c10eb7d601a9f3bd3241
1 // Test for debug info for C++11 deleted member functions
3 //Supported: -O0, standalone DI
4 // RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu %s -o - \
5 // RUN: -O0 -disable-llvm-passes \
6 // RUN: -debug-info-kind=standalone \
7 // RUN: | FileCheck %s -check-prefix=ATTR
9 // ATTR: DISubprogram(name: "deleted", {{.*}}, flags: DIFlagPublic | DIFlagPrototyped,
10 // ATTR: DISubprogram(name: "deleted", {{.*}}, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagDeleted
11 // ATTR: DISubprogram(name: "operator=", linkageName: "_ZN7deletedaSERKS_", {{.*}}, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagDeleted
12 // ATTR: DISubprogram(name: "deleted", {{.*}}, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagDeleted
13 // ATTR: DISubprogram(name: "operator=", linkageName: "_ZN7deletedaSEOS_", {{.*}}, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagDeleted
14 // ATTR: DISubprogram(name: "func", {{.*}}, flags: DIFlagPublic | DIFlagPrototyped | DIFlagRValueReference, spFlags: DISPFlagDeleted
15 // ATTR: DISubprogram(name: "bar", {{.*}}, flags: DIFlagPublic | DIFlagPrototyped | DIFlagStaticMember, spFlags: DISPFlagDeleted
16 // ATTR: DISubprogram(name: "~deleted", {{.*}}, flags: DIFlagPublic | DIFlagPrototyped,
17 class deleted {
18 public:
19 // Defaulted on purpose, so as to facilitate object creation
20 deleted() = default;
22 deleted(const deleted &) = delete;
23 deleted &operator=(const deleted &) = delete;
25 deleted(deleted &&) = delete;
26 deleted &operator=(deleted &&) = delete;
28 void func() && = delete;
29 static int bar() = delete;
31 ~deleted() = default;
34 void foo() {
35 deleted obj1;