@@ -215,39 +215,43 @@ export class CppProperties {
215215if ( this . configurationIncomplete && this . defaultIncludes && this . defaultFrameworks && this . vcpkgPathReady ) {
216216let configuration :Configuration = this . CurrentConfiguration ;
217217let settings :CppSettings = new CppSettings ( this . rootUri ) ;
218+ let isUnset :( input :any ) => boolean = ( input :any ) => {
219+ // default values for "default" config settings is null.
220+ return input === null ;
221+ } ;
218222
219223// Anything that has a vscode setting for it will be resolved in updateServerOnFolderSettingsChange.
220224// So if a property is currently unset, but has a vscode setting, don't set it yet, otherwise the linkage
221225// to the setting will be lost if this configuration is saved into a c_cpp_properties.json file.
222226
223227// Only add settings from the default compiler if user hasn't explicitly set the corresponding VS Code setting.
224228
225- if ( ! settings . defaultIncludePath ) {
229+ if ( isUnset ( settings . defaultIncludePath ) ) {
226230// We don't add system includes to the includePath anymore. The language server has this information.
227231let abTestSettings :ABTestSettings = getABTestSettings ( ) ;
228232let rootFolder :string = abTestSettings . UseRecursiveIncludes ?"${workspaceFolder}/**" :"${workspaceFolder}" ;
229233configuration . includePath = [ rootFolder ] . concat ( this . vcpkgIncludes ) ;
230234}
231235// browse.path is not set by default anymore. When it is not set, the includePath will be used instead.
232- if ( ! settings . defaultDefines ) {
236+ if ( isUnset ( settings . defaultDefines ) ) {
233237configuration . defines = ( process . platform === 'win32' ) ?[ "_DEBUG" , "UNICODE" , "_UNICODE" ] :[ ] ;
234238}
235- if ( ! settings . defaultMacFrameworkPath && process . platform === 'darwin' ) {
239+ if ( isUnset ( settings . defaultMacFrameworkPath ) && process . platform === 'darwin' ) {
236240configuration . macFrameworkPath = this . defaultFrameworks ;
237241}
238- if ( ! settings . defaultWindowsSdkVersion && this . defaultWindowsSdkVersion && process . platform === 'win32' ) {
242+ if ( isUnset ( settings . defaultWindowsSdkVersion ) && this . defaultWindowsSdkVersion && process . platform === 'win32' ) {
239243configuration . windowsSdkVersion = this . defaultWindowsSdkVersion ;
240244}
241- if ( ! settings . defaultCompilerPath && this . defaultCompilerPath ) {
245+ if ( isUnset ( settings . defaultCompilerPath ) && this . defaultCompilerPath ) {
242246configuration . compilerPath = this . defaultCompilerPath ;
243247}
244- if ( ! settings . defaultCStandard && this . defaultCStandard ) {
248+ if ( isUnset ( settings . defaultCStandard ) && this . defaultCStandard ) {
245249configuration . cStandard = this . defaultCStandard ;
246250}
247- if ( ! settings . defaultCppStandard && this . defaultCppStandard ) {
251+ if ( isUnset ( settings . defaultCppStandard ) && this . defaultCppStandard ) {
248252configuration . cppStandard = this . defaultCppStandard ;
249253}
250- if ( ! settings . defaultIntelliSenseMode ) {
254+ if ( isUnset ( settings . defaultIntelliSenseMode ) ) {
251255configuration . intelliSenseMode = this . defaultIntelliSenseMode ;
252256}
253257this . configurationIncomplete = false ;
@@ -431,11 +435,11 @@ export class CppProperties {
431435private updateConfiguration ( property :string , defaultValue :string , env :Environment ) :string ;
432436private updateConfiguration ( property :string | boolean , defaultValue :boolean , env :Environment ) :boolean ;
433437private updateConfiguration ( property , defaultValue , env ) :any {
434- if ( typeof property === "string" || typeof defaultValue === "string" ) {
438+ if ( util . isString ( property ) || util . isString ( defaultValue ) ) {
435439return this . resolveVariables ( property , defaultValue , env ) ;
436- } else if ( typeof property === "boolean" || typeof defaultValue === "boolean" ) {
440+ } else if ( util . isBoolean ( property ) || util . isBoolean ( defaultValue ) ) {
437441return this . resolveVariables ( property , defaultValue , env ) ;
438- } else if ( property instanceof Array || defaultValue instanceof Array ) {
442+ } else if ( util . isArrayOfString ( property ) || util . isArrayOfString ( defaultValue ) ) {
439443if ( property ) {
440444return this . resolveAndSplit ( property , defaultValue , env ) ;
441445} else if ( property === undefined && defaultValue ) {