Skip to content

Commit b52f203

Browse files
authored
[NFC][SYCL] Avoid -Wreorder warning about order of initialization (#3620)
In the OptRecordFileRAII constructor, Ctx is initialized before OldDiagnosticHandler. Change the order of declaration of these data members to avoid a -Wreorder warning. Signed-off-by: Premanand M Rao <[email protected]>
1 parent fa428bf commit b52f203

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/CodeGen/CodeGenAction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1037,7 +1037,7 @@ struct OptRecordFileRAII {
10371037

10381038
OptRecordFileRAII(CodeGenAction &CGA, llvm::LLVMContext &Ctx,
10391039
BackendConsumer &BC)
1040-
: Ctx(Ctx), OldDiagnosticHandler(Ctx.getDiagnosticHandler()) {
1040+
: OldDiagnosticHandler(Ctx.getDiagnosticHandler()), Ctx(Ctx) {
10411041

10421042
CompilerInstance &CI = CGA.getCompilerInstance();
10431043
CodeGenOptions &CodeGenOpts = CI.getCodeGenOpts();

0 commit comments

Comments
 (0)