From e981a8c231725ff9bf96f867922a59fac49a580f Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Fri, 5 Nov 2010 15:21:33 +0000 Subject: Expressions of type std::nullptr_t can be used as sentinels. llvm-svn: 118276 --- clang/test/SemaCXX/nullptr.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'clang/test/SemaCXX/nullptr.cpp') diff --git a/clang/test/SemaCXX/nullptr.cpp b/clang/test/SemaCXX/nullptr.cpp index 0a0d098e364..4f6e2e6eb1c 100644 --- a/clang/test/SemaCXX/nullptr.cpp +++ b/clang/test/SemaCXX/nullptr.cpp @@ -84,3 +84,12 @@ bool g(bool); // Test that we prefer g(void*) over g(bool). static_assert(is_same::value, ""); } + +namespace test2 { + void f(int, ...) __attribute__((sentinel)); + + void g() { + // nullptr can be used as the sentinel value. + f(10, nullptr); + } +} -- cgit v1.2.3