blob: 73a921e8c895cd195d663d5e42ce9e9cfc6fc130 [file] [log] [blame]
Richard Smith762bb9d2011-10-13 22:29:44 +00001// RUN: %clang_cc1 -std=c++11 -fblocks -fsyntax-only -verify %s
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +00002// expected-no-diagnostics
Douglas Gregor17e37c72011-06-01 15:12:24 +00003
4@interface A
5@end
6
7void comparisons(A *a) {
8 (void)(a == nullptr);
9 (void)(nullptr == a);
10}
11
12void assignment(A *a) {
13 a = nullptr;
14}
Douglas Gregor16cd4b72011-06-16 18:52:05 +000015
16int PR10145a = (void(^)())0 == nullptr;
17int PR10145b = nullptr == (void(^)())0;