<div dir="ltr">Thank you Aaron and David for your inputs.<div><br></div><div>First and foremost, I apologize if I made your job harder by increasing the number of commits you have to peel to get to the real author.</div><div><br></div><div>I hear that we are moving toward github pull requests.  A casual search tells me that there are some add-ons to integrate clang-tidy into the code review platform, so I am hoping we can use something like that to get each patch right first time.</div><div><br></div><div>Going forward, I'll take git churn and the difficulty of backsliding as big factors in doing future clenaups.  For example, it's probably a good idea to delete a function that hasn't been used for many years (excluding dump functions and such).  Library standardization (like the recent removal of llvm::array_lengthof in favor of std::size) is less good in terms of git churn, but it's very unlikely for somebody to re-introduce llvm::array_lengthof.</div><div><br></div><div>Thanks,</div><div><br></div><div>Kazu Hirata</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 9, 2022 at 5:27 AM Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Sep 8, 2022 at 12:37 PM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br>
><br>
> Mixed feelings here - Kazu's made a lot of cleanup/stylistic changes<br>
> across the LLVM project for a while now, most, at least I think, are<br>
> quite welcome (things like switching to range-based-for, std<br>
> algorithms over llvm ones, llvm algorithms over manually written<br>
> loops, etc). But yeah, there's some threshold below which the churn<br>
> might not be worth the benefit - especially if the change doesn't come<br>
> along with tooling to enforce the invariant is maintained in the<br>
> future (if it's easy to make mistakes like this one - we'll regress it<br>
> and need to do cleanup again in the future)<br>
<br>
Thanks for speaking up, because I also waffled a bit on whether I<br>
called this out or not. :-)<br>
<br>
> Also, for this particular one, I wonder if in some cases this sort of<br>
> automatic transformation isn't ideal - if something is a pointer, but<br>
> that's an implementation detail, rather than an intentional feature of<br>
> an API (eg: the pointer-ness might be hidden behind a typedef and used<br>
> as an opaque handle, without any dereferencing, etc)<br>
<br>
Agreed.<br>
<br>
> I think it'd be really good to have some discussion on discourse about<br>
> if/how some of these cleanups could be formed into a way to<br>
> enforce/encourage the invariant to be maintained going forward -<br>
> clang-tidy (assuming that's the basis for the tooling Kazu's using to<br>
> make these changes in the first place) integration into the LLVM build<br>
> in some way, etc.<br>
<br>
I think that's a good idea! We want to encourage cleanups, but we<br>
don't want to encourage churn, and I think it's somewhat subjective<br>
where to draw that line. Having some more community awareness around<br>
that would be beneficial. I'm especially interested in how we balance<br>
between making incremental style improvements to the project and<br>
keeping our git blame logs useful. I'm seeing a lot more git blames<br>
that require several steps to get to an interesting commit because of<br>
the number of NFCs and reverts/recommits. Unfortunately, the tooling<br>
around viewing git blames of large files (like Clang tends to have)<br>
makes these sorts of commits surprisingly painful when you do have to<br>
dig to see where changes came from. (So I find myself having far less<br>
concern when TransGCAttrs.cpp (~350LoC) gets a cleanup like this<br>
compared to SemaExpr.cpp (~21kLoC), which suggests to me we should<br>
maybe strongly consider splitting more of these massive files up so<br>
that churn is less painful.)<br>
<br>
> & yeah, adding the `const` too if/when that's relevant would've<br>
> improved the quality/value/justification for a cleanup change like<br>
> this.<br>
<br>
It also would have matched our coding style. (We document it somewhat<br>
poorly as an example showing "observe" and "change", but reviewers who<br>
call for cleanups with auto are pretty consistent about asking to make<br>
qualifiers explicit.)<br>
<br>
~Aaron<br>
<br>
><br>
> On Sun, Sep 4, 2022 at 5:58 AM Aaron Ballman via cfe-commits<br>
> <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br>
> ><br>
> > FWIW, sweeping NFC changes like this cause a fair amount of code churn<br>
> > (which makes tools like git blame a bit harder to use) for a<br>
> > relatively small improvement to code readability, which is why our<br>
> > developer policy asks that you "Avoid committing formatting- or<br>
> > whitespace-only changes outside of code you plan to make subsequent<br>
> > changes to." In the future, I'd caution against doing such large-scale<br>
> > sweeping NFC changes outside of areas you're actively working on<br>
> > unless there's some wider discussion with the community first. That<br>
> > said, all of your changes are all improvements, so thank you for them!<br>
> ><br>
> > Some of the changes you made would have ideally made it more clear<br>
> > when the deduced type is a pointer to a const object instead of hiding<br>
> > the qualifier behind the deduction. I've pointed out a couple such<br>
> > places below, but don't feel obligated to go back and change anything<br>
> > unless you're going to be touching other code in the area.<br>
> ><br>
> > ~Aaron<br>
> ><br>
> ><br>
> > On Sun, Sep 4, 2022 at 2:27 AM Kazu Hirata via cfe-commits<br>
> > <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br>
> > ><br>
> > ><br>
> > > Author: Kazu Hirata<br>
> > > Date: 2022-09-03T23:27:27-07:00<br>
> > > New Revision: b7a7aeee90cffefd0f73b8d9f44ab4d1d5123d05<br>
> > ><br>
> > > URL: <a href="https://github.com/llvm/llvm-project/commit/b7a7aeee90cffefd0f73b8d9f44ab4d1d5123d05" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/b7a7aeee90cffefd0f73b8d9f44ab4d1d5123d05</a><br>
> > > DIFF: <a href="https://github.com/llvm/llvm-project/commit/b7a7aeee90cffefd0f73b8d9f44ab4d1d5123d05.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/b7a7aeee90cffefd0f73b8d9f44ab4d1d5123d05.diff</a><br>
> > ><br>
> > > LOG: [clang] Qualify auto in range-based for loops (NFC)<br>
> > ><br>
> > > Added:<br>
> > ><br>
> > ><br>
> > > Modified:<br>
> > >     clang/lib/ARCMigrate/ObjCMT.cpp<br>
> > >     clang/lib/ARCMigrate/TransGCAttrs.cpp<br>
> > >     clang/lib/AST/ASTContext.cpp<br>
> > >     clang/lib/AST/ASTImporter.cpp<br>
> > >     clang/lib/AST/Decl.cpp<br>
> > >     clang/lib/AST/DeclObjC.cpp<br>
> > >     clang/lib/AST/ODRHash.cpp<br>
> > >     clang/lib/AST/OpenMPClause.cpp<br>
> > >     clang/lib/AST/StmtProfile.cpp<br>
> > >     clang/lib/AST/Type.cpp<br>
> > >     clang/lib/Analysis/CFG.cpp<br>
> > >     clang/lib/Analysis/ThreadSafetyCommon.cpp<br>
> > >     clang/lib/CodeGen/CGBlocks.cpp<br>
> > >     clang/lib/CodeGen/CGCall.cpp<br>
> > >     clang/lib/CodeGen/CGClass.cpp<br>
> > >     clang/lib/CodeGen/CGDebugInfo.cpp<br>
> > >     clang/lib/CodeGen/CGDeclCXX.cpp<br>
> > >     clang/lib/CodeGen/CGExpr.cpp<br>
> > >     clang/lib/CodeGen/CGObjCGNU.cpp<br>
> > >     clang/lib/CodeGen/CGObjCMac.cpp<br>
> > >     clang/lib/CodeGen/CodeGenFunction.cpp<br>
> > >     clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp<br>
> > >     clang/lib/CodeGen/SwiftCallingConv.cpp<br>
> > >     clang/lib/Driver/Compilation.cpp<br>
> > >     clang/lib/Driver/Driver.cpp<br>
> > >     clang/lib/Driver/ToolChains/Clang.cpp<br>
> > >     clang/lib/Driver/ToolChains/CommonArgs.cpp<br>
> > >     clang/lib/Driver/ToolChains/Gnu.cpp<br>
> > >     clang/lib/Driver/ToolChains/HIPAMD.cpp<br>
> > >     clang/lib/Format/Format.cpp<br>
> > >     clang/lib/Frontend/FrontendActions.cpp<br>
> > >     clang/lib/Index/USRGeneration.cpp<br>
> > >     clang/lib/Sema/IdentifierResolver.cpp<br>
> > >     clang/lib/Sema/Sema.cpp<br>
> > >     clang/lib/Sema/SemaCodeComplete.cpp<br>
> > >     clang/lib/Sema/SemaDecl.cpp<br>
> > >     clang/lib/Sema/SemaDeclAttr.cpp<br>
> > >     clang/lib/Sema/SemaDeclCXX.cpp<br>
> > >     clang/lib/Sema/SemaDeclObjC.cpp<br>
> > >     clang/lib/Sema/SemaExpr.cpp<br>
> > >     clang/lib/Sema/SemaExprCXX.cpp<br>
> > >     clang/lib/Sema/SemaInit.cpp<br>
> > >     clang/lib/Sema/SemaLambda.cpp<br>
> > >     clang/lib/Sema/SemaLookup.cpp<br>
> > >     clang/lib/Sema/SemaObjCProperty.cpp<br>
> > >     clang/lib/Sema/SemaOpenMP.cpp<br>
> > >     clang/lib/Sema/SemaOverload.cpp<br>
> > >     clang/lib/Sema/SemaTemplateDeduction.cpp<br>
> > >     clang/lib/Sema/SemaTemplateInstantiateDecl.cpp<br>
> > >     clang/lib/Serialization/ASTReader.cpp<br>
> > >     clang/lib/Serialization/ASTWriterDecl.cpp<br>
> > >     clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp<br>
> > >     clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp<br>
> > >     clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp<br>
> > >     clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp<br>
> > >     clang/lib/StaticAnalyzer/Checkers/WebKit/NoUncountedMembersChecker.cpp<br>
> > >     clang/lib/StaticAnalyzer/Core/CallEvent.cpp<br>
> > >     clang/lib/StaticAnalyzer/Core/CoreEngine.cpp<br>
> > >     clang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp<br>
> > >     clang/lib/Tooling/Tooling.cpp<br>
> > ><br>
> > > Removed:<br>
> > ><br>
> > ><br>
> > ><br>
> > > ################################################################################<br>
> > > diff  --git a/clang/lib/ARCMigrate/ObjCMT.cpp b/clang/lib/ARCMigrate/ObjCMT.cpp<br>
> > > index 26f751b77f86a..fe0ce4c5cdc3a 100644<br>
> > > --- a/clang/lib/ARCMigrate/ObjCMT.cpp<br>
> > > +++ b/clang/lib/ARCMigrate/ObjCMT.cpp<br>
> > > @@ -792,7 +792,7 @@ static bool UseNSOptionsMacro(Preprocessor &PP, ASTContext &Ctx,<br>
> > >    bool PowerOfTwo = true;<br>
> > >    bool AllHexdecimalEnumerator = true;<br>
> > >    uint64_t MaxPowerOfTwoVal = 0;<br>
> > > -  for (auto Enumerator : EnumDcl->enumerators()) {<br>
> > > +  for (auto *Enumerator : EnumDcl->enumerators()) {<br>
> > >      const Expr *InitExpr = Enumerator->getInitExpr();<br>
> > >      if (!InitExpr) {<br>
> > >        PowerOfTwo = false;<br>
> > ><br>
> > > diff  --git a/clang/lib/ARCMigrate/TransGCAttrs.cpp b/clang/lib/ARCMigrate/TransGCAttrs.cpp<br>
> > > index 99a61e0842a76..b94aee2de573e 100644<br>
> > > --- a/clang/lib/ARCMigrate/TransGCAttrs.cpp<br>
> > > +++ b/clang/lib/ARCMigrate/TransGCAttrs.cpp<br>
> > > @@ -158,7 +158,7 @@ class GCAttrsCollector : public RecursiveASTVisitor<GCAttrsCollector> {<br>
> > >      if (!D)<br>
> > >        return false;<br>
> > ><br>
> > > -    for (auto I : D->redecls())<br>
> > > +    for (auto *I : D->redecls())<br>
> > >        if (!isInMainFile(I->getLocation()))<br>
> > >          return false;<br>
> > ><br>
> > ><br>
> > > diff  --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp<br>
> > > index 52e7eeca665ab..20fcc8fea4b79 100644<br>
> > > --- a/clang/lib/AST/ASTContext.cpp<br>
> > > +++ b/clang/lib/AST/ASTContext.cpp<br>
> > > @@ -7568,7 +7568,7 @@ std::string ASTContext::getObjCEncodingForBlock(const BlockExpr *Expr) const {<br>
> > >    // FIXME: There might(should) be a better way of doing this computation!<br>
> > >    CharUnits PtrSize = getTypeSizeInChars(VoidPtrTy);<br>
> > >    CharUnits ParmOffset = PtrSize;<br>
> > > -  for (auto PI : Decl->parameters()) {<br>
> > > +  for (auto *PI : Decl->parameters()) {<br>
> > >      QualType PType = PI->getType();<br>
> > >      CharUnits sz = getObjCEncodingTypeSize(PType);<br>
> > >      if (sz.isZero())<br>
> > > @@ -7583,7 +7583,7 @@ std::string ASTContext::getObjCEncodingForBlock(const BlockExpr *Expr) const {<br>
> > ><br>
> > >    // Argument types.<br>
> > >    ParmOffset = PtrSize;<br>
> > > -  for (auto PVDecl : Decl->parameters()) {<br>
> > > +  for (auto *PVDecl : Decl->parameters()) {<br>
> > >      QualType PType = PVDecl->getOriginalType();<br>
> > >      if (const auto *AT =<br>
> > >              dyn_cast<ArrayType>(PType->getCanonicalTypeInternal())) {<br>
> > > @@ -7612,7 +7612,7 @@ ASTContext::getObjCEncodingForFunctionDecl(const FunctionDecl *Decl) const {<br>
> > >    getObjCEncodingForType(Decl->getReturnType(), S);<br>
> > >    CharUnits ParmOffset;<br>
> > >    // Compute size of all parameters.<br>
> > > -  for (auto PI : Decl->parameters()) {<br>
> > > +  for (auto *PI : Decl->parameters()) {<br>
> > >      QualType PType = PI->getType();<br>
> > >      CharUnits sz = getObjCEncodingTypeSize(PType);<br>
> > >      if (sz.isZero())<br>
> > > @@ -7626,7 +7626,7 @@ ASTContext::getObjCEncodingForFunctionDecl(const FunctionDecl *Decl) const {<br>
> > >    ParmOffset = CharUnits::Zero();<br>
> > ><br>
> > >    // Argument types.<br>
> > > -  for (auto PVDecl : Decl->parameters()) {<br>
> > > +  for (auto *PVDecl : Decl->parameters()) {<br>
> ><br>
> > Because `Decl` is `const FunctionDecl *`, the parameters should<br>
> > (notionally at least) be const as well.<br>
> ><br>
> > >      QualType PType = PVDecl->getOriginalType();<br>
> > >      if (const auto *AT =<br>
> > >              dyn_cast<ArrayType>(PType->getCanonicalTypeInternal())) {<br>
> > > @@ -9724,7 +9724,7 @@ void getIntersectionOfProtocols(ASTContext &Context,<br>
> > >    llvm::SmallPtrSet<ObjCProtocolDecl *, 8> LHSProtocolSet;<br>
> > ><br>
> > >    // Start with the protocol qualifiers.<br>
> > > -  for (auto proto : LHS->quals()) {<br>
> > > +  for (auto *proto : LHS->quals()) {<br>
> > >      Context.CollectInheritedProtocols(proto, LHSProtocolSet);<br>
> > >    }<br>
> > ><br>
> > > @@ -9735,7 +9735,7 @@ void getIntersectionOfProtocols(ASTContext &Context,<br>
> > >    llvm::SmallPtrSet<ObjCProtocolDecl *, 8> RHSProtocolSet;<br>
> > ><br>
> > >    // Start with the protocol qualifiers.<br>
> > > -  for (auto proto : RHS->quals()) {<br>
> > > +  for (auto *proto : RHS->quals()) {<br>
> > >      Context.CollectInheritedProtocols(proto, RHSProtocolSet);<br>
> > >    }<br>
> > ><br>
> > > @@ -9743,7 +9743,7 @@ void getIntersectionOfProtocols(ASTContext &Context,<br>
> > >    Context.CollectInheritedProtocols(RHS->getInterface(), RHSProtocolSet);<br>
> > ><br>
> > >    // Compute the intersection of the collected protocol sets.<br>
> > > -  for (auto proto : LHSProtocolSet) {<br>
> > > +  for (auto *proto : LHSProtocolSet) {<br>
> > >      if (RHSProtocolSet.count(proto))<br>
> > >        IntersectionSet.push_back(proto);<br>
> > >    }<br>
> > ><br>
> > > diff  --git a/clang/lib/AST/ASTImporter.cpp b/clang/lib/AST/ASTImporter.cpp<br>
> > > index c368a61577cba..bd78ece6efa98 100644<br>
> > > --- a/clang/lib/AST/ASTImporter.cpp<br>
> > > +++ b/clang/lib/AST/ASTImporter.cpp<br>
> > > @@ -3592,7 +3592,7 @@ ExpectedDecl ASTNodeImporter::VisitFunctionDecl(FunctionDecl *D) {<br>
> > ><br>
> > >    // Import the function parameters.<br>
> > >    SmallVector<ParmVarDecl *, 8> Parameters;<br>
> > > -  for (auto P : D->parameters()) {<br>
> > > +  for (auto *P : D->parameters()) {<br>
> > >      if (Expected<ParmVarDecl *> ToPOrErr = import(P))<br>
> > >        Parameters.push_back(*ToPOrErr);<br>
> > >      else<br>
> > ><br>
> > > diff  --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp<br>
> > > index 7dc0fec46d421..957610ef36b74 100644<br>
> > > --- a/clang/lib/AST/Decl.cpp<br>
> > > +++ b/clang/lib/AST/Decl.cpp<br>
> > > @@ -1527,7 +1527,7 @@ LinkageInfo LinkageComputer::getLVForDecl(const NamedDecl *D,<br>
> > >    // that all other computed linkages match, check that the one we just<br>
> > >    // computed also does.<br>
> > >    NamedDecl *Old = nullptr;<br>
> > > -  for (auto I : D->redecls()) {<br>
> > > +  for (auto *I : D->redecls()) {<br>
> ><br>
> > Similar here for the redeclarations of a `const NamedDecl *`.<br>
> ><br>
> > >      auto *T = cast<NamedDecl>(I);<br>
> > >      if (T == D)<br>
> > >        continue;<br>
> > > @@ -1825,7 +1825,7 @@ bool NamedDecl::declarationReplaces(NamedDecl *OldD, bool IsKnownNewer) const {<br>
> > >      // Check whether this is actually newer than OldD. We want to keep the<br>
> > >      // newer declaration. This loop will usually only iterate once, because<br>
> > >      // OldD is usually the previous declaration.<br>
> > > -    for (auto D : redecls()) {<br>
> > > +    for (auto *D : redecls()) {<br>
> > >        if (D == OldD)<br>
> > >          break;<br>
> > ><br>
> > > @@ -2273,7 +2273,7 @@ VarDecl *VarDecl::getActingDefinition() {<br>
> > ><br>
> > >  VarDecl *VarDecl::getDefinition(ASTContext &C) {<br>
> > >    VarDecl *First = getFirstDecl();<br>
> > > -  for (auto I : First->redecls()) {<br>
> > > +  for (auto *I : First->redecls()) {<br>
> > >      if (I->isThisDeclarationADefinition(C) == Definition)<br>
> > >        return I;<br>
> > >    }<br>
> > > @@ -2284,7 +2284,7 @@ VarDecl::DefinitionKind VarDecl::hasDefinition(ASTContext &C) const {<br>
> > >    DefinitionKind Kind = DeclarationOnly;<br>
> > ><br>
> > >    const VarDecl *First = getFirstDecl();<br>
> > > -  for (auto I : First->redecls()) {<br>
> > > +  for (auto *I : First->redecls()) {<br>
> > >      Kind = std::max(Kind, I->isThisDeclarationADefinition(C));<br>
> > >      if (Kind == Definition)<br>
> > >        break;<br>
> > > @@ -2294,7 +2294,7 @@ VarDecl::DefinitionKind VarDecl::hasDefinition(ASTContext &C) const {<br>
> > >  }<br>
> > ><br>
> > >  const Expr *VarDecl::getAnyInitializer(const VarDecl *&D) const {<br>
> > > -  for (auto I : redecls()) {<br>
> > > +  for (auto *I : redecls()) {<br>
> > >      if (auto Expr = I->getInit()) {<br>
> > >        D = I;<br>
> > >        return Expr;<br>
> > > @@ -2330,7 +2330,7 @@ Stmt **VarDecl::getInitAddress() {<br>
> > ><br>
> > >  VarDecl *VarDecl::getInitializingDeclaration() {<br>
> > >    VarDecl *Def = nullptr;<br>
> > > -  for (auto I : redecls()) {<br>
> > > +  for (auto *I : redecls()) {<br>
> > >      if (I->hasInit())<br>
> > >        return I;<br>
> > ><br>
> > > @@ -3015,7 +3015,7 @@ FunctionDecl::getDefaultedFunctionInfo() const {<br>
> > >  }<br>
> > ><br>
> > >  bool FunctionDecl::hasBody(const FunctionDecl *&Definition) const {<br>
> > > -  for (auto I : redecls()) {<br>
> > > +  for (auto *I : redecls()) {<br>
> > >      if (I->doesThisDeclarationHaveABody()) {<br>
> > >        Definition = I;<br>
> > >        return true;<br>
> > > @@ -3686,7 +3686,7 @@ bool FunctionDecl::isInlineDefinitionExternallyVisible() const {<br>
> > ><br>
> > >      // If any declaration is 'inline' but not 'extern', then this definition<br>
> > >      // is externally visible.<br>
> > > -    for (auto Redecl : redecls()) {<br>
> > > +    for (auto *Redecl : redecls()) {<br>
> > >        if (Redecl->isInlineSpecified() &&<br>
> > >            Redecl->getStorageClass() != SC_Extern)<br>
> > >          return true;<br>
> > > @@ -3703,7 +3703,7 @@ bool FunctionDecl::isInlineDefinitionExternallyVisible() const {<br>
> > >    //   [...] If all of the file scope declarations for a function in a<br>
> > >    //   translation unit include the inline function specifier without extern,<br>
> > >    //   then the definition in that translation unit is an inline definition.<br>
> > > -  for (auto Redecl : redecls()) {<br>
> > > +  for (auto *Redecl : redecls()) {<br>
> > >      if (RedeclForcesDefC99(Redecl))<br>
> > >        return true;<br>
> > >    }<br>
> > > @@ -4408,7 +4408,7 @@ void TagDecl::startDefinition() {<br>
> > >    if (auto *D = dyn_cast<CXXRecordDecl>(this)) {<br>
> > >      struct CXXRecordDecl::DefinitionData *Data =<br>
> > >        new (getASTContext()) struct CXXRecordDecl::DefinitionData(D);<br>
> > > -    for (auto I : redecls())<br>
> > > +    for (auto *I : redecls())<br>
> > >        cast<CXXRecordDecl>(I)->DefinitionData = Data;<br>
> > >    }<br>
> > >  }<br>
> > > @@ -4441,7 +4441,7 @@ TagDecl *TagDecl::getDefinition() const {<br>
> > >    if (const auto *CXXRD = dyn_cast<CXXRecordDecl>(this))<br>
> > >      return CXXRD->getDefinition();<br>
> > ><br>
> > > -  for (auto R : redecls())<br>
> > > +  for (auto *R : redecls())<br>
> > >      if (R->isCompleteDefinition())<br>
> > >        return R;<br>
> > ><br>
> > ><br>
> > > diff  --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp<br>
> > > index 15c545b59c819..5475d0c841f64 100644<br>
> > > --- a/clang/lib/AST/DeclObjC.cpp<br>
> > > +++ b/clang/lib/AST/DeclObjC.cpp<br>
> > > @@ -864,7 +864,7 @@ bool ObjCMethodDecl::isDesignatedInitializerForTheInterface(<br>
> > >  }<br>
> > ><br>
> > >  bool ObjCMethodDecl::hasParamDestroyedInCallee() const {<br>
> > > -  for (auto param : parameters()) {<br>
> > > +  for (auto *param : parameters()) {<br>
> > >      if (param->isDestroyedInCallee())<br>
> > >        return true;<br>
> > >    }<br>
> > > @@ -1496,7 +1496,7 @@ ObjCTypeParamList *ObjCTypeParamList::create(<br>
> > >  void ObjCTypeParamList::gatherDefaultTypeArgs(<br>
> > >         SmallVectorImpl<QualType> &typeArgs) const {<br>
> > >    typeArgs.reserve(size());<br>
> > > -  for (auto typeParam : *this)<br>
> > > +  for (auto *typeParam : *this)<br>
> > >      typeArgs.push_back(typeParam->getUnderlyingType());<br>
> > >  }<br>
> > ><br>
> > ><br>
> > > diff  --git a/clang/lib/AST/ODRHash.cpp b/clang/lib/AST/ODRHash.cpp<br>
> > > index 04cbb09356d7b..51f806429f67a 100644<br>
> > > --- a/clang/lib/AST/ODRHash.cpp<br>
> > > +++ b/clang/lib/AST/ODRHash.cpp<br>
> > > @@ -564,7 +564,7 @@ void ODRHash::AddFunctionDecl(const FunctionDecl *Function,<br>
> > >    AddQualType(Function->getReturnType());<br>
> > ><br>
> > >    ID.AddInteger(Function->param_size());<br>
> > > -  for (auto Param : Function->parameters())<br>
> > > +  for (auto *Param : Function->parameters())<br>
> > >      AddSubDecl(Param);<br>
> > ><br>
> > >    if (SkipBody) {<br>
> > > @@ -934,7 +934,7 @@ class ODRTypeVisitor : public TypeVisitor<ODRTypeVisitor> {<br>
> > ><br>
> > >      auto Protocols = T->getProtocols();<br>
> > >      ID.AddInteger(Protocols.size());<br>
> > > -    for (auto Protocol : Protocols) {<br>
> > > +    for (auto *Protocol : Protocols) {<br>
> > >        AddDecl(Protocol);<br>
> > >      }<br>
> > ><br>
> > > @@ -952,7 +952,7 @@ class ODRTypeVisitor : public TypeVisitor<ODRTypeVisitor> {<br>
> > >      AddDecl(T->getDecl());<br>
> > >      auto Protocols = T->getProtocols();<br>
> > >      ID.AddInteger(Protocols.size());<br>
> > > -    for (auto Protocol : Protocols) {<br>
> > > +    for (auto *Protocol : Protocols) {<br>
> > >        AddDecl(Protocol);<br>
> > >      }<br>
> > ><br>
> > ><br>
> > > diff  --git a/clang/lib/AST/OpenMPClause.cpp b/clang/lib/AST/OpenMPClause.cpp<br>
> > > index 214ae5bd6be48..adfc1d542bb34 100644<br>
> > > --- a/clang/lib/AST/OpenMPClause.cpp<br>
> > > +++ b/clang/lib/AST/OpenMPClause.cpp<br>
> > > @@ -1702,7 +1702,7 @@ void OMPClausePrinter::VisitOMPSimdlenClause(OMPSimdlenClause *Node) {<br>
> > >  void OMPClausePrinter::VisitOMPSizesClause(OMPSizesClause *Node) {<br>
> > >    OS << "sizes(";<br>
> > >    bool First = true;<br>
> > > -  for (auto Size : Node->getSizesRefs()) {<br>
> > > +  for (auto *Size : Node->getSizesRefs()) {<br>
> > >      if (!First)<br>
> > >        OS << ", ";<br>
> > >      Size->printPretty(OS, nullptr, Policy, 0);<br>
> > ><br>
> > > diff  --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp<br>
> > > index 92a8b18cf68a3..6af2beefc7926 100644<br>
> > > --- a/clang/lib/AST/StmtProfile.cpp<br>
> > > +++ b/clang/lib/AST/StmtProfile.cpp<br>
> > > @@ -472,7 +472,7 @@ void OMPClauseProfiler::VisitOMPSimdlenClause(const OMPSimdlenClause *C) {<br>
> > >  }<br>
> > ><br>
> > >  void OMPClauseProfiler::VisitOMPSizesClause(const OMPSizesClause *C) {<br>
> > > -  for (auto E : C->getSizesRefs())<br>
> > > +  for (auto *E : C->getSizesRefs())<br>
> > >      if (E)<br>
> > >        Profiler->VisitExpr(E);<br>
> > >  }<br>
> > ><br>
> > > diff  --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp<br>
> > > index 136af191f3c04..ec6003fe6559d 100644<br>
> > > --- a/clang/lib/AST/Type.cpp<br>
> > > +++ b/clang/lib/AST/Type.cpp<br>
> > > @@ -3539,7 +3539,7 @@ TagType::TagType(TypeClass TC, const TagDecl *D, QualType can)<br>
> > >        decl(const_cast<TagDecl *>(D)) {}<br>
> > ><br>
> > >  static TagDecl *getInterestingTagDecl(TagDecl *decl) {<br>
> > > -  for (auto I : decl->redecls()) {<br>
> > > +  for (auto *I : decl->redecls()) {<br>
> > >      if (I->isCompleteDefinition() || I->isBeingDefined())<br>
> > >        return I;<br>
> > >    }<br>
> > > @@ -3780,7 +3780,7 @@ void ObjCObjectTypeImpl::Profile(llvm::FoldingSetNodeID &ID,<br>
> > >    for (auto typeArg : typeArgs)<br>
> > >      ID.AddPointer(typeArg.getAsOpaquePtr());<br>
> > >    ID.AddInteger(protocols.size());<br>
> > > -  for (auto proto : protocols)<br>
> > > +  for (auto *proto : protocols)<br>
> > >      ID.AddPointer(proto);<br>
> > >    ID.AddBoolean(isKindOf);<br>
> > >  }<br>
> > > @@ -3798,7 +3798,7 @@ void ObjCTypeParamType::Profile(llvm::FoldingSetNodeID &ID,<br>
> > >    ID.AddPointer(OTPDecl);<br>
> > >    ID.AddPointer(CanonicalType.getAsOpaquePtr());<br>
> > >    ID.AddInteger(protocols.size());<br>
> > > -  for (auto proto : protocols)<br>
> > > +  for (auto *proto : protocols)<br>
> > >      ID.AddPointer(proto);<br>
> > >  }<br>
> > ><br>
> > ><br>
> > > diff  --git a/clang/lib/Analysis/CFG.cpp b/clang/lib/Analysis/CFG.cpp<br>
> > > index 5aaf2fb74318b..f042468ebba72 100644<br>
> > > --- a/clang/lib/Analysis/CFG.cpp<br>
> > > +++ b/clang/lib/Analysis/CFG.cpp<br>
> > > @@ -2994,7 +2994,7 @@ CFGBlock *CFGBuilder::VisitDeclSubExpr(DeclStmt *DS) {<br>
> > >    // If we bind to a tuple-like type, we iterate over the HoldingVars, and<br>
> > >    // create a DeclStmt for each of them.<br>
> > >    if (const auto *DD = dyn_cast<DecompositionDecl>(VD)) {<br>
> > > -    for (auto BD : llvm::reverse(DD->bindings())) {<br>
> > > +    for (auto *BD : llvm::reverse(DD->bindings())) {<br>
> > >        if (auto *VD = BD->getHoldingVar()) {<br>
> > >          DeclGroupRef DG(VD);<br>
> > >          DeclStmt *DSNew =<br>
> > ><br>
> > > diff  --git a/clang/lib/Analysis/ThreadSafetyCommon.cpp b/clang/lib/Analysis/ThreadSafetyCommon.cpp<br>
> > > index 66413f84907a3..06b61b4de92f8 100644<br>
> > > --- a/clang/lib/Analysis/ThreadSafetyCommon.cpp<br>
> > > +++ b/clang/lib/Analysis/ThreadSafetyCommon.cpp<br>
> > > @@ -637,7 +637,7 @@ SExprBuilder::translateAbstractConditionalOperator(<br>
> > >  til::SExpr *<br>
> > >  SExprBuilder::translateDeclStmt(const DeclStmt *S, CallingContext *Ctx) {<br>
> > >    DeclGroupRef DGrp = S->getDeclGroup();<br>
> > > -  for (auto I : DGrp) {<br>
> > > +  for (auto *I : DGrp) {<br>
> > >      if (auto *VD = dyn_cast_or_null<VarDecl>(I)) {<br>
> > >        Expr *E = VD->getInit();<br>
> > >        til::SExpr* SE = translate(E, Ctx);<br>
> > ><br>
> > > diff  --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp<br>
> > > index ff6ca0914e0d1..4061fa805d800 100644<br>
> > > --- a/clang/lib/CodeGen/CGBlocks.cpp<br>
> > > +++ b/clang/lib/CodeGen/CGBlocks.cpp<br>
> > > @@ -521,7 +521,7 @@ static void initializeForBlockHeader(CodeGenModule &CGM, CGBlockInfo &info,<br>
> > >      unsigned BlockAlign = GenPtrAlign.getQuantity();<br>
> > >      if (auto *Helper =<br>
> > >              CGM.getTargetCodeGenInfo().getTargetOpenCLBlockHelper()) {<br>
> > > -      for (auto I : Helper->getCustomFieldTypes()) /* custom fields */ {<br>
> > > +      for (auto *I : Helper->getCustomFieldTypes()) /* custom fields */ {<br>
> > >          // TargetOpenCLBlockHelp needs to make sure the struct is packed.<br>
> > >          // If necessary, add padding fields to the custom fields.<br>
> > >          unsigned Align = CGM.getDataLayout().getABITypeAlignment(I);<br>
> > > @@ -1356,7 +1356,7 @@ static llvm::Constant *buildGlobalBlock(CodeGenModule &CGM,<br>
> > >      fields.add(buildBlockDescriptor(CGM, blockInfo));<br>
> > >    } else if (auto *Helper =<br>
> > >                   CGM.getTargetCodeGenInfo().getTargetOpenCLBlockHelper()) {<br>
> > > -    for (auto I : Helper->getCustomFieldValues(CGM, blockInfo)) {<br>
> > > +    for (auto *I : Helper->getCustomFieldValues(CGM, blockInfo)) {<br>
> > >        fields.add(I);<br>
> > >      }<br>
> > >    }<br>
> > ><br>
> > > diff  --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp<br>
> > > index 90b1270dc8abc..ff39289d68b30 100644<br>
> > > --- a/clang/lib/CodeGen/CGCall.cpp<br>
> > > +++ b/clang/lib/CodeGen/CGCall.cpp<br>
> > > @@ -1723,7 +1723,7 @@ CodeGenTypes::GetFunctionType(const CGFunctionInfo &FI) {<br>
> > ><br>
> > >      case ABIArgInfo::CoerceAndExpand: {<br>
> > >        auto ArgTypesIter = ArgTypes.begin() + FirstIRArg;<br>
> > > -      for (auto EltTy : ArgInfo.getCoerceAndExpandTypeSequence()) {<br>
> > > +      for (auto *EltTy : ArgInfo.getCoerceAndExpandTypeSequence()) {<br>
> > >          *ArgTypesIter++ = EltTy;<br>
> > >        }<br>
> > >        assert(ArgTypesIter == ArgTypes.begin() + FirstIRArg + NumIRArgs);<br>
> > ><br>
> > > diff  --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp<br>
> > > index 4a952b9abd555..bf20c206e1e1f 100644<br>
> > > --- a/clang/lib/CodeGen/CGClass.cpp<br>
> > > +++ b/clang/lib/CodeGen/CGClass.cpp<br>
> > > @@ -2995,7 +2995,7 @@ void CodeGenFunction::EmitLambdaBlockInvokeBody() {<br>
> > >    CallArgs.add(RValue::get(ThisPtr.getPointer()), ThisType);<br>
> > ><br>
> > >    // Add the rest of the parameters.<br>
> > > -  for (auto param : BD->parameters())<br>
> > > +  for (auto *param : BD->parameters())<br>
> > >      EmitDelegateCallArg(CallArgs, param, param->getBeginLoc());<br>
> > ><br>
> > >    assert(!Lambda->isGenericLambda() &&<br>
> > > @@ -3015,7 +3015,7 @@ void CodeGenFunction::EmitLambdaDelegatingInvokeBody(const CXXMethodDecl *MD) {<br>
> > >    CallArgs.add(RValue::get(ThisPtr.getPointer()), ThisType);<br>
> > ><br>
> > >    // Add the rest of the parameters.<br>
> > > -  for (auto Param : MD->parameters())<br>
> > > +  for (auto *Param : MD->parameters())<br>
> > >      EmitDelegateCallArg(CallArgs, Param, Param->getBeginLoc());<br>
> > ><br>
> > >    const CXXMethodDecl *CallOp = Lambda->getLambdaCallOperator();<br>
> > ><br>
> > > diff  --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp<br>
> > > index 4b7e290f6480c..49dcf7781d03a 100644<br>
> > > --- a/clang/lib/CodeGen/CGDebugInfo.cpp<br>
> > > +++ b/clang/lib/CodeGen/CGDebugInfo.cpp<br>
> > > @@ -3894,7 +3894,7 @@ llvm::DISubprogram *CGDebugInfo::getFunctionDeclaration(const Decl *D) {<br>
> > >        return SP;<br>
> > >    }<br>
> > ><br>
> > > -  for (auto NextFD : FD->redecls()) {<br>
> > > +  for (auto *NextFD : FD->redecls()) {<br>
> > >      auto MI = SPCache.find(NextFD->getCanonicalDecl());<br>
> > >      if (MI != SPCache.end()) {<br>
> > >        auto *SP = dyn_cast_or_null<llvm::DISubprogram>(MI->second);<br>
> > ><br>
> > > diff  --git a/clang/lib/CodeGen/CGDeclCXX.cpp b/clang/lib/CodeGen/CGDeclCXX.cpp<br>
> > > index 2075857848656..df17e0b52815c 100644<br>
> > > --- a/clang/lib/CodeGen/CGDeclCXX.cpp<br>
> > > +++ b/clang/lib/CodeGen/CGDeclCXX.cpp<br>
> > > @@ -707,7 +707,7 @@ void CodeGenModule::EmitCXXModuleInitFunc(Module *Primary) {<br>
> > >    }<br>
> > ><br>
> > >    // Now append the ones without specified priority.<br>
> > > -  for (auto F : CXXGlobalInits)<br>
> > > +  for (auto *F : CXXGlobalInits)<br>
> > >      ModuleInits.push_back(F);<br>
> > >    CXXGlobalInits.clear();<br>
> > ><br>
> > > @@ -844,7 +844,7 @@ CodeGenModule::EmitCXXGlobalInitFunc() {<br>
> > ><br>
> > >        // Prepend the module inits to the highest priority set.<br>
> > >        if (!ModuleInits.empty()) {<br>
> > > -        for (auto F : ModuleInits)<br>
> > > +        for (auto *F : ModuleInits)<br>
> > >            LocalCXXGlobalInits.push_back(F);<br>
> > >          ModuleInits.clear();<br>
> > >        }<br>
> > > @@ -862,7 +862,7 @@ CodeGenModule::EmitCXXGlobalInitFunc() {<br>
> > >        CXXGlobalInits.empty())<br>
> > >      return;<br>
> > ><br>
> > > -  for (auto F : CXXGlobalInits)<br>
> > > +  for (auto *F : CXXGlobalInits)<br>
> > >      ModuleInits.push_back(F);<br>
> > >    CXXGlobalInits.clear();<br>
> > ><br>
> > ><br>
> > > diff  --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp<br>
> > > index 324eb56167b56..6878255c48acb 100644<br>
> > > --- a/clang/lib/CodeGen/CGExpr.cpp<br>
> > > +++ b/clang/lib/CodeGen/CGExpr.cpp<br>
> > > @@ -3760,7 +3760,7 @@ static Address emitArraySubscriptGEP(CodeGenFunction &CGF, Address addr,<br>
> > >                                       const llvm::Twine &name = "arrayidx") {<br>
> > >    // All the indices except that last must be zero.<br>
> > >  #ifndef NDEBUG<br>
> > > -  for (auto idx : indices.drop_back())<br>
> > > +  for (auto *idx : indices.drop_back())<br>
> > >      assert(isa<llvm::ConstantInt>(idx) &&<br>
> > >             cast<llvm::ConstantInt>(idx)->isZero());<br>
> > >  #endif<br>
> > > @@ -4297,7 +4297,7 @@ unsigned CodeGenFunction::getDebugInfoFIndex(const RecordDecl *Rec,<br>
> > >                                               unsigned FieldIndex) {<br>
> > >    unsigned I = 0, Skipped = 0;<br>
> > ><br>
> > > -  for (auto F : Rec->getDefinition()->fields()) {<br>
> > > +  for (auto *F : Rec->getDefinition()->fields()) {<br>
> > >      if (I == FieldIndex)<br>
> > >        break;<br>
> > >      if (F->isUnnamedBitfield())<br>
> > ><br>
> > > diff  --git a/clang/lib/CodeGen/CGObjCGNU.cpp b/clang/lib/CodeGen/CGObjCGNU.cpp<br>
> > > index 7bbe9af7ed593..c734a539cbfbf 100644<br>
> > > --- a/clang/lib/CodeGen/CGObjCGNU.cpp<br>
> > > +++ b/clang/lib/CodeGen/CGObjCGNU.cpp<br>
> > > @@ -3316,7 +3316,7 @@ llvm::Constant *CGObjCGNU::MakeBitField(ArrayRef<bool> bits) {<br>
> > >    auto fields = builder.beginStruct();<br>
> > >    fields.addInt(Int32Ty, values.size());<br>
> > >    auto array = fields.beginArray();<br>
> > > -  for (auto v : values) array.add(v);<br>
> > > +  for (auto *v : values) array.add(v);<br>
> > >    array.finishAndAddTo(fields);<br>
> > ><br>
> > >    llvm::Constant *GS =<br>
> > ><br>
> > > diff  --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp<br>
> > > index 2d704cec05761..7a972152e1144 100644<br>
> > > --- a/clang/lib/CodeGen/CGObjCMac.cpp<br>
> > > +++ b/clang/lib/CodeGen/CGObjCMac.cpp<br>
> > > @@ -1171,7 +1171,7 @@ class ProtocolMethodLists {<br>
> > >    static ProtocolMethodLists get(const ObjCProtocolDecl *PD) {<br>
> > >      ProtocolMethodLists result;<br>
> > ><br>
> > > -    for (auto MD : PD->methods()) {<br>
> > > +    for (auto *MD : PD->methods()) {<br>
> > >        size_t index = (2 * size_t(MD->isOptional()))<br>
> > >                     + (size_t(MD->isClassMethod()));<br>
> > >        result.Methods[index].push_back(MD);<br>
> > > @@ -3454,7 +3454,7 @@ static bool hasWeakMember(QualType type) {<br>
> > >    }<br>
> > ><br>
> > >    if (auto recType = type->getAs<RecordType>()) {<br>
> > > -    for (auto field : recType->getDecl()->fields()) {<br>
> > > +    for (auto *field : recType->getDecl()->fields()) {<br>
> > >        if (hasWeakMember(field->getType()))<br>
> > >          return true;<br>
> > >      }<br>
> > ><br>
> > > diff  --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp<br>
> > > index 81c687e4530f4..caf14868078ec 100644<br>
> > > --- a/clang/lib/CodeGen/CodeGenFunction.cpp<br>
> > > +++ b/clang/lib/CodeGen/CodeGenFunction.cpp<br>
> > > @@ -725,7 +725,7 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy,<br>
> > >      const bool SanitizeBounds = SanOpts.hasOneOf(SanitizerKind::Bounds);<br>
> > >      bool NoSanitizeCoverage = false;<br>
> > ><br>
> > > -    for (auto Attr : D->specific_attrs<NoSanitizeAttr>()) {<br>
> > > +    for (auto *Attr : D->specific_attrs<NoSanitizeAttr>()) {<br>
> > >        // Apply the no_sanitize* attributes to SanOpts.<br>
> > >        SanitizerMask mask = Attr->getMask();<br>
> > >        SanOpts.Mask &= ~mask;<br>
> > ><br>
> > > diff  --git a/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp b/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp<br>
> > > index f6eaa35b48738..677b66d3e1dcb 100644<br>
> > > --- a/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp<br>
> > > +++ b/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp<br>
> > > @@ -107,7 +107,7 @@ class PCHContainerGenerator : public ASTConsumer {<br>
> > >          return true;<br>
> > ><br>
> > >        SmallVector<QualType, 16> ArgTypes;<br>
> > > -      for (auto i : D->parameters())<br>
> > > +      for (auto *i : D->parameters())<br>
> > >          ArgTypes.push_back(i->getType());<br>
> > >        QualType RetTy = D->getReturnType();<br>
> > >        QualType FnTy = Ctx.getFunctionType(RetTy, ArgTypes,<br>
> > > @@ -126,7 +126,7 @@ class PCHContainerGenerator : public ASTConsumer {<br>
> > >        ArgTypes.push_back(D->getSelfType(Ctx, D->getClassInterface(),<br>
> > >                                          selfIsPseudoStrong, selfIsConsumed));<br>
> > >        ArgTypes.push_back(Ctx.getObjCSelType());<br>
> > > -      for (auto i : D->parameters())<br>
> > > +      for (auto *i : D->parameters())<br>
> > >          ArgTypes.push_back(i->getType());<br>
> > >        QualType RetTy = D->getReturnType();<br>
> > >        QualType FnTy = Ctx.getFunctionType(RetTy, ArgTypes,<br>
> > ><br>
> > > diff  --git a/clang/lib/CodeGen/SwiftCallingConv.cpp b/clang/lib/CodeGen/SwiftCallingConv.cpp<br>
> > > index e42859af05a2b..a7d7c9357272d 100644<br>
> > > --- a/clang/lib/CodeGen/SwiftCallingConv.cpp<br>
> > > +++ b/clang/lib/CodeGen/SwiftCallingConv.cpp<br>
> > > @@ -124,7 +124,7 @@ void SwiftAggLowering::addTypedData(const RecordDecl *record, CharUnits begin,<br>
> > >                                      const ASTRecordLayout &layout) {<br>
> > >    // Unions are a special case.<br>
> > >    if (record->isUnion()) {<br>
> > > -    for (auto field : record->fields()) {<br>
> > > +    for (auto *field : record->fields()) {<br>
> > >        if (field->isBitField()) {<br>
> > >          addBitFieldData(field, begin, 0);<br>
> > >        } else {<br>
> > > @@ -161,7 +161,7 @@ void SwiftAggLowering::addTypedData(const RecordDecl *record, CharUnits begin,<br>
> > >    }<br>
> > ><br>
> > >    // Add fields.<br>
> > > -  for (auto field : record->fields()) {<br>
> > > +  for (auto *field : record->fields()) {<br>
> > >      auto fieldOffsetInBits = layout.getFieldOffset(field->getFieldIndex());<br>
> > >      if (field->isBitField()) {<br>
> > >        addBitFieldData(field, begin, fieldOffsetInBits);<br>
> > ><br>
> > > diff  --git a/clang/lib/Driver/Compilation.cpp b/clang/lib/Driver/Compilation.cpp<br>
> > > index ecf3da284b2a7..90d2e0659a39a 100644<br>
> > > --- a/clang/lib/Driver/Compilation.cpp<br>
> > > +++ b/clang/lib/Driver/Compilation.cpp<br>
> > > @@ -102,7 +102,7 @@ Compilation::getArgsForToolChain(const ToolChain *TC, StringRef BoundArch,<br>
> > >      }<br>
> > ><br>
> > >      // Add allocated arguments to the final DAL.<br>
> > > -    for (auto ArgPtr : AllocatedArgs)<br>
> > > +    for (auto *ArgPtr : AllocatedArgs)<br>
> > >        Entry->AddSynthesizedArg(ArgPtr);<br>
> > >    }<br>
> > ><br>
> > ><br>
> > > diff  --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp<br>
> > > index ba359a1d31a53..0a61b5e2d62d4 100644<br>
> > > --- a/clang/lib/Driver/Driver.cpp<br>
> > > +++ b/clang/lib/Driver/Driver.cpp<br>
> > > @@ -3715,7 +3715,7 @@ class OffloadingActionBuilder final {<br>
> > >                                       /*BoundArch=*/nullptr);<br>
> > >        // Propagate active offloading kinds for each input to the link action.<br>
> > >        // Each input may have<br>
> > > diff erent active offloading kind.<br>
> > > -      for (auto A : HostAction->inputs()) {<br>
> > > +      for (auto *A : HostAction->inputs()) {<br>
> > >          auto ArgLoc = HostActionToInputArgMap.find(A);<br>
> > >          if (ArgLoc == HostActionToInputArgMap.end())<br>
> > >            continue;<br>
> > ><br>
> > > diff  --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp<br>
> > > index 2dd9ac01b3ef9..99a8642cfd85b 100644<br>
> > > --- a/clang/lib/Driver/ToolChains/Clang.cpp<br>
> > > +++ b/clang/lib/Driver/ToolChains/Clang.cpp<br>
> > > @@ -4974,13 +4974,13 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,<br>
> > >    // Since we can't access frontend flags through hasArg, let's manually iterate<br>
> > >    // through them.<br>
> > >    bool FoundAnalyzerConfig = false;<br>
> > > -  for (auto Arg : Args.filtered(options::OPT_Xclang))<br>
> > > +  for (auto *Arg : Args.filtered(options::OPT_Xclang))<br>
> > >      if (StringRef(Arg->getValue()) == "-analyzer-config") {<br>
> > >        FoundAnalyzerConfig = true;<br>
> > >        break;<br>
> > >      }<br>
> > >    if (!FoundAnalyzerConfig)<br>
> > > -    for (auto Arg : Args.filtered(options::OPT_Xanalyzer))<br>
> > > +    for (auto *Arg : Args.filtered(options::OPT_Xanalyzer))<br>
> > >        if (StringRef(Arg->getValue()) == "-analyzer-config") {<br>
> > >          FoundAnalyzerConfig = true;<br>
> > >          break;<br>
> > > @@ -6924,7 +6924,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,<br>
> > >    // do not pass it to other cc1 commands when save-temps is enabled<br>
> > >    if (C.getDriver().isSaveTempsEnabled() &&<br>
> > >        !isa<PreprocessJobAction>(JA)) {<br>
> > > -    for (auto Arg : Args.filtered(options::OPT_Xclang)) {<br>
> > > +    for (auto *Arg : Args.filtered(options::OPT_Xclang)) {<br>
> > >        Arg->claim();<br>
> > >        if (StringRef(Arg->getValue()) != "-finclude-default-header")<br>
> > >          CmdArgs.push_back(Arg->getValue());<br>
> > ><br>
> > > diff  --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp<br>
> > > index 3b084dfdbfa2c..4760a6f528627 100644<br>
> > > --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp<br>
> > > +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp<br>
> > > @@ -2161,7 +2161,7 @@ void tools::addHIPRuntimeLibArgs(const ToolChain &TC,<br>
> > >      TC.AddHIPRuntimeLibArgs(Args, CmdArgs);<br>
> > >    } else {<br>
> > >      // Claim "no HIP libraries" arguments if any<br>
> > > -    for (auto Arg : Args.filtered(options::OPT_no_hip_rt)) {<br>
> > > +    for (auto *Arg : Args.filtered(options::OPT_no_hip_rt)) {<br>
> > >        Arg->claim();<br>
> > >      }<br>
> > >    }<br>
> > ><br>
> > > diff  --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp<br>
> > > index 9730109dd993f..047ec67f95e12 100644<br>
> > > --- a/clang/lib/Driver/ToolChains/Gnu.cpp<br>
> > > +++ b/clang/lib/Driver/ToolChains/Gnu.cpp<br>
> > > @@ -1369,7 +1369,7 @@ static bool findMipsMtiMultilibs(const Multilib::flags_list &Flags,<br>
> > >                    {"/../../../../mips-mti-linux-gnu/lib" + M.gccSuffix()});<br>
> > >              });<br>
> > >    }<br>
> > > -  for (auto Candidate : {&MtiMipsMultilibsV1, &MtiMipsMultilibsV2}) {<br>
> > > +  for (auto *Candidate : {&MtiMipsMultilibsV1, &MtiMipsMultilibsV2}) {<br>
> > >      if (Candidate->select(Flags, Result.SelectedMultilib)) {<br>
> > >        Result.Multilibs = *Candidate;<br>
> > >        return true;<br>
> > > @@ -1462,7 +1462,7 @@ static bool findMipsImgMultilibs(const Multilib::flags_list &Flags,<br>
> > >                    {"/../../../../mips-img-linux-gnu/lib" + M.gccSuffix()});<br>
> > >              });<br>
> > >    }<br>
> > > -  for (auto Candidate : {&ImgMultilibsV1, &ImgMultilibsV2}) {<br>
> > > +  for (auto *Candidate : {&ImgMultilibsV1, &ImgMultilibsV2}) {<br>
> > >      if (Candidate->select(Flags, Result.SelectedMultilib)) {<br>
> > >        Result.Multilibs = *Candidate;<br>
> > >        return true;<br>
> > ><br>
> > > diff  --git a/clang/lib/Driver/ToolChains/HIPAMD.cpp b/clang/lib/Driver/ToolChains/HIPAMD.cpp<br>
> > > index 35728ffb0b55a..7791074d7c92a 100644<br>
> > > --- a/clang/lib/Driver/ToolChains/HIPAMD.cpp<br>
> > > +++ b/clang/lib/Driver/ToolChains/HIPAMD.cpp<br>
> > > @@ -202,7 +202,7 @@ HIPAMDToolChain::HIPAMDToolChain(const Driver &D, const llvm::Triple &Triple,<br>
> > >    if (!Args.hasFlag(options::OPT_fgpu_sanitize, options::OPT_fno_gpu_sanitize,<br>
> > >                      true))<br>
> > >      return;<br>
> > > -  for (auto A : Args.filtered(options::OPT_fsanitize_EQ)) {<br>
> > > +  for (auto *A : Args.filtered(options::OPT_fsanitize_EQ)) {<br>
> > >      SanitizerMask K = parseSanitizerValue(A->getValue(), /*AllowGroups=*/false);<br>
> > >      if (K != SanitizerKind::Address)<br>
> > >        D.getDiags().Report(clang::diag::warn_drv_unsupported_option_for_target)<br>
> > ><br>
> > > diff  --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp<br>
> > > index 1108a02407e4f..8197fccd2f3e3 100644<br>
> > > --- a/clang/lib/Format/Format.cpp<br>
> > > +++ b/clang/lib/Format/Format.cpp<br>
> > > @@ -2539,7 +2539,7 @@ class ObjCHeaderStyleGuesser : public TokenAnalyzer {<br>
> > >          "UIView",<br>
> > >      };<br>
> > ><br>
> > > -    for (auto Line : AnnotatedLines) {<br>
> > > +    for (auto *Line : AnnotatedLines) {<br>
> > >        if (Line->First && (Line->First->TokenText.startswith("#") ||<br>
> > >                            Line->First->TokenText == "__pragma" ||<br>
> > >                            Line->First->TokenText == "_Pragma")) {<br>
> > ><br>
> > > diff  --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp<br>
> > > index f833541caa25c..cff61d7929a1b 100644<br>
> > > --- a/clang/lib/Frontend/FrontendActions.cpp<br>
> > > +++ b/clang/lib/Frontend/FrontendActions.cpp<br>
> > > @@ -920,12 +920,12 @@ void DumpModuleInfoAction::ExecuteAction() {<br>
> > >      if (Primary) {<br>
> > >        if (!Primary->submodules().empty())<br>
> > >          Out << "   Sub Modules:\n";<br>
> > > -      for (auto MI : Primary->submodules()) {<br>
> > > +      for (auto *MI : Primary->submodules()) {<br>
> > >          PrintSubMapEntry(MI->Name, MI->Kind);<br>
> > >        }<br>
> > >        if (!Primary->Imports.empty())<br>
> > >          Out << "   Imports:\n";<br>
> > > -      for (auto IMP : Primary->Imports) {<br>
> > > +      for (auto *IMP : Primary->Imports) {<br>
> > >          PrintSubMapEntry(IMP->Name, IMP->Kind);<br>
> > >        }<br>
> > >        if (!Primary->Exports.empty())<br>
> > ><br>
> > > diff  --git a/clang/lib/Index/USRGeneration.cpp b/clang/lib/Index/USRGeneration.cpp<br>
> > > index a206642e4b587..c1120058235c6 100644<br>
> > > --- a/clang/lib/Index/USRGeneration.cpp<br>
> > > +++ b/clang/lib/Index/USRGeneration.cpp<br>
> > > @@ -258,7 +258,7 @@ void USRGenerator::VisitFunctionDecl(const FunctionDecl *D) {<br>
> > >    }<br>
> > ><br>
> > >    // Mangle in type information for the arguments.<br>
> > > -  for (auto PD : D->parameters()) {<br>
> > > +  for (auto *PD : D->parameters()) {<br>
> > >      Out << '#';<br>
> > >      VisitType(PD->getType());<br>
> > >    }<br>
> > ><br>
> > > diff  --git a/clang/lib/Sema/IdentifierResolver.cpp b/clang/lib/Sema/IdentifierResolver.cpp<br>
> > > index 9081714c893f5..4ee10f9fddfbe 100644<br>
> > > --- a/clang/lib/Sema/IdentifierResolver.cpp<br>
> > > +++ b/clang/lib/Sema/IdentifierResolver.cpp<br>
> > > @@ -287,7 +287,7 @@ static DeclMatchKind compareDeclarations(NamedDecl *Existing, NamedDecl *New) {<br>
> > ><br>
> > >      // If the existing declaration is somewhere in the previous declaration<br>
> > >      // chain of the new declaration, then prefer the new declaration.<br>
> > > -    for (auto RD : New->redecls()) {<br>
> > > +    for (auto *RD : New->redecls()) {<br>
> > >        if (RD == Existing)<br>
> > >          return DMK_Replace;<br>
> > ><br>
> > ><br>
> > > diff  --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp<br>
> > > index 1158685681af1..5215b60defe8a 100644<br>
> > > --- a/clang/lib/Sema/Sema.cpp<br>
> > > +++ b/clang/lib/Sema/Sema.cpp<br>
> > > @@ -1315,7 +1315,7 @@ void Sema::ActOnEndOfTranslationUnit() {<br>
> > >        Consumer.CompleteTentativeDefinition(VD);<br>
> > >    }<br>
> > ><br>
> > > -  for (auto D : ExternalDeclarations) {<br>
> > > +  for (auto *D : ExternalDeclarations) {<br>
> > >      if (!D || D->isInvalidDecl() || D->getPreviousDecl() || !D->isUsed())<br>
> > >        continue;<br>
> > ><br>
> > > @@ -1784,7 +1784,7 @@ void Sema::emitDeferredDiags() {<br>
> > >      return;<br>
> > ><br>
> > >    DeferredDiagnosticsEmitter DDE(*this);<br>
> > > -  for (auto D : DeclsToCheckForDeferredDiags)<br>
> > > +  for (auto *D : DeclsToCheckForDeferredDiags)<br>
> > >      DDE.checkRecordedDecl(D);<br>
> > >  }<br>
> > ><br>
> > ><br>
> > > diff  --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp<br>
> > > index 6d5769a396277..c80605ba7f5a7 100644<br>
> > > --- a/clang/lib/Sema/SemaCodeComplete.cpp<br>
> > > +++ b/clang/lib/Sema/SemaCodeComplete.cpp<br>
> > > @@ -4201,7 +4201,7 @@ static void MaybeAddOverrideCalls(Sema &S, DeclContext *InContext,<br>
> > ><br>
> > >    // We need to have names for all of the parameters, if we're going to<br>
> > >    // generate a forwarding call.<br>
> > > -  for (auto P : Method->parameters())<br>
> > > +  for (auto *P : Method->parameters())<br>
> > >      if (!P->getDeclName())<br>
> > >        return;<br>
> > ><br>
> > > @@ -4229,7 +4229,7 @@ static void MaybeAddOverrideCalls(Sema &S, DeclContext *InContext,<br>
> > >          Results.getAllocator().CopyString(Overridden->getNameAsString()));<br>
> > >      Builder.AddChunk(CodeCompletionString::CK_LeftParen);<br>
> > >      bool FirstParam = true;<br>
> > > -    for (auto P : Method->parameters()) {<br>
> > > +    for (auto *P : Method->parameters()) {<br>
> > >        if (FirstParam)<br>
> > >          FirstParam = false;<br>
> > >        else<br>
> > ><br>
> > > diff  --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp<br>
> > > index 1a29e6bb86f39..3a84761616163 100644<br>
> > > --- a/clang/lib/Sema/SemaDecl.cpp<br>
> > > +++ b/clang/lib/Sema/SemaDecl.cpp<br>
> > > @@ -8088,7 +8088,7 @@ void Sema::CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl,<br>
> > >      if (shadowedVar->isExternC()) {<br>
> > >        // For shadowing external vars, make sure that we point to the global<br>
> > >        // declaration, not a locally scoped extern declaration.<br>
> > > -      for (auto I : shadowedVar->redecls())<br>
> > > +      for (auto *I : shadowedVar->redecls())<br>
> > >          if (I->isFileVarDecl()) {<br>
> > >            ShadowedDecl = I;<br>
> > >            break;<br>
> > > @@ -10463,7 +10463,7 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC,<br>
> > >      }<br>
> > ><br>
> > >      llvm::SmallPtrSet<const Type *, 16> ValidTypes;<br>
> > > -    for (auto Param : NewFD->parameters())<br>
> > > +    for (auto *Param : NewFD->parameters())<br>
> > >        checkIsValidOpenCLKernelParameter(*this, D, Param, ValidTypes);<br>
> > ><br>
> > >      if (getLangOpts().OpenCLCPlusPlus) {<br>
> > > @@ -11972,7 +11972,7 @@ namespace {<br>
> > >        // Track and increment the index here.<br>
> > >        isInitList = true;<br>
> > >        InitFieldIndex.push_back(0);<br>
> > > -      for (auto Child : InitList->children()) {<br>
> > > +      for (auto *Child : InitList->children()) {<br>
> > >          CheckExpr(cast<Expr>(Child));<br>
> > >          ++InitFieldIndex.back();<br>
> > >        }<br>
> > > @@ -12453,7 +12453,7 @@ void Sema::checkNonTrivialCUnionInInitializer(const Expr *Init,<br>
> > >            InitType.hasNonTrivialToPrimitiveCopyCUnion()) &&<br>
> > >           "shouldn't be called if type doesn't have a non-trivial C struct");<br>
> > >    if (auto *ILE = dyn_cast<InitListExpr>(Init)) {<br>
> > > -    for (auto I : ILE->inits()) {<br>
> > > +    for (auto *I : ILE->inits()) {<br>
> > >        if (!I->getType().hasNonTrivialToPrimitiveDefaultInitializeCUnion() &&<br>
> > >            !I->getType().hasNonTrivialToPrimitiveCopyCUnion())<br>
> > >          continue;<br>
> > > @@ -14915,7 +14915,7 @@ Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Decl *D,<br>
> > >    }<br>
> > ><br>
> > >    // Introduce our parameters into the function scope<br>
> > > -  for (auto Param : FD->parameters()) {<br>
> > > +  for (auto *Param : FD->parameters()) {<br>
> > >      Param->setOwningFunction(FD);<br>
> > ><br>
> > >      // If this has an identifier, add it to the scope stack.<br>
> > ><br>
> > > diff  --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp<br>
> > > index 0e9b27fff180a..580ecf8995db1 100644<br>
> > > --- a/clang/lib/Sema/SemaDeclAttr.cpp<br>
> > > +++ b/clang/lib/Sema/SemaDeclAttr.cpp<br>
> > > @@ -7256,7 +7256,7 @@ static void handleAVRSignalAttr(Sema &S, Decl *D, const ParsedAttr &AL) {<br>
> > ><br>
> > >  static void handleBPFPreserveAIRecord(Sema &S, RecordDecl *RD) {<br>
> > >    // Add preserve_access_index attribute to all fields and inner records.<br>
> > > -  for (auto D : RD->decls()) {<br>
> > > +  for (auto *D : RD->decls()) {<br>
> > >      if (D->hasAttr<BPFPreserveAccessIndexAttr>())<br>
> > >        continue;<br>
> > ><br>
> > ><br>
> > > diff  --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp<br>
> > > index 7c70255fd3e5d..f7e20759e3d6e 100644<br>
> > > --- a/clang/lib/Sema/SemaDeclCXX.cpp<br>
> > > +++ b/clang/lib/Sema/SemaDeclCXX.cpp<br>
> > > @@ -3777,7 +3777,7 @@ namespace {<br>
> > ><br>
> > >      void CheckInitListExpr(InitListExpr *ILE) {<br>
> > >        InitFieldIndex.push_back(0);<br>
> > > -      for (auto Child : ILE->children()) {<br>
> > > +      for (auto *Child : ILE->children()) {<br>
> > >          if (InitListExpr *SubList = dyn_cast<InitListExpr>(Child)) {<br>
> > >            CheckInitListExpr(SubList);<br>
> > >          } else {<br>
> > > @@ -3848,7 +3848,7 @@ namespace {<br>
> > >        Expr *Callee = E->getCallee();<br>
> > >        if (isa<MemberExpr>(Callee)) {<br>
> > >          HandleValue(Callee, false /*AddressOf*/);<br>
> > > -        for (auto Arg : E->arguments())<br>
> > > +        for (auto *Arg : E->arguments())<br>
> > >            Visit(Arg);<br>
> > >          return;<br>
> > >        }<br>
> > > @@ -3873,7 +3873,7 @@ namespace {<br>
> > >          return Inherited::VisitCXXOperatorCallExpr(E);<br>
> > ><br>
> > >        Visit(Callee);<br>
> > > -      for (auto Arg : E->arguments())<br>
> > > +      for (auto *Arg : E->arguments())<br>
> > >          HandleValue(Arg->IgnoreParenImpCasts(), false /*AddressOf*/);<br>
> > >      }<br>
> > ><br>
> > > @@ -15582,7 +15582,7 @@ ExprResult Sema::BuildCXXDefaultInitExpr(SourceLocation Loc, FieldDecl *Field) {<br>
> > >          ClassPattern->lookup(Field->getDeclName());<br>
> > ><br>
> > >      FieldDecl *Pattern = nullptr;<br>
> > > -    for (auto L : Lookup) {<br>
> > > +    for (auto *L : Lookup) {<br>
> > >        if (isa<FieldDecl>(L)) {<br>
> > >          Pattern = cast<FieldDecl>(L);<br>
> > >          break;<br>
> > > @@ -15931,7 +15931,7 @@ bool Sema::CheckOverloadedOperatorDeclaration(FunctionDecl *FnDecl) {<br>
> > >                    diag::err_operator_overload_static) << FnDecl->getDeclName();<br>
> > >    } else {<br>
> > >      bool ClassOrEnumParam = false;<br>
> > > -    for (auto Param : FnDecl->parameters()) {<br>
> > > +    for (auto *Param : FnDecl->parameters()) {<br>
> > >        QualType ParamType = Param->getType().getNonReferenceType();<br>
> > >        if (ParamType->isDependentType() || ParamType->isRecordType() ||<br>
> > >            ParamType->isEnumeralType()) {<br>
> > > @@ -15954,7 +15954,7 @@ bool Sema::CheckOverloadedOperatorDeclaration(FunctionDecl *FnDecl) {<br>
> > >    // operator (CWG2507) allow default arguments.<br>
> > >    if (Op != OO_Call) {<br>
> > >      ParmVarDecl *FirstDefaultedParam = nullptr;<br>
> > > -    for (auto Param : FnDecl->parameters()) {<br>
> > > +    for (auto *Param : FnDecl->parameters()) {<br>
> > >        if (Param->hasDefaultArg()) {<br>
> > >          FirstDefaultedParam = Param;<br>
> > >          break;<br>
> > > @@ -16260,7 +16260,7 @@ bool Sema::CheckLiteralOperatorDeclaration(FunctionDecl *FnDecl) {<br>
> > ><br>
> > >    // A parameter-declaration-clause containing a default argument is not<br>
> > >    // equivalent to any of the permitted forms.<br>
> > > -  for (auto Param : FnDecl->parameters()) {<br>
> > > +  for (auto *Param : FnDecl->parameters()) {<br>
> > >      if (Param->hasDefaultArg()) {<br>
> > >        Diag(Param->getDefaultArgRange().getBegin(),<br>
> > >             diag::err_literal_operator_default_argument)<br>
> > > @@ -17968,7 +17968,7 @@ bool Sema::DefineUsedVTables() {<br>
> > >        // definition.<br>
> > >        bool IsExplicitInstantiationDeclaration =<br>
> > >            ClassTSK == TSK_ExplicitInstantiationDeclaration;<br>
> > > -      for (auto R : Class->redecls()) {<br>
> > > +      for (auto *R : Class->redecls()) {<br>
> > >          TemplateSpecializationKind TSK<br>
> > >            = cast<CXXRecordDecl>(R)->getTemplateSpecializationKind();<br>
> > >          if (TSK == TSK_ExplicitInstantiationDeclaration)<br>
> > ><br>
> > > diff  --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp<br>
> > > index ed33d9ffe8312..c55cb7842072b 100644<br>
> > > --- a/clang/lib/Sema/SemaDeclObjC.cpp<br>
> > > +++ b/clang/lib/Sema/SemaDeclObjC.cpp<br>
> > > @@ -782,7 +782,7 @@ ObjCTypeParamList *Sema::actOnObjCTypeParamList(Scope *S,<br>
> > >    // scope until later (after the instance variable block), but we want the<br>
> > >    // diagnostics to occur right after we parse the type parameter list.<br>
> > >    llvm::SmallDenseMap<IdentifierInfo *, ObjCTypeParamDecl *> knownParams;<br>
> > > -  for (auto typeParam : typeParams) {<br>
> > > +  for (auto *typeParam : typeParams) {<br>
> > >      auto known = knownParams.find(typeParam->getIdentifier());<br>
> > >      if (known != knownParams.end()) {<br>
> > >        Diag(typeParam->getLocation(), diag::err_objc_type_param_redecl)<br>
> > > @@ -803,7 +803,7 @@ ObjCTypeParamList *Sema::actOnObjCTypeParamList(Scope *S,<br>
> > >  }<br>
> > ><br>
> > >  void Sema::popObjCTypeParamList(Scope *S, ObjCTypeParamList *typeParamList) {<br>
> > > -  for (auto typeParam : *typeParamList) {<br>
> > > +  for (auto *typeParam : *typeParamList) {<br>
> > >      if (!typeParam->isInvalidDecl()) {<br>
> > >        S->RemoveDecl(typeParam);<br>
> > >        IdResolver.RemoveDecl(typeParam);<br>
> > > @@ -1029,7 +1029,7 @@ ObjCInterfaceDecl *Sema::ActOnStartClassInterface(<br>
> > ><br>
> > >          // Clone the type parameter list.<br>
> > >          SmallVector<ObjCTypeParamDecl *, 4> clonedTypeParams;<br>
> > > -        for (auto typeParam : *prevTypeParamList) {<br>
> > > +        for (auto *typeParam : *prevTypeParamList) {<br>
> > >            clonedTypeParams.push_back(<br>
> > >              ObjCTypeParamDecl::Create(<br>
> > >                Context,<br>
> > > @@ -1502,7 +1502,7 @@ void Sema::actOnObjCTypeArgsOrProtocolQualifiers(<br>
> > >        llvm::SmallPtrSet<ObjCProtocolDecl*, 8> knownProtocols;<br>
> > >        Context.CollectInheritedProtocols(baseClass, knownProtocols);<br>
> > >        bool allProtocolsDeclared = true;<br>
> > > -      for (auto proto : protocols) {<br>
> > > +      for (auto *proto : protocols) {<br>
> > >          if (knownProtocols.count(static_cast<ObjCProtocolDecl *>(proto)) == 0) {<br>
> > >            allProtocolsDeclared = false;<br>
> > >            break;<br>
> > > @@ -3855,7 +3855,7 @@ static void DiagnoseVariableSizedIvars(Sema &S, ObjCContainerDecl *OCD) {<br>
> > ><br>
> > >    // Check if variable sized ivar is in interface and visible to subclasses.<br>
> > >    if (!isa<ObjCInterfaceDecl>(OCD)) {<br>
> > > -    for (auto ivar : Ivars) {<br>
> > > +    for (auto *ivar : Ivars) {<br>
> > >        if (!ivar->isInvalidDecl() && IsVariableSizedType(ivar->getType())) {<br>
> > >          S.Diag(ivar->getLocation(), diag::warn_variable_sized_ivar_visibility)<br>
> > >              << ivar->getDeclName() << ivar->getType();<br>
> > > @@ -3990,7 +3990,7 @@ Decl *Sema::ActOnAtEnd(Scope *S, SourceRange AtEnd, ArrayRef<Decl *> allMethods,<br>
> > >    // they are overridden by an explicit method that is encountered<br>
> > >    // later.<br>
> > >    if (auto *OID = dyn_cast<ObjCImplementationDecl>(CurContext)) {<br>
> > > -    for (auto PropImpl : OID->property_impls()) {<br>
> > > +    for (auto *PropImpl : OID->property_impls()) {<br>
> > >        if (auto *Getter = PropImpl->getGetterMethodDecl())<br>
> > >          if (Getter->isSynthesizedAccessorStub())<br>
> > >            OID->addDecl(Getter);<br>
> > ><br>
> > > diff  --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp<br>
> > > index f124ad3bc08d0..43c27c0ddd5e9 100644<br>
> > > --- a/clang/lib/Sema/SemaExpr.cpp<br>
> > > +++ b/clang/lib/Sema/SemaExpr.cpp<br>
> > > @@ -136,7 +136,7 @@ void Sema::NoteDeletedFunction(FunctionDecl *Decl) {<br>
> > >  /// Determine whether a FunctionDecl was ever declared with an<br>
> > >  /// explicit storage class.<br>
> > >  static bool hasAnyExplicitStorageClass(const FunctionDecl *D) {<br>
> > > -  for (auto I : D->redecls()) {<br>
> > > +  for (auto *I : D->redecls()) {<br>
> > >      if (I->getStorageClass() != SC_None)<br>
> > >        return true;<br>
> > >    }<br>
> > > @@ -16289,7 +16289,7 @@ void Sema::ActOnBlockArguments(SourceLocation CaretLoc, Declarator &ParamInfo,<br>
> > >    ProcessDeclAttributes(CurScope, CurBlock->TheDecl, ParamInfo);<br>
> > ><br>
> > >    // Put the parameter variables in scope.<br>
> > > -  for (auto AI : CurBlock->TheDecl->parameters()) {<br>
> > > +  for (auto *AI : CurBlock->TheDecl->parameters()) {<br>
> > >      AI->setOwningFunction(CurBlock->TheDecl);<br>
> > ><br>
> > >      // If this has an identifier, add it to the scope stack.<br>
> > > @@ -17670,7 +17670,7 @@ HandleImmediateInvocations(Sema &SemaRef,<br>
> > >    for (auto CE : Rec.ImmediateInvocationCandidates)<br>
> > >      if (!CE.getInt())<br>
> > >        EvaluateAndDiagnoseImmediateInvocation(SemaRef, CE);<br>
> > > -  for (auto DR : Rec.ReferenceToConsteval) {<br>
> > > +  for (auto *DR : Rec.ReferenceToConsteval) {<br>
> > >      auto *FD = cast<FunctionDecl>(DR->getDecl());<br>
> > >      SemaRef.Diag(DR->getBeginLoc(), diag::err_invalid_consteval_take_address)<br>
> > >          << FD;<br>
> > > @@ -18111,7 +18111,7 @@ void Sema::MarkFunctionReferenced(SourceLocation Loc, FunctionDecl *Func,<br>
> > >          }<br>
> > >        } else {<br>
> > >          // Walk redefinitions, as some of them may be instantiable.<br>
> > > -        for (auto i : Func->redecls()) {<br>
> > > +        for (auto *i : Func->redecls()) {<br>
> > >            if (!i->isUsed(false) && i->isImplicitlyInstantiable())<br>
> > >              MarkFunctionReferenced(Loc, i, MightBeOdrUse);<br>
> > >          }<br>
> > ><br>
> > > diff  --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp<br>
> > > index c43c9dc21bd5e..bc950ab7c4a7a 100644<br>
> > > --- a/clang/lib/Sema/SemaExprCXX.cpp<br>
> > > +++ b/clang/lib/Sema/SemaExprCXX.cpp<br>
> > > @@ -8467,7 +8467,7 @@ class TransformTypos : public TreeTransform<TransformTypos> {<br>
> > >    ///<br>
> > >    /// Returns true if there are any untried correction combinations.<br>
> > >    bool CheckAndAdvanceTypoExprCorrectionStreams() {<br>
> > > -    for (auto TE : TypoExprs) {<br>
> > > +    for (auto *TE : TypoExprs) {<br>
> > >        auto &State = SemaRef.getTypoExprState(TE);<br>
> > >        TransformCache.erase(TE);<br>
> > >        if (!State.Consumer->hasMadeAnyCorrectionProgress())<br>
> > > @@ -8534,7 +8534,7 @@ class TransformTypos : public TreeTransform<TransformTypos> {<br>
> > >          // TypoExprs were created recursively and thus won't be in our<br>
> > >          // Sema's TypoExprs - they were created in our `RecursiveTransformLoop`.<br>
> > >          auto &SemaTypoExprs = SemaRef.TypoExprs;<br>
> > > -        for (auto TE : TypoExprs) {<br>
> > > +        for (auto *TE : TypoExprs) {<br>
> > >            TransformCache.erase(TE);<br>
> > >            SemaRef.clearDelayedTypo(TE);<br>
> > ><br>
> > ><br>
> > > diff  --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp<br>
> > > index b5cf96af07afa..8f21cf5cc7d7a 100644<br>
> > > --- a/clang/lib/Sema/SemaInit.cpp<br>
> > > +++ b/clang/lib/Sema/SemaInit.cpp<br>
> > > @@ -5977,7 +5977,7 @@ void InitializationSequence::InitializeFrom(Sema &S,<br>
> > >         !Context.hasSameUnqualifiedType(SourceType, DestType))) {<br>
> > ><br>
> > >      llvm::SmallVector<Expr *> InitArgs;<br>
> > > -    for (auto Arg : Args) {<br>
> > > +    for (auto *Arg : Args) {<br>
> > >        if (Arg->getType()->isExtVectorType()) {<br>
> > >          const auto *VTy = Arg->getType()->castAs<ExtVectorType>();<br>
> > >          unsigned Elm = VTy->getNumElements();<br>
> > ><br>
> > > diff  --git a/clang/lib/Sema/SemaLambda.cpp b/clang/lib/Sema/SemaLambda.cpp<br>
> > > index aca0b7a147730..1cf44bd694c54 100644<br>
> > > --- a/clang/lib/Sema/SemaLambda.cpp<br>
> > > +++ b/clang/lib/Sema/SemaLambda.cpp<br>
> > > @@ -418,7 +418,7 @@ CXXMethodDecl *Sema::startLambdaDefinition(CXXRecordDecl *Class,<br>
> > >      CheckParmsForFunctionDef(Params,<br>
> > >                               /*CheckParameterNames=*/false);<br>
> > ><br>
> > > -    for (auto P : Method->parameters())<br>
> > > +    for (auto *P : Method->parameters())<br>
> > >        P->setOwningFunction(Method);<br>
> > >    }<br>
> > ><br>
> > ><br>
> > > diff  --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp<br>
> > > index 22d72c3251a0c..70a32bd737160 100644<br>
> > > --- a/clang/lib/Sema/SemaLookup.cpp<br>
> > > +++ b/clang/lib/Sema/SemaLookup.cpp<br>
> > > @@ -156,7 +156,7 @@ namespace {<br>
> > >      void addUsingDirectives(DeclContext *DC, DeclContext *EffectiveDC) {<br>
> > >        SmallVector<DeclContext*, 4> queue;<br>
> > >        while (true) {<br>
> > > -        for (auto UD : DC->using_directives()) {<br>
> > > +        for (auto *UD : DC->using_directives()) {<br>
> > >            DeclContext *NS = UD->getNominatedNamespace();<br>
> > >            if (SemaRef.isVisible(UD) && visited.insert(NS).second) {<br>
> > >              addUsingDirective(UD, EffectiveDC);<br>
> > > @@ -2018,7 +2018,7 @@ static NamedDecl *findAcceptableDecl(Sema &SemaRef, NamedDecl *D,<br>
> > >                                       unsigned IDNS) {<br>
> > >    assert(!LookupResult::isAvailableForLookup(SemaRef, D) && "not in slow case");<br>
> > ><br>
> > > -  for (auto RD : D->redecls()) {<br>
> > > +  for (auto *RD : D->redecls()) {<br>
> > >      // Don't bother with extra checks if we already know this one isn't visible.<br>
> > >      if (RD == D)<br>
> > >        continue;<br>
> > > @@ -2362,7 +2362,7 @@ static bool LookupQualifiedNameInUsingDirectives(Sema &S, LookupResult &R,<br>
> > >        continue;<br>
> > >      }<br>
> > ><br>
> > > -    for (auto I : ND->using_directives()) {<br>
> > > +    for (auto *I : ND->using_directives()) {<br>
> > >        NamespaceDecl *Nom = I->getNominatedNamespace();<br>
> > >        if (S.isVisible(I) && Visited.insert(Nom).second)<br>
> > >          Queue.push_back(Nom);<br>
> > > @@ -4161,7 +4161,7 @@ class LookupVisibleHelper {<br>
> > >      // Traverse using directives for qualified name lookup.<br>
> > >      if (QualifiedNameLookup) {<br>
> > >        ShadowContextRAII Shadow(Visited);<br>
> > > -      for (auto I : Ctx->using_directives()) {<br>
> > > +      for (auto *I : Ctx->using_directives()) {<br>
> > >          if (!Result.getSema().isVisible(I))<br>
> > >            continue;<br>
> > >          lookupInDeclContext(I->getNominatedNamespace(), Result,<br>
> > ><br>
> > > diff  --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp<br>
> > > index 118afb81dd722..e915c7ed88a84 100644<br>
> > > --- a/clang/lib/Sema/SemaObjCProperty.cpp<br>
> > > +++ b/clang/lib/Sema/SemaObjCProperty.cpp<br>
> > > @@ -1028,7 +1028,7 @@ static bool hasWrittenStorageAttribute(ObjCPropertyDecl *Prop,<br>
> > ><br>
> > >    // Find the corresponding property in the primary class definition.<br>
> > >    auto OrigClass = Category->getClassInterface();<br>
> > > -  for (auto Found : OrigClass->lookup(Prop->getDeclName())) {<br>
> > > +  for (auto *Found : OrigClass->lookup(Prop->getDeclName())) {<br>
> > >      if (ObjCPropertyDecl *OrigProp = dyn_cast<ObjCPropertyDecl>(Found))<br>
> > >        return OrigProp->getPropertyAttributesAsWritten() & OwnershipMask;<br>
> > >    }<br>
> > ><br>
> > > diff  --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp<br>
> > > index a8de8c2f2c829..d05380b30e47f 100644<br>
> > > --- a/clang/lib/Sema/SemaOpenMP.cpp<br>
> > > +++ b/clang/lib/Sema/SemaOpenMP.cpp<br>
> > > @@ -18422,7 +18422,7 @@ static T filterLookupForUDReductionAndMapper(<br>
> > >  static NamedDecl *findAcceptableDecl(Sema &SemaRef, NamedDecl *D) {<br>
> > >    assert(!LookupResult::isVisible(SemaRef, D) && "not in slow case");<br>
> > ><br>
> > > -  for (auto RD : D->redecls()) {<br>
> > > +  for (auto *RD : D->redecls()) {<br>
> > >      // Don't bother with extra checks if we already know this one isn't visible.<br>
> > >      if (RD == D)<br>
> > >        continue;<br>
> > ><br>
> > > diff  --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp<br>
> > > index 91e308d0d0fee..352738c850f23 100644<br>
> > > --- a/clang/lib/Sema/SemaOverload.cpp<br>
> > > +++ b/clang/lib/Sema/SemaOverload.cpp<br>
> > > @@ -14204,7 +14204,7 @@ ExprResult Sema::CreateOverloadedArraySubscriptExpr(SourceLocation LLoc,<br>
> > >                                                      MultiExprArg ArgExpr) {<br>
> > >    SmallVector<Expr *, 2> Args;<br>
> > >    Args.push_back(Base);<br>
> > > -  for (auto e : ArgExpr) {<br>
> > > +  for (auto *e : ArgExpr) {<br>
> > >      Args.push_back(e);<br>
> > >    }<br>
> > >    DeclarationName OpName =<br>
> > ><br>
> > > diff  --git a/clang/lib/Sema/SemaTemplateDeduction.cpp b/clang/lib/Sema/SemaTemplateDeduction.cpp<br>
> > > index e8837d88f97dd..3419eb1eec6b4 100644<br>
> > > --- a/clang/lib/Sema/SemaTemplateDeduction.cpp<br>
> > > +++ b/clang/lib/Sema/SemaTemplateDeduction.cpp<br>
> > > @@ -3147,7 +3147,7 @@ Sema::SubstituteExplicitTemplateArguments(<br>
> > >    if (ExplicitTemplateArgs.size() == 0) {<br>
> > >      // No arguments to substitute; just copy over the parameter types and<br>
> > >      // fill in the function type.<br>
> > > -    for (auto P : Function->parameters())<br>
> > > +    for (auto *P : Function->parameters())<br>
> > >        ParamTypes.push_back(P->getType());<br>
> > ><br>
> > >      if (FunctionType)<br>
> > ><br>
> > > diff  --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp<br>
> > > index 24ea3254cb272..b0256a16babe7 100644<br>
> > > --- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp<br>
> > > +++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp<br>
> > > @@ -6398,7 +6398,7 @@ void Sema::PerformPendingInstantiations(bool LocalOnly) {<br>
> > ><br>
> > >  void Sema::PerformDependentDiagnostics(const DeclContext *Pattern,<br>
> > >                         const MultiLevelTemplateArgumentList &TemplateArgs) {<br>
> > > -  for (auto DD : Pattern->ddiags()) {<br>
> > > +  for (auto *DD : Pattern->ddiags()) {<br>
> > >      switch (DD->getKind()) {<br>
> > >      case DependentDiagnostic::Access:<br>
> > >        HandleDependentAccessCheck(*DD, TemplateArgs);<br>
> > ><br>
> > > diff  --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp<br>
> > > index eef8f9fdb07f1..5d1ee45c10de5 100644<br>
> > > --- a/clang/lib/Serialization/ASTReader.cpp<br>
> > > +++ b/clang/lib/Serialization/ASTReader.cpp<br>
> > > @@ -8032,7 +8032,7 @@ IdentifierInfo *ASTReader::get(StringRef Name) {<br>
> > >    // lookups). Perform the lookup in PCH files, though, since we don't build<br>
> > >    // a complete initial identifier table if we're carrying on from a PCH.<br>
> > >    if (PP.getLangOpts().CPlusPlus) {<br>
> > > -    for (auto F : ModuleMgr.pch_modules())<br>
> > > +    for (auto *F : ModuleMgr.pch_modules())<br>
> > >        if (Visitor(*F))<br>
> > >          break;<br>
> > >    } else {<br>
> > > @@ -9645,7 +9645,7 @@ void ASTReader::diagnoseOdrViolations() {<br>
> > >      bool Found = false;<br>
> > >      const Decl *DCanon = D->getCanonicalDecl();<br>
> > ><br>
> > > -    for (auto RI : D->redecls()) {<br>
> > > +    for (auto *RI : D->redecls()) {<br>
> > >        if (RI->getLexicalDeclContext() == CanonDef) {<br>
> > >          Found = true;<br>
> > >          break;<br>
> > ><br>
> > > diff  --git a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp<br>
> > > index 35b8db27bd0eb..14985cc32d0e4 100644<br>
> > > --- a/clang/lib/Serialization/ASTWriterDecl.cpp<br>
> > > +++ b/clang/lib/Serialization/ASTWriterDecl.cpp<br>
> > > @@ -167,7 +167,7 @@ namespace clang {<br>
> > >        }<br>
> > ><br>
> > >        Record.push_back(typeParams->size());<br>
> > > -      for (auto typeParam : *typeParams) {<br>
> > > +      for (auto *typeParam : *typeParams) {<br>
> > >          Record.AddDeclRef(typeParam);<br>
> > >        }<br>
> > >        Record.AddSourceLocation(typeParams->getLAngleLoc());<br>
> > > @@ -661,7 +661,7 @@ void ASTDeclWriter::VisitFunctionDecl(FunctionDecl *D) {<br>
> > >    }<br>
> > ><br>
> > >    Record.push_back(D->param_size());<br>
> > > -  for (auto P : D->parameters())<br>
> > > +  for (auto *P : D->parameters())<br>
> > >      Record.AddDeclRef(P);<br>
> > >    Code = serialization::DECL_FUNCTION;<br>
> > >  }<br>
> > ><br>
> > > diff  --git a/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp<br>
> > > index fea35d03cb813..c9b17a56b224d 100644<br>
> > > --- a/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp<br>
> > > +++ b/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp<br>
> > > @@ -118,7 +118,7 @@ void CFErrorFunctionChecker::checkASTDecl(const FunctionDecl *D,<br>
> > >      II = &D->getASTContext().Idents.get("CFErrorRef");<br>
> > ><br>
> > >    bool hasCFError = false;<br>
> > > -  for (auto I : D->parameters())  {<br>
> > > +  for (auto *I : D->parameters())  {<br>
> > >      if (IsCFError(I->getType(), II)) {<br>
> > >        hasCFError = true;<br>
> > >        break;<br>
> > ><br>
> > > diff  --git a/clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp<br>
> > > index 1d8835f6b4741..8b4004d059e81 100644<br>
> > > --- a/clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp<br>
> > > +++ b/clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp<br>
> > > @@ -907,7 +907,7 @@ void NullabilityChecker::checkPostObjCMessage(const ObjCMethodCall &M,<br>
> > >      // this class of methods reduced the emitted diagnostics by about 30% on<br>
> > >      // some projects (and all of that was false positives).<br>
> > >      if (Name.contains("String")) {<br>
> > > -      for (auto Param : M.parameters()) {<br>
> > > +      for (auto *Param : M.parameters()) {<br>
> > >          if (Param->getName() == "encoding") {<br>
> > >            State = State->set<NullabilityMap>(ReturnRegion,<br>
> > >                                               Nullability::Contradicted);<br>
> > ><br>
> > > diff  --git a/clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp<br>
> > > index 1aa665f0ef45d..fb90fc9c91ea3 100644<br>
> > > --- a/clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp<br>
> > > +++ b/clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp<br>
> > > @@ -368,7 +368,7 @@ class StreamChecker : public Checker<check::PreCall, eval::Call,<br>
> > >      // (and matching name) as stream functions.<br>
> > >      if (!Call.isGlobalCFunction())<br>
> > >        return nullptr;<br>
> > > -    for (auto P : Call.parameters()) {<br>
> > > +    for (auto *P : Call.parameters()) {<br>
> > >        QualType T = P->getType();<br>
> > >        if (!T->isIntegralOrEnumerationType() && !T->isPointerType())<br>
> > >          return nullptr;<br>
> > ><br>
> > > diff  --git a/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp<br>
> > > index 05f8f6084c0b6..0fa3d6043971f 100644<br>
> > > --- a/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp<br>
> > > +++ b/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp<br>
> > > @@ -92,7 +92,7 @@ void UndefinedAssignmentChecker::checkBind(SVal location, SVal val,<br>
> > >      if (const auto *CD =<br>
> > >              dyn_cast<CXXConstructorDecl>(C.getStackFrame()->getDecl())) {<br>
> > >        if (CD->isImplicit()) {<br>
> > > -        for (auto I : CD->inits()) {<br>
> > > +        for (auto *I : CD->inits()) {<br>
> > >            if (I->getInit()->IgnoreImpCasts() == StoreE) {<br>
> > >              OS << "Value assigned to field '" << I->getMember()->getName()<br>
> > >                 << "' in implicit constructor is garbage or undefined";<br>
> > ><br>
> > > diff  --git a/clang/lib/StaticAnalyzer/Checkers/WebKit/NoUncountedMembersChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/WebKit/NoUncountedMembersChecker.cpp<br>
> > > index 97f75135bf922..6b4615e189bcd 100644<br>
> > > --- a/clang/lib/StaticAnalyzer/Checkers/WebKit/NoUncountedMembersChecker.cpp<br>
> > > +++ b/clang/lib/StaticAnalyzer/Checkers/WebKit/NoUncountedMembersChecker.cpp<br>
> > > @@ -69,7 +69,7 @@ class NoUncountedMemberChecker<br>
> > >      if (shouldSkipDecl(RD))<br>
> > >        return;<br>
> > ><br>
> > > -    for (auto Member : RD->fields()) {<br>
> > > +    for (auto *Member : RD->fields()) {<br>
> > >        const Type *MemberType = Member->getType().getTypePtrOrNull();<br>
> > >        if (!MemberType)<br>
> > >          continue;<br>
> > ><br>
> > > diff  --git a/clang/lib/StaticAnalyzer/Core/CallEvent.cpp b/clang/lib/StaticAnalyzer/Core/CallEvent.cpp<br>
> > > index 3a8d69df7a641..57591960a1401 100644<br>
> > > --- a/clang/lib/StaticAnalyzer/Core/CallEvent.cpp<br>
> > > +++ b/clang/lib/StaticAnalyzer/Core/CallEvent.cpp<br>
> > > @@ -1124,7 +1124,7 @@ static const ObjCMethodDecl *findDefiningRedecl(const ObjCMethodDecl *MD) {<br>
> > ><br>
> > >    // Find the redeclaration that defines the method.<br>
> > >    if (!MD->hasBody()) {<br>
> > > -    for (auto I : MD->redecls())<br>
> > > +    for (auto *I : MD->redecls())<br>
> > >        if (I->hasBody())<br>
> > >          MD = cast<ObjCMethodDecl>(I);<br>
> > >    }<br>
> > ><br>
> > > diff  --git a/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp b/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp<br>
> > > index de90f4a71be00..994de60a732a2 100644<br>
> > > --- a/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp<br>
> > > +++ b/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp<br>
> > > @@ -616,7 +616,7 @@ void CoreEngine::enqueue(ExplodedNodeSet &Set,<br>
> > >  }<br>
> > ><br>
> > >  void CoreEngine::enqueueEndOfFunction(ExplodedNodeSet &Set, const ReturnStmt *RS) {<br>
> > > -  for (auto I : Set) {<br>
> > > +  for (auto *I : Set) {<br>
> > >      // If we are in an inlined call, generate CallExitBegin node.<br>
> > >      if (I->getLocationContext()->getParent()) {<br>
> > >        I = generateCallExitBeginNode(I, RS);<br>
> > ><br>
> > > diff  --git a/clang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp<br>
> > > index 5a55e81497b03..25c36e9aea24d 100644<br>
> > > --- a/clang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp<br>
> > > +++ b/clang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp<br>
> > > @@ -206,7 +206,7 @@ void ExprEngine::VisitObjCMessage(const ObjCMessageExpr *ME,<br>
> > >          ExplodedNodeSet dstPostCheckers;<br>
> > >          getCheckerManager().runCheckersForObjCMessageNil(dstPostCheckers, Pred,<br>
> > >                                                           *Msg, *this);<br>
> > > -        for (auto I : dstPostCheckers)<br>
> > > +        for (auto *I : dstPostCheckers)<br>
> > >            finishArgumentConstruction(Dst, I, *Msg);<br>
> > >          return;<br>
> > >        }<br>
> > > @@ -270,7 +270,7 @@ void ExprEngine::VisitObjCMessage(const ObjCMessageExpr *ME,<br>
> > ><br>
> > >    // If there were constructors called for object-type arguments, clean them up.<br>
> > >    ExplodedNodeSet dstArgCleanup;<br>
> > > -  for (auto I : dstEval)<br>
> > > +  for (auto *I : dstEval)<br>
> > >      finishArgumentConstruction(dstArgCleanup, I, *Msg);<br>
> > ><br>
> > >    ExplodedNodeSet dstPostvisit;<br>
> > ><br>
> > > diff  --git a/clang/lib/Tooling/Tooling.cpp b/clang/lib/Tooling/Tooling.cpp<br>
> > > index 65d8508424320..a76046ae79193 100644<br>
> > > --- a/clang/lib/Tooling/Tooling.cpp<br>
> > > +++ b/clang/lib/Tooling/Tooling.cpp<br>
> > > @@ -98,7 +98,7 @@ static bool ignoreExtraCC1Commands(const driver::Compilation *Compilation) {<br>
> > >        OffloadCompilation = true;<br>
> > ><br>
> > >    if (Jobs.size() > 1) {<br>
> > > -    for (auto A : Actions){<br>
> > > +    for (auto *A : Actions){<br>
> > >        // On MacOSX real actions may end up being wrapped in BindArchAction<br>
> > >        if (isa<driver::BindArchAction>(A))<br>
> > >          A = *A->input_begin();<br>
> > ><br>
> > ><br>
> > ><br>
> > > _______________________________________________<br>
> > > cfe-commits mailing list<br>
> > > <a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
> > > <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
> > _______________________________________________<br>
> > cfe-commits mailing list<br>
> > <a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
> > <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>