@@ -251,19 +251,19 @@ opt<std::string> EnableFunctionArgSnippets{
251251 init (" -1" ),
252252};
253253
254- opt<CodeCompleteOptions::IncludeInsertion > HeaderInsertion{
254+ opt<Config::HeaderInsertionPolicy > HeaderInsertion{
255255 " header-insertion" ,
256256 cat (Features),
257257 desc (" Add #include directives when accepting code completions" ),
258258 init (CodeCompleteOptions ().InsertIncludes ),
259259 values (
260- clEnumValN (CodeCompleteOptions::IncludeInsertion ::IWYU, " iwyu" ,
260+ clEnumValN (Config::HeaderInsertionPolicy ::IWYU, " iwyu" ,
261261 " Include what you use. "
262262 " Insert the owning header for top-level symbols, unless the "
263263 " header is already directly included or the symbol is "
264264 " forward-declared" ),
265265 clEnumValN (
266- CodeCompleteOptions::IncludeInsertion ::NeverInsert, " never" ,
266+ Config::HeaderInsertionPolicy ::NeverInsert, " never" ,
267267 " Never insert #include directives as part of code completion" )),
268268};
269269
@@ -668,7 +668,7 @@ class FlagsConfigProvider : public config::Provider {
668668 std::optional<Config::ExternalIndexSpec> IndexSpec;
669669 std::optional<Config::BackgroundPolicy> BGPolicy;
670670 std::optional<Config::ArgumentListsPolicy> ArgumentLists;
671- std::optional<Config::HeaderInsertionPolicy> _HeaderInsertion ;
671+ std::optional<Config::HeaderInsertionPolicy> HeaderInsertionPolicy ;
672672
673673 // If --compile-commands-dir arg was invoked, check value and override
674674 // default path.
@@ -714,8 +714,8 @@ class FlagsConfigProvider : public config::Provider {
714714 }
715715
716716 // If CLI has set never, use that regardless of what the config files have
717- if (HeaderInsertion == CodeCompleteOptions::IncludeInsertion ::NeverInsert) {
718- _HeaderInsertion = CodeCompleteOptions::IncludeInsertion ::NeverInsert;
717+ if (HeaderInsertion == Config::HeaderInsertionPolicy ::NeverInsert) {
718+ HeaderInsertionPolicy = Config::HeaderInsertionPolicy ::NeverInsert;
719719 }
720720
721721 if (std::optional<bool > Enable = shouldEnableFunctionArgSnippets ()) {
@@ -732,8 +732,8 @@ class FlagsConfigProvider : public config::Provider {
732732 C.Index .Background = *BGPolicy;
733733 if (ArgumentLists)
734734 C.Completion .ArgumentLists = *ArgumentLists;
735- if (_HeaderInsertion )
736- C.Completion .HeaderInsertion = *_HeaderInsertion ;
735+ if (HeaderInsertionPolicy )
736+ C.Completion .HeaderInsertion = *HeaderInsertionPolicy ;
737737 if (AllScopesCompletion.getNumOccurrences ())
738738 C.Completion .AllScopes = AllScopesCompletion;
739739
0 commit comments