Pirama Arumuga Nainar | 799172d | 2016-03-03 15:50:30 -0800 | [diff] [blame^] | 1 | // Regression test for https://github.com/google/sanitizers/issues/410. |
Stephen Hines | 2d1fdb2 | 2014-05-28 23:58:16 -0700 | [diff] [blame] | 2 | // The C++ variant is much more compact that the LLVM IR equivalent. |
| 3 | |
| 4 | // RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s |
| 5 | #include <stdio.h> |
| 6 | struct AAA { virtual long aaa () { return 0; } }; // NOLINT |
| 7 | struct BBB: virtual AAA { unsigned long bbb; }; // NOLINT |
| 8 | struct CCC: virtual AAA { }; |
| 9 | struct DDD: CCC, BBB { DDD(); }; // NOLINT |
| 10 | DDD::DDD() { } |
| 11 | int main() { |
| 12 | DDD d; |
| 13 | printf("OK\n"); |
| 14 | } |
| 15 | // CHECK: OK |