summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/test/SemaCXX/warn-unreachable.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/warn-unreachable.cpp b/clang/test/SemaCXX/warn-unreachable.cpp
index 3d368759d7a..52da0b922e1 100644
--- a/clang/test/SemaCXX/warn-unreachable.cpp
+++ b/clang/test/SemaCXX/warn-unreachable.cpp
@@ -124,3 +124,11 @@ template <> void funcToSpecialize<int>() {
halt();
dead(); // expected-warning {{will never be executed}}
}
+
+// Ensure we don't regress a fix involving undefined bases to template
+// destructors when computing the CFG for unreachable code analysis
+template<int> struct imp;
+template<int a>
+struct aligned_storage : imp<a> {
+ ~aligned_storage() { }
+};
OpenPOWER on IntegriCloud