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:
036e092
)
-Wunsafe-buffer-usage: fix build when -DLLVM_ENABLE_ASSERTIONS=off
author
Fangrui Song
<i@maskray.me>
Fri, 16 Dec 2022 23:43:32 +0000
(23:43 +0000)
committer
Fangrui Song
<i@maskray.me>
Fri, 16 Dec 2022 23:43:32 +0000
(23:43 +0000)
clang/lib/Analysis/UnsafeBufferUsage.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/Analysis/UnsafeBufferUsage.cpp
b/clang/lib/Analysis/UnsafeBufferUsage.cpp
index
4282435
..
d2a3c49
100644
(file)
--- a/
clang/lib/Analysis/UnsafeBufferUsage.cpp
+++ b/
clang/lib/Analysis/UnsafeBufferUsage.cpp
@@
-146,7
+146,7
@@
static GadgetList findGadgets(const Decl *D) {
#if NDEBUG
#define NEXT return
#else
- int numFound = 0;
+
[[maybe_unused]]
int numFound = 0;
#define NEXT ++numFound
#endif
@@
-162,7
+162,6
@@
static GadgetList findGadgets(const Decl *D) {
assert(numFound >= 1 && "Gadgets not found in match result!");
assert(numFound <= 1 && "Conflicting bind tags in gadgets!");
- (void)numFound;
}
};