2009-11-08 04:45:36 +03:00
|
|
|
// RUN: clang-cc -fsyntax-only %s > %t 2>&1
|
2009-05-06 02:03:18 +04:00
|
|
|
|
|
|
|
#define M1(x) x
|
|
|
|
|
2009-11-08 04:45:36 +03:00
|
|
|
// RUN: grep ":6:12: note: instantiated from:" %t
|
2009-05-06 02:03:18 +04:00
|
|
|
#define M2 1;
|
|
|
|
|
|
|
|
void foo() {
|
2009-11-08 04:45:36 +03:00
|
|
|
// RUN: grep ":10:2: warning: expression result unused" %t
|
2009-05-06 02:03:18 +04:00
|
|
|
M1(
|
2009-11-08 04:45:36 +03:00
|
|
|
// RUN: grep ":12:5: note: instantiated from:" %t
|
2009-05-06 02:03:18 +04:00
|
|
|
M2)
|
|
|
|
}
|
|
|
|
|
2009-11-08 04:45:36 +03:00
|
|
|
// RUN: grep ":16:11: note: instantiated from:" %t
|
2009-05-06 02:03:18 +04:00
|
|
|
#define A 1
|
2009-11-08 04:45:36 +03:00
|
|
|
// RUN: grep ":18:11: note: instantiated from:" %t
|
2009-05-06 02:03:18 +04:00
|
|
|
#define B A
|
2009-11-08 04:45:36 +03:00
|
|
|
// RUN: grep ":20:11: note: instantiated from:" %t
|
2009-05-06 02:03:18 +04:00
|
|
|
#define C B
|
|
|
|
|
|
|
|
void bar() {
|
|
|
|
// RUN: grep ":24:3: warning: expression result unused" %t
|
|
|
|
C;
|
|
|
|
}
|
|
|
|
|