Home | History | Annotate | Download | only in Sema
      1 // RUN: %clang_cc1 -fblocks -fsyntax-only -Wunused-parameter %s 2>&1 | FileCheck %s
      2 // RUN: %clang_cc1 -fblocks -fsyntax-only -Wunused %s 2>&1 | FileCheck -check-prefix=CHECK-unused %s
      3 
      4 int f0(int x,
      5        int y,
      6        int z __attribute__((unused))) {
      7   return x;
      8 }
      9 
     10 void f1() {
     11   (void)^(int x,
     12           int y,
     13           int z __attribute__((unused))) { return x; };
     14 }
     15 
     16 // Used when testing '-Wunused' to see that we only emit one diagnostic, and no
     17 // warnings for the above cases.
     18 static void achor() {};
     19 
     20 // CHECK: 5:12: warning: unused parameter 'y'
     21 // CHECK: 12:15: warning: unused parameter 'y'
     22 // CHECK-unused: 1 warning generated