================ @@ -42,6 +47,14 @@ CreateFrontendBaseAction(CompilerInstance &CI) { StringRef Action("unknown"); (void)Action; + auto UseCIR = CI.getFrontendOpts().UseClangIRPipeline; ---------------- AaronBallman wrote:
> Nit: technically the coding standard does not say that, I believe you're > mentioning a sufficient condition, not a necessary one, see > https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable > > > Use auto if and only if it makes the code more readable or easier to > > maintain. Yup. FWIW, the rule of thumb we use in Clang is that "readable" means "type is spelled out in the initialization somewhere or is otherwise painful to spell but is contextually quite obvious (e.g., use of iterators)" + "any time the code reviewer asks to switch away from `auto`" https://github.com/llvm/llvm-project/pull/91007 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits