[clang] 896fa30 - Fix unused variable warning
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 24 04:53:43 PDT 2020
Author: Simon Pilgrim
Date: 2020-03-24T11:51:49Z
New Revision: 896fa30fc03091f7ea679f38616cae05166fb4be
URL: https://github.com/llvm/llvm-project/commit/896fa30fc03091f7ea679f38616cae05166fb4be
DIFF: https://github.com/llvm/llvm-project/commit/896fa30fc03091f7ea679f38616cae05166fb4be.diff
LOG: Fix unused variable warning
Added:
Modified:
clang/lib/Tooling/Syntax/BuildTree.cpp
Removed:
################################################################################
diff --git a/clang/lib/Tooling/Syntax/BuildTree.cpp b/clang/lib/Tooling/Syntax/BuildTree.cpp
index 4103a4d92c7d..82c87ba02b74 100644
--- a/clang/lib/Tooling/Syntax/BuildTree.cpp
+++ b/clang/lib/Tooling/Syntax/BuildTree.cpp
@@ -1059,7 +1059,7 @@ void syntax::TreeBuilder::markStmtChild(Stmt *Child, NodeRole Role) {
// This is an expression in a statement position, consume the trailing
// semicolon and form an 'ExpressionStatement' node.
- if (auto *E = dyn_cast<Expr>(Child)) {
+ if (isa<Expr>(Child)) {
setRole(ChildNode, NodeRole::ExpressionStatement_expression);
ChildNode = new (allocator()) syntax::ExpressionStatement;
// (!) 'getStmtRange()' ensures this covers a trailing semicolon.
More information about the cfe-commits
mailing list