summaryrefslogtreecommitdiffstats
path: root/test/SemaObjC/exprs.m
blob: d51d135fa27a5be9c05c89c0b6b7e4f667af8728 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// RUN: clang-cc %s -fsyntax-only -verify

// rdar://6597252
Class test1(Class X) {
  return 1 ? X : X;
}


// rdar://6079877
void test2() {
  id str = @"foo" 
          "bar\0"    // expected-warning {{literal contains NUL character}}
          @"baz"  " blarg";
  id str2 = @"foo" 
            "bar"
           @"baz"
           " b\0larg";  // expected-warning {{literal contains NUL character}}

  
  if (@encode(int) == "foo") { }  // expected-warning {{result of comparison against @encode is unspecified}}
}
OpenPOWER on IntegriCloud