[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGenCXX / debug-info-noreturn.cpp
blob85b81324a4156e2ef70a822833635dc6bea13c91
1 // RUN: %clang_cc1 -std=c++11 -emit-llvm -fcxx-exceptions -debug-info-kind=standalone %s -o - | FileCheck %s
2 // Test for NoReturn flags in debug info.
4 // CHECK: DISubprogram(name: "f", {{.*}}, flags: DIFlagPrototyped | DIFlagNoReturn, spFlags: DISPFlagDefinition
5 // CHECK: DISubprogram(name: "foo_member", {{.*}}, flags: DIFlagPrototyped | DIFlagNoReturn, spFlags: 0
6 // CHECK-NOT: DISubprogram(name: "func",{{.*}}, flags: DIFlagPrototyped | DIFlagNoReturn, spFlags: DISPFlagDefinition
8 class foo {
10 [[noreturn]] void foo_member() { throw 1; }
13 [[noreturn]] void f() {
14 throw 1;
17 void func() {
18 foo object;