[clang] df3ddd7 - CGBuiltin - fix gcc Wunused-variable warning. NFC.

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 18 03:51:38 PST 2023


Author: Simon Pilgrim
Date: 2023-12-18T11:51:24Z
New Revision: df3ddd78f640ebec74151028d919904c6cf9ecdd

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

LOG: CGBuiltin - fix gcc Wunused-variable warning. NFC.

Added: 
    

Modified: 
    clang/lib/CodeGen/CGBuiltin.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index c96f86a823a461..c42b885289c4c7 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -942,7 +942,7 @@ CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type,
                      : Builder.CreateZExtOrTrunc(FAMSize, ResType);
   Value *Res = FAMSize;
 
-  if (const auto *DRE = dyn_cast<DeclRefExpr>(Base)) {
+  if (isa<DeclRefExpr>(Base)) {
     // The whole struct is specificed in the __bdos.
     const RecordDecl *OuterRD =
         CountedByFD->getDeclContext()->getOuterLexicalRecordContext();


        


More information about the cfe-commits mailing list