[clang] 59312cb - Fix warning on unused variable. NFC.

Michael Liao via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 3 18:16:28 PST 2019


Author: Michael Liao
Date: 2019-12-03T21:16:10-05:00
New Revision: 59312cb0b81ca13f0674dde66b8e87a8d51d4dda

URL: https://github.com/llvm/llvm-project/commit/59312cb0b81ca13f0674dde66b8e87a8d51d4dda
DIFF: https://github.com/llvm/llvm-project/commit/59312cb0b81ca13f0674dde66b8e87a8d51d4dda.diff

LOG: Fix warning on unused variable. NFC.

Added: 
    

Modified: 
    clang/lib/AST/Expr.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp
index a73531ad5fad..3bc2ea60aa14 100644
--- a/clang/lib/AST/Expr.cpp
+++ b/clang/lib/AST/Expr.cpp
@@ -1678,7 +1678,7 @@ MemberExpr *MemberExpr::Create(
   MemberExpr *E = new (Mem) MemberExpr(Base, IsArrow, OperatorLoc, MemberDecl,
                                        NameInfo, T, VK, OK, NOUR);
 
-  if (FieldDecl *Field = dyn_cast<FieldDecl>(MemberDecl)) {
+  if (isa<FieldDecl>(MemberDecl)) {
     DeclContext *DC = MemberDecl->getDeclContext();
     // dyn_cast_or_null is used to handle objC variables which do not
     // have a declaration context.


        


More information about the cfe-commits mailing list