xref: /minix3/external/bsd/llvm/dist/clang/test/SemaCXX/thread-safety-reference-handling.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -verify -Wthread-safety-analysis -std=c++11 %s
2*0a6a1f1dSLionel Sambuc // expected-no-diagnostics
3*0a6a1f1dSLionel Sambuc 
4*0a6a1f1dSLionel Sambuc class Base {
5*0a6a1f1dSLionel Sambuc public:
Base()6*0a6a1f1dSLionel Sambuc   Base() {}
7*0a6a1f1dSLionel Sambuc   virtual ~Base();
8*0a6a1f1dSLionel Sambuc };
9*0a6a1f1dSLionel Sambuc 
10*0a6a1f1dSLionel Sambuc class S : public Base {
11*0a6a1f1dSLionel Sambuc public:
12*0a6a1f1dSLionel Sambuc   ~S() override = default;
13*0a6a1f1dSLionel Sambuc };
14*0a6a1f1dSLionel Sambuc 
Test()15*0a6a1f1dSLionel Sambuc void Test() {
16*0a6a1f1dSLionel Sambuc   const S &s = S();
17*0a6a1f1dSLionel Sambuc }
18