forked from OSchip/llvm-project
Add test case for PR 9774, which got fixed along the way.
llvm-svn: 147479
This commit is contained in:
parent
228f5b4ba3
commit
b74c909b3c
|
@ -125,4 +125,10 @@ void test_assert() {
|
|||
return; // no-warning
|
||||
}
|
||||
|
||||
// Test case for PR 9774. Tests that dead code in macros aren't warned about.
|
||||
#define MY_MAX(a,b) ((a) >= (b) ? (a) : (b))
|
||||
void PR9774(int *s) {
|
||||
for (int i = 0; i < MY_MAX(2, 3); i++) // no-warning
|
||||
s[i] = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue