macros.c 328 B

12345678910111213
  1. // RUN: %clang_cc1 -DA= -DB=1 -verify -fsyntax-only %s
  2. // expected-no-diagnostics
  3. int a[(B A) == 1 ? 1 : -1];
  4. // PR13747 - Don't warn about unused results with statement exprs in macros.
  5. void stuff(int,int,int);
  6. #define memset(x,y,z) ({ stuff(x,y,z); x; })
  7. void foo(int a, int b, int c) {
  8. memset(a,b,c); // No warning!
  9. }