[clang] d82538b - Fix -Wunused compiler warning.
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Mon May 11 00:21:09 PDT 2020
Author: Haojian Wu
Date: 2020-05-11T09:20:48+02:00
New Revision: d82538b3f691f3ba1cb7a945a5f8594f71816fdf
URL: https://github.com/llvm/llvm-project/commit/d82538b3f691f3ba1cb7a945a5f8594f71816fdf
DIFF: https://github.com/llvm/llvm-project/commit/d82538b3f691f3ba1cb7a945a5f8594f71816fdf.diff
LOG: Fix -Wunused compiler warning.
Added:
Modified:
clang/lib/AST/Expr.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp
index 2a0e0425ef1f..8b327300fb2d 100644
--- a/clang/lib/AST/Expr.cpp
+++ b/clang/lib/AST/Expr.cpp
@@ -4686,8 +4686,10 @@ RecoveryExpr::RecoveryExpr(ASTContext &Ctx, QualType T, SourceLocation BeginLoc,
: Expr(RecoveryExprClass, T, VK_LValue, OK_Ordinary), BeginLoc(BeginLoc),
EndLoc(EndLoc), NumExprs(SubExprs.size()) {
assert(!T.isNull());
+#ifndef NDEBUG // avoid -Wunused warnings.
for (auto *E : SubExprs)
assert(E != nullptr);
+#endif
llvm::copy(SubExprs, getTrailingObjects<Expr *>());
setDependence(computeDependence(this));
More information about the cfe-commits
mailing list