mirror of
https://github.com/intel/llvm.git
synced 2026-01-28 01:04:49 +08:00
removed duplicated tests - Howard was quicker than me.
llvm-svn: 149545
This commit is contained in:
@@ -1,64 +0,0 @@
|
||||
//===--------------------- catch_pointer_nullptr.cpp ----------------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
||||
// Source Licenses. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#if __has_feature(cxx_nullptr)
|
||||
|
||||
struct A {};
|
||||
|
||||
void test1()
|
||||
{
|
||||
try
|
||||
{
|
||||
throw nullptr;
|
||||
assert(false);
|
||||
}
|
||||
catch (const A*)
|
||||
{
|
||||
}
|
||||
catch (A*)
|
||||
{
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
|
||||
void test2()
|
||||
{
|
||||
try
|
||||
{
|
||||
throw nullptr;
|
||||
assert(false);
|
||||
}
|
||||
catch (A*)
|
||||
{
|
||||
}
|
||||
catch (const A*)
|
||||
{
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void test1()
|
||||
{
|
||||
}
|
||||
|
||||
void test2()
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
int main()
|
||||
{
|
||||
test1();
|
||||
test2();
|
||||
}
|
||||
Reference in New Issue
Block a user