@@ -81,6 +81,11 @@ public enum PrefixHeaderMode
8181 [ Description ( "Do not suggest that a file add foo.h unless foo.h is already visible in the file's transitive includes. (--transitive_includes_only)" ) ]
8282 public bool TransitiveIncludesOnly { get ; set ; } = false ;
8383
84+ [ Category ( "iwyu options" ) ]
85+ [ DisplayName ( "Additional Parameters" ) ]
86+ [ Description ( "This string is inserted after all other parameters and before the filename of the file iwyu is running on." ) ]
87+ public string AdditionalParameters { get ; set ; } = "" ;
88+
8489 #endregion
8590
8691 #region postprocessing
@@ -117,6 +122,7 @@ public override void SaveSettingsToStorage()
117122 settingsStore . SetBoolean ( collectionName , nameof ( PCHInCode ) , PCHInCode ) ;
118123 settingsStore . SetInt32 ( collectionName , nameof ( PrefixHeaderIncludes ) , ( int ) PrefixHeaderIncludes ) ;
119124 settingsStore . SetBoolean ( collectionName , nameof ( TransitiveIncludesOnly ) , TransitiveIncludesOnly ) ;
125+ settingsStore . SetString ( collectionName , nameof ( AdditionalParameters ) , AdditionalParameters ) ;
120126
121127 settingsStore . SetBoolean ( collectionName , nameof ( ApplyProposal ) , ApplyProposal ) ;
122128 settingsStore . SetBoolean ( collectionName , nameof ( RunIncludeFormatter ) , RunIncludeFormatter ) ;
@@ -148,6 +154,8 @@ public override void LoadSettingsFromStorage()
148154 PrefixHeaderIncludes = ( PrefixHeaderMode ) settingsStore . GetInt32 ( collectionName , nameof ( PrefixHeaderIncludes ) ) ;
149155 if ( settingsStore . PropertyExists ( collectionName , nameof ( TransitiveIncludesOnly ) ) )
150156 TransitiveIncludesOnly = settingsStore . GetBoolean ( collectionName , nameof ( TransitiveIncludesOnly ) ) ;
157+ if ( settingsStore . PropertyExists ( collectionName , nameof ( AdditionalParameters ) ) )
158+ AdditionalParameters = settingsStore . GetString ( collectionName , nameof ( AdditionalParameters ) ) ;
151159
152160 if ( settingsStore . PropertyExists ( collectionName , nameof ( ApplyProposal ) ) )
153161 ApplyProposal = settingsStore . GetBoolean ( collectionName , nameof ( ApplyProposal ) ) ;
0 commit comments