@@ -251,19 +251,19 @@ opt<std::string> EnableFunctionArgSnippets{
251
251
init (" -1" ),
252
252
};
253
253
254
- opt<CodeCompleteOptions::IncludeInsertion > HeaderInsertion{
254
+ opt<Config::HeaderInsertionPolicy > HeaderInsertion{
255
255
" header-insertion" ,
256
256
cat (Features),
257
257
desc (" Add #include directives when accepting code completions" ),
258
258
init (CodeCompleteOptions ().InsertIncludes ),
259
259
values (
260
- clEnumValN (CodeCompleteOptions::IncludeInsertion ::IWYU, " iwyu" ,
260
+ clEnumValN (Config::HeaderInsertionPolicy ::IWYU, " iwyu" ,
261
261
" Include what you use. "
262
262
" Insert the owning header for top-level symbols, unless the "
263
263
" header is already directly included or the symbol is "
264
264
" forward-declared" ),
265
265
clEnumValN (
266
- CodeCompleteOptions::IncludeInsertion ::NeverInsert, " never" ,
266
+ Config::HeaderInsertionPolicy ::NeverInsert, " never" ,
267
267
" Never insert #include directives as part of code completion" )),
268
268
};
269
269
@@ -668,7 +668,7 @@ class FlagsConfigProvider : public config::Provider {
668
668
std::optional<Config::ExternalIndexSpec> IndexSpec;
669
669
std::optional<Config::BackgroundPolicy> BGPolicy;
670
670
std::optional<Config::ArgumentListsPolicy> ArgumentLists;
671
- std::optional<Config::HeaderInsertionPolicy> _HeaderInsertion ;
671
+ std::optional<Config::HeaderInsertionPolicy> HeaderInsertionPolicy ;
672
672
673
673
// If --compile-commands-dir arg was invoked, check value and override
674
674
// default path.
@@ -714,8 +714,8 @@ class FlagsConfigProvider : public config::Provider {
714
714
}
715
715
716
716
// 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;
719
719
}
720
720
721
721
if (std::optional<bool > Enable = shouldEnableFunctionArgSnippets ()) {
@@ -732,8 +732,8 @@ class FlagsConfigProvider : public config::Provider {
732
732
C.Index .Background = *BGPolicy;
733
733
if (ArgumentLists)
734
734
C.Completion .ArgumentLists = *ArgumentLists;
735
- if (_HeaderInsertion )
736
- C.Completion .HeaderInsertion = *_HeaderInsertion ;
735
+ if (HeaderInsertionPolicy )
736
+ C.Completion .HeaderInsertion = *HeaderInsertionPolicy ;
737
737
if (AllScopesCompletion.getNumOccurrences ())
738
738
C.Completion .AllScopes = AllScopesCompletion;
739
739
0 commit comments