@@ -624,16 +624,16 @@ static void stringifyPreprocSetting(PreprocessorOptions& PPOpts,
624624 static bool
625625 SetupCompiler (CompilerInstance* CI, const CompilerOptions& CompilerOpts,
626626 bool Lang = true , bool Targ = true ) {
627+ LangOptions& LangOpts = CI->getLangOpts ();
627628 // Set the language options, which cling needs.
628629 // This may have already been done via a precompiled header
629630 if (Lang)
630- SetClingCustomLangOpts (CI-> getLangOpts () , CompilerOpts);
631+ SetClingCustomLangOpts (LangOpts , CompilerOpts);
631632
632633 PreprocessorOptions& PPOpts = CI->getInvocation ().getPreprocessorOpts ();
633634 SetPreprocessorFromBinary (PPOpts);
634635
635636 // Sanity check that clang delivered the language standard requested
636- const auto & LangOpts = CI->getLangOpts ();
637637 if (CompilerOpts.DefaultLanguage (LangOpts)) {
638638 switch (CxxStdCompiledWith ()) {
639639 case 17 : assert (LangOpts.CPlusPlus1z && " Language version mismatch" );
@@ -644,9 +644,9 @@ static void stringifyPreprocSetting(PreprocessorOptions& PPOpts,
644644 }
645645
646646 PPOpts.addMacroDef (" __CLING__" );
647- if (CI-> getLangOpts () .CPlusPlus11 == 1 )
647+ if (LangOpts .CPlusPlus11 == 1 )
648648 PPOpts.addMacroDef (" __CLING__CXX11" );
649- if (CI-> getLangOpts () .CPlusPlus14 == 1 )
649+ if (LangOpts .CPlusPlus14 == 1 )
650650 PPOpts.addMacroDef (" __CLING__CXX14" );
651651
652652 if (CI->getDiagnostics ().hasErrorOccurred ()) {
@@ -661,11 +661,11 @@ static void stringifyPreprocSetting(PreprocessorOptions& PPOpts,
661661 return false ;
662662 }
663663
664- CI->getTarget ().adjust (CI-> getLangOpts () );
664+ CI->getTarget ().adjust (LangOpts );
665665
666666 // This may have already been done via a precompiled header
667667 if (Targ)
668- SetClingTargetLangOpts (CI-> getLangOpts () , CI->getTarget (), CompilerOpts);
668+ SetClingTargetLangOpts (LangOpts , CI->getTarget (), CompilerOpts);
669669
670670 SetPreprocessorFromTarget (PPOpts, CI->getTarget ().getTriple ());
671671 return true ;
0 commit comments