[clang] 1343632 - [clang] Fix gcc-6 compilation error. (NFC)

Sunho Kim via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 3 13:33:59 PDT 2022


Author: Sunho Kim
Date: 2022-07-04T05:33:05+09:00
New Revision: 134363208b9272a967c911f7b56c255a72a6f0a0

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

LOG: [clang] Fix gcc-6 compilation error. (NFC)

Fix https://github.com/llvm/llvm-project/issues/55626.

Differential Revision: https://reviews.llvm.org/D129049

Added: 
    

Modified: 
    clang/lib/AST/Interp/ByteCodeExprGen.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/Interp/ByteCodeExprGen.cpp b/clang/lib/AST/Interp/ByteCodeExprGen.cpp
index da538aa332ffc..9b729e347a245 100644
--- a/clang/lib/AST/Interp/ByteCodeExprGen.cpp
+++ b/clang/lib/AST/Interp/ByteCodeExprGen.cpp
@@ -496,7 +496,7 @@ ByteCodeExprGen<Emitter>::getGlobalIdx(const VarDecl *VD) {
 
 template <class Emitter>
 const RecordType *ByteCodeExprGen<Emitter>::getRecordTy(QualType Ty) {
-  if (auto *PT = dyn_cast<PointerType>(Ty))
+  if (const PointerType *PT = dyn_cast<PointerType>(Ty))
     return PT->getPointeeType()->getAs<RecordType>();
   else
     return Ty->getAs<RecordType>();


        


More information about the cfe-commits mailing list