[clang] 70b53a3 - Fix gcc `-Wunused-variable` warning. NFC.
Michael Liao via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 19 09:24:31 PST 2020
Author: Michael Liao
Date: 2020-01-19T12:24:21-05:00
New Revision: 70b53a301888fe2be36996b41a7dd5aa7c256dc9
URL: https://github.com/llvm/llvm-project/commit/70b53a301888fe2be36996b41a7dd5aa7c256dc9
DIFF: https://github.com/llvm/llvm-project/commit/70b53a301888fe2be36996b41a7dd5aa7c256dc9.diff
LOG: Fix gcc `-Wunused-variable` warning. NFC.
Added:
Modified:
clang/lib/Serialization/ASTReaderStmt.cpp
Removed:
################################################################################
diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp
index 5dd0ef9d43c3..99dc1e9172c4 100644
--- a/clang/lib/Serialization/ASTReaderStmt.cpp
+++ b/clang/lib/Serialization/ASTReaderStmt.cpp
@@ -732,7 +732,7 @@ readConstraintSatisfaction(ASTRecordReader &Record) {
unsigned NumDetailRecords = Record.readInt();
for (unsigned i = 0; i != NumDetailRecords; ++i) {
Expr *ConstraintExpr = Record.readExpr();
- if (bool IsDiagnostic = Record.readInt()) {
+ if (/* IsDiagnostic */Record.readInt()) {
SourceLocation DiagLocation = Record.readSourceLocation();
std::string DiagMessage = Record.readString();
Satisfaction.Details.emplace_back(
@@ -822,7 +822,7 @@ void ASTStmtReader::VisitRequiresExpr(RequiresExpr *E) {
Req.emplace();
} else {
NoexceptLoc = Record.readSourceLocation();
- switch (auto returnTypeRequirementKind = Record.readInt()) {
+ switch (/* returnTypeRequirementKind */Record.readInt()) {
case 0:
// No return type requirement.
Req.emplace();
@@ -853,7 +853,7 @@ void ASTStmtReader::VisitRequiresExpr(RequiresExpr *E) {
std::move(*Req));
} break;
case concepts::Requirement::RK_Nested: {
- if (bool IsSubstitutionDiagnostic = Record.readInt()) {
+ if (/* IsSubstitutionDiagnostic */Record.readInt()) {
R = new (Record.getContext()) concepts::NestedRequirement(
readSubstitutionDiagnostic(Record));
break;
More information about the cfe-commits
mailing list