Author: Timm Bäder Date: 2023-07-26T07:12:47+02:00 New Revision: 5b78868661f42a70fa3006b1db41f78a6178d596
URL: https://github.com/llvm/llvm-project/commit/5b78868661f42a70fa3006b1db41f78a6178d596 DIFF: https://github.com/llvm/llvm-project/commit/5b78868661f42a70fa3006b1db41f78a6178d596.diff LOG: [clang][Interp][NFC] Make some locals const Added: Modified: clang/lib/AST/Interp/Context.cpp Removed: ################################################################################ diff --git a/clang/lib/AST/Interp/Context.cpp b/clang/lib/AST/Interp/Context.cpp index 2e5d721590edc6..d025586d91b7d3 100644 --- a/clang/lib/AST/Interp/Context.cpp +++ b/clang/lib/AST/Interp/Context.cpp @@ -134,13 +134,13 @@ std::optional<PrimType> Context::classify(QualType T) const { if (T->isReferenceType() || T->isPointerType()) return PT_Ptr; - if (auto *AT = dyn_cast<AtomicType>(T)) + if (const auto *AT = dyn_cast<AtomicType>(T)) return classify(AT->getValueType()); - if (auto *DT = dyn_cast<DecltypeType>(T)) + if (const auto *DT = dyn_cast<DecltypeType>(T)) return classify(DT->getUnderlyingType()); - if (auto *DT = dyn_cast<MemberPointerType>(T)) + if (const auto *DT = dyn_cast<MemberPointerType>(T)) return classify(DT->getPointeeType()); return {}; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits