[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

Mehdi Amini via cfe-commits cfe-commits at lists.llvm.org
Mon May 13 13:20:53 PDT 2024


================
@@ -42,6 +47,14 @@ CreateFrontendBaseAction(CompilerInstance &CI) {
   StringRef Action("unknown");
   (void)Action;
 
+  auto UseCIR = CI.getFrontendOpts().UseClangIRPipeline;
----------------
joker-eph wrote:

MLIR isn't meant to differ from LLVM/Clang.

> Coding standard doesn't allow use of 'auto' here, only when the actual type of the variable is spelled on the RHS side (see next 2 lines too).

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. 




https://github.com/llvm/llvm-project/pull/91007


More information about the cfe-commits mailing list