Author: Timm Bäder Date: 2023-07-23T10:31:22+02:00 New Revision: 142bfaff7e7bbb768b5f22b3b14691b5ce3615f9
URL: https://github.com/llvm/llvm-project/commit/142bfaff7e7bbb768b5f22b3b14691b5ce3615f9 DIFF: https://github.com/llvm/llvm-project/commit/142bfaff7e7bbb768b5f22b3b14691b5ce3615f9.diff LOG: [clang][Interp][NFC] Fix two small code style problems Added: Modified: clang/lib/AST/Interp/ByteCodeStmtGen.cpp Removed: ################################################################################ diff --git a/clang/lib/AST/Interp/ByteCodeStmtGen.cpp b/clang/lib/AST/Interp/ByteCodeStmtGen.cpp index e20b714120e8da..0c512950c292a9 100644 --- a/clang/lib/AST/Interp/ByteCodeStmtGen.cpp +++ b/clang/lib/AST/Interp/ByteCodeStmtGen.cpp @@ -95,7 +95,7 @@ bool ByteCodeStmtGen<Emitter>::visitFunc(const FunctionDecl *F) { ReturnType = this->classify(F->getReturnType()); // Constructor. Set up field initializers. - if (const auto Ctor = dyn_cast<CXXConstructorDecl>(F)) { + if (const auto *Ctor = dyn_cast<CXXConstructorDecl>(F)) { const RecordDecl *RD = Ctor->getParent(); const Record *R = this->getRecord(RD); if (!R) @@ -133,7 +133,7 @@ bool ByteCodeStmtGen<Emitter>::visitFunc(const FunctionDecl *F) { } else if (const Type *Base = Init->getBaseClass()) { // Base class initializer. // Get This Base and call initializer on it. - auto *BaseDecl = Base->getAsCXXRecordDecl(); + const auto *BaseDecl = Base->getAsCXXRecordDecl(); assert(BaseDecl); const Record::Base *B = R->getBase(BaseDecl); assert(B); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits