clang: Add test for -Wunreachable-code + weak redeclaration
This tests what caused the revert in 7b033238
.
This commit is contained in:
parent
7d53fecb67
commit
2a03f270d6
|
@ -68,3 +68,12 @@ int pr6130(unsigned i) {
|
|||
throw PR6130(); // no-warning
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" void foo(void);
|
||||
extern "C" __attribute__((weak)) decltype(foo) foo;
|
||||
|
||||
void weak_redecl() {
|
||||
if (foo)
|
||||
return;
|
||||
bar(); // no-warning
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue