xref: /llvm-project/clang/test/SemaObjCXX/nullptr.mm (revision c6e68daac0fa6e77a89f3ca72f266a528503dd1c)
19ca5c425SRichard Smith// RUN: %clang_cc1 -std=c++11 -fblocks -fsyntax-only -verify %s
2*c6e68daaSAndy Gibbs// expected-no-diagnostics
339e9fa93SDouglas Gregor
439e9fa93SDouglas Gregor@interface A
539e9fa93SDouglas Gregor@end
639e9fa93SDouglas Gregor
739e9fa93SDouglas Gregorvoid comparisons(A *a) {
839e9fa93SDouglas Gregor  (void)(a == nullptr);
939e9fa93SDouglas Gregor  (void)(nullptr == a);
1039e9fa93SDouglas Gregor}
1139e9fa93SDouglas Gregor
1239e9fa93SDouglas Gregorvoid assignment(A *a) {
1339e9fa93SDouglas Gregor  a = nullptr;
1439e9fa93SDouglas Gregor}
153e85c9c5SDouglas Gregor
163e85c9c5SDouglas Gregorint PR10145a = (void(^)())0 == nullptr;
173e85c9c5SDouglas Gregorint PR10145b = nullptr == (void(^)())0;
18