diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index 990ceeb088f60..3797fc5829300 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/lib/CodeGen/CodeGenAction.cpp @@ -1037,7 +1037,7 @@ struct OptRecordFileRAII { OptRecordFileRAII(CodeGenAction &CGA, llvm::LLVMContext &Ctx, BackendConsumer &BC) - : Ctx(Ctx), OldDiagnosticHandler(Ctx.getDiagnosticHandler()) { + : OldDiagnosticHandler(Ctx.getDiagnosticHandler()), Ctx(Ctx) { CompilerInstance &CI = CGA.getCompilerInstance(); CodeGenOptions &CodeGenOpts = CI.getCodeGenOpts();