aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land.
Changes generally LGTM though I spotted a few places where we might as well update to `auto` and one place where I think a `const` was missed. ================ Comment at: clang/lib/Sema/SemaExpr.cpp:2122-2123 - FieldDecl *FD = dyn_cast<FieldDecl>(D); - if (IndirectFieldDecl *IFD = dyn_cast<IndirectFieldDecl>(D)) + const FieldDecl *FD = dyn_cast<FieldDecl>(D); + if (const IndirectFieldDecl *IFD = dyn_cast<IndirectFieldDecl>(D)) FD = IFD->getAnonField(); ---------------- ================ Comment at: clang/lib/Sema/SemaExpr.cpp:2222 CodeSynthesisContext::DefaultFunctionArgumentInstantiation; - CXXMethodDecl *CurMethod = dyn_cast<CXXMethodDecl>(CurContext); + const CXXMethodDecl *CurMethod = dyn_cast<CXXMethodDecl>(CurContext); bool isInstance = CurMethod && CurMethod->isInstance() && ---------------- ================ Comment at: clang/lib/Sema/SemaExpr.cpp:3012 NamedDecl *Member) { - CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(Member->getDeclContext()); + const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(Member->getDeclContext()); if (!RD) ---------------- ================ Comment at: clang/lib/Sema/SemaExpr.cpp:3037 } - } else if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(Member)) { + } else if (const CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(Member)) { if (Method->isStatic()) ---------------- ================ Comment at: clang/lib/Sema/SemaLookup.cpp:1337 if (S->isClassScope()) - if (CXXRecordDecl *Record = - dyn_cast_or_null<CXXRecordDecl>(S->getEntity())) + if (auto *Record = dyn_cast_if_present<CXXRecordDecl>(S->getEntity())) R.setNamingClass(Record); ---------------- Right? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148696/new/ https://reviews.llvm.org/D148696 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits