-Wnull-conversion warning.
These functions are basically equivalent to other pointer returning fuctions
which are already excluded by -Wnull-conversion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@257231
91177308-0d34-0410-b5e6-
96231b3b80d8
E->getExprLoc()))
return;
+ // Don't warn on functions which have return type nullptr_t.
+ if (isa<CallExpr>(E))
+ return;
+
// Check for NULL (GNUNull) or nullptr (CXX11_nullptr).
const Expr::NullPointerConstantKind NullKind =
E->isNullPointerConstant(S.Context, Expr::NPC_ValueDependentIsNotNull);
template_and_macro2<double>();
}
}
+
+// 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();
+ }
+}