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();


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to