From 809500fc2c13c8173a16b052304d983864e4a1e1 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 8 Apr 2013 18:45:10 +0000 Subject: Vendor import of clang trunk r178860: http://llvm.org/svn/llvm-project/cfe/trunk@178860 --- test/CodeGenCXX/virtual-function-calls.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'test/CodeGenCXX/virtual-function-calls.cpp') diff --git a/test/CodeGenCXX/virtual-function-calls.cpp b/test/CodeGenCXX/virtual-function-calls.cpp index 46e7b2d37f77..e1b380fe7369 100644 --- a/test/CodeGenCXX/virtual-function-calls.cpp +++ b/test/CodeGenCXX/virtual-function-calls.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -std=c++11 -emit-llvm -o - | FileCheck %s // PR5021 namespace PR5021 { @@ -36,3 +36,16 @@ namespace Test1 { b->f(); } } + +namespace VirtualNoreturn { + struct A { + [[noreturn]] virtual void f(); + }; + + // CHECK: @_ZN15VirtualNoreturn1f + void f(A *p) { + p->f(); + // CHECK: call void %{{[^#]*$}} + // CHECK-NOT: unreachable + } +} -- cgit v1.2.3