projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d53fec
)
clang: Add test for -Wunreachable-code + weak redeclaration
author
Nico Weber
<thakis@chromium.org>
Fri, 4 Sep 2020 14:26:46 +0000
(10:26 -0400)
committer
Nico Weber
<thakis@chromium.org>
Fri, 4 Sep 2020 14:35:50 +0000
(10:35 -0400)
This tests what caused the revert in
7b033238
.
clang/test/SemaCXX/unreachable-code.cpp
patch
|
blob
|
history
diff --git
a/clang/test/SemaCXX/unreachable-code.cpp
b/clang/test/SemaCXX/unreachable-code.cpp
index
fd006c0
..
0dfc3d5
100644
(file)
--- a/
clang/test/SemaCXX/unreachable-code.cpp
+++ b/
clang/test/SemaCXX/unreachable-code.cpp
@@
-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
+}