YouCompleteMe/cpp/llvm/tools/clang/test/CodeGenCXX/attr-used.cpp
Strahinja Val Markovic 1f51a89d39 Adding more llvm/clang files
These were ignored by git accidentally. We want ALL OF THEM since they all came
in the llvm/clang source distribution.
2012-07-05 17:55:45 -07:00

10 lines
325 B
C++

// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
// <rdar://problem/8684363>: clang++ not respecting __attribute__((used)) on destructors
struct X0 {
// CHECK: define linkonce_odr {{.*}} @_ZN2X0C1Ev
__attribute__((used)) X0() {}
// CHECK: define linkonce_odr {{.*}} @_ZN2X0D1Ev
__attribute__((used)) ~X0() {}
};