From 09d6b80f8201143ec52dd0f9a52fa2f73fd6149b Mon Sep 17 00:00:00 2001 From: Richard Trieu Date: Fri, 8 Jan 2016 23:35:06 +0000 Subject: Exclude function calls for functions which have return type nullptr_t from -Wnull-conversion warning. These functions are basically equivalent to other pointer returning fuctions which are already excluded by -Wnull-conversion. llvm-svn: 257231 --- clang/test/SemaCXX/conversion.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'clang/test') diff --git a/clang/test/SemaCXX/conversion.cpp b/clang/test/SemaCXX/conversion.cpp index 89751a493ee..2c83147ff4c 100644 --- a/clang/test/SemaCXX/conversion.cpp +++ b/clang/test/SemaCXX/conversion.cpp @@ -197,3 +197,14 @@ namespace test8 { template_and_macro2(); } } + +// Don't warn on a nullptr to bool conversion when the nullptr is the return +// type of a function. +namespace test9 { + typedef decltype(nullptr) nullptr_t; + nullptr_t EXIT(); + + bool test() { + return EXIT(); + } +} -- cgit v1.2.3