microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.52k stars 1.55k forks source link

_WIN32 found as defined on windows while cross-compiling for android linux #9017

Closed ngerow2025 closed 2 years ago

ngerow2025 commented 2 years ago

Bug type: Language Service

Describe the bug

I am working on a c++ project that has support for both android(linux) and windows builds but when I toggle to the android configuration the ifdef blocks for WIN32 are still active and parced for errors and the ifdef block for __ANDROID__ is still inactive. I have tried to fix this issue by adding a force include for the android configuration that defines __ANDROID_\ and undefines _WIN32 but it did not seem to have any effect.

Steps to reproduce

  1. download the android ndk toolkit
  2. download this small example project
  3. fix the paths for where you downloaded the project and the ndk toolkit in the compile_commands.json file and the c_cpp_properties.json file
  4. f1 > C/C++: Select a configuration... > Android

Expected behavior The ifdef block for __ANDROID__ should become active and the ifdef block for _WIN32 should become inactive

Code sample and logs

include <android/log.h>

int main(){ __android_log_print(ANDROID_LOG_VERBOSE, "bug_test", "this is the android build");

}

endif

ifdef _WIN32

include

int main(){

printf("this is the windows build");

}

endif


- Configurations in `c_cpp_properties.json`

{ "configurations": [ { "name": "Win32", "includePath": [ "${workspaceFolder}/**" ], "defines": [ "_DEBUG", "UNICODE", "_UNICODE" ], "windowsSdkVersion": "10.0.18362.0", "compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe", "cStandard": "c17", "cppStandard": "c++17", "intelliSenseMode": "windows-msvc-x64" }, { "name": "Android", "compileCommands": "${workspaceFolder}/compile_commands.json", "compilerPath": "C:/Users/ngero/AppData/Local/Android/Sdk/ndk/23.0.7599858/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe", "intelliSenseMode": "linux-clang-arm64", "forcedInclude": [ "${workspaceFolder}/.vscode/android_force_include.h" ] } ], "version": 4 }

- compile_commands.json

[ { "command": "C:/Users/ngero/AppData/Local/Android/Sdk/ndk/23.0.7599858/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -target aarch64-none-linux-android24 -fdata-sections -ffunction-sections -fstack-protector-strong -funwind-tables -no-canonical-prefixes --sysroot C:/Users/ngero/AppData/Local/Android/Sdk/ndk/23.0.7599858/build//../toolchains/llvm/prebuilt/windows-x86_64/sysroot -g -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-rtti -fpic -O0 -UNDEBUG -fno-limit-debug-info -IC:/Users/ngero/AppData/Local/Android/Sdk/ndk/23.0.7599858/build//../sources/cxx-stl/llvm-libc++/include -IC:/Users/ngero/AppData/Local/Android/Sdk/ndk/23.0.7599858/build//../sources/cxx-stl/llvm-libc++abi/include -DANDROID -nostdinc++ -Wformat -Werror=format-security -std=c++17 -c D:/bug_test/main.cpp -o D:/bug_test/main.o", "directory": "D:\bug_test", "file": "D:/bug_test/main.cpp", "output": "D:/bug_test/main.o" } ]

- force include for android configuration

undef _WIN32

undef WIN32

undef _WIN64

undef WIN64

undef MINGW32

undef MINGW64

undef MSVCRT

undef __WIN32

undef WIN32

undef __WIN64

undef WIN64

undef __WINNT

undef WINNT

define ANDROID

- Logs from running `C/C++: Log Diagnostics` from the VS Code command palette

-------- Diagnostics - 3/11/2022, 8:46:43 PM Version: 1.8.4 Current Configuration: { "name": "Android", "compileCommands": "${workspaceFolder}/compile_commands.json", "compilerPath": "C:/Users/ngero/AppData/Local/Android/Sdk/ndk/23.0.7599858/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe", "intelliSenseMode": "linux-clang-arm64", "forcedInclude": [ "${workspaceFolder}/.vscode/android_force_include.h" ], "compilerPathIsExplicit": true, "cStandardIsExplicit": false, "cppStandardIsExplicit": false, "intelliSenseModeIsExplicit": true, "compilerArgs": [], "mergeConfigurations": false, "browse": { "limitSymbolsToIncludedHeaders": true } } Translation Unit Mappings: [ D:\bug_test\main.cpp ]: D:\bug_test\main.cpp [ D:\bug_test.vscode\android_force_include.h ]: D:\bug_test.vscode\android_force_include.h Translation Unit Configurations: [ D:\bug_test\main.cpp ]: Process ID: 13024 Memory Usage: 14 MB Compiler Path: C:/Users/ngero/AppData/Local/Android/Sdk/ndk/23.0.7599858/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe Includes: C:\USERS\NGERO\APPDATA\LOCAL\ANDROID\SDK\NDK\23.0.7599858\SOURCES\CXX-STL\LLVM-LIBC++\INCLUDE C:\USERS\NGERO\APPDATA\LOCAL\ANDROID\SDK\NDK\23.0.7599858\SOURCES\CXX-STL\LLVM-LIBC++ABI\INCLUDE C:\USERS\NGERO\APPDATA\LOCAL\ANDROID\SDK\NDK\23.0.7599858\TOOLCHAINS\LLVM\PREBUILT\WINDOWS-X86_64\INCLUDE\C++ C:\USERS\NGERO\APPDATA\LOCAL\ANDROID\SDK\NDK\23.0.7599858\TOOLCHAINS\LLVM\PREBUILT\WINDOWS-X86_64\LIB64\CLANG\12.0.5\INCLUDE C:\USERS\NGERO\APPDATA\LOCAL\ANDROID\SDK\NDK\23.0.7599858\TOOLCHAINS\LLVM\PREBUILT\WINDOWS-X86_64\INCLUDE Defines: _FORTIFY_SOURCE=2 ANDROID Standard Version: c++14 IntelliSense Mode: linux-gcc-x64 Other Flags: --g++ --gnu_version=40201 compile_commands.json entry: directory: D:\bug_test file: D:/bug_test/main.cpp command: C:/Users/ngero/AppData/Local/Android/Sdk/ndk/23.0.7599858/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -target aarch64-none-linux-android24 -fdata-sections -ffunction-sections -fstack-protector-strong -funwind-tables -no-canonical-prefixes --sysroot C:/Users/ngero/AppData/Local/Android/Sdk/ndk/23.0.7599858/build//../toolchains/llvm/prebuilt/windows-x86_64/sysroot -g -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-rtti -fpic -O0 -UNDEBUG -fno-limit-debug-info -IC:/Users/ngero/AppData/Local/Android/Sdk/ndk/23.0.7599858/build//../sources/cxx-stl/llvm-libc++/include -IC:/Users/ngero/AppData/Local/Android/Sdk/ndk/23.0.7599858/build//../sources/cxx-stl/llvm-libc++abi/include -DANDROID -nostdinc++ -Wformat -Werror=format-security -std=c++17 -c D:/bug_test/main.cpp -o D:/bug_test/main.o output: D:/bug_test/main.o [ D:\bug_test.vscode\android_force_include.h ]: Process ID: 21324 Memory Usage: 15 MB Compiler Path: C:/Users/ngero/AppData/Local/Android/Sdk/ndk/23.0.7599858/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe Includes: C:\USERS\NGERO\APPDATA\LOCAL\ANDROID\SDK\NDK\23.0.7599858\TOOLCHAINS\LLVM\PREBUILT\WINDOWS-X86_64\INCLUDE\C++ C:\USERS\NGERO\APPDATA\LOCAL\ANDROID\SDK\NDK\23.0.7599858\TOOLCHAINS\LLVM\PREBUILT\WINDOWS-X86_64\LIB64\CLANG\12.0.5\INCLUDE C:\USERS\NGERO\APPDATA\LOCAL\ANDROID\SDK\NDK\23.0.7599858\TOOLCHAINS\LLVM\PREBUILT\WINDOWS-X86_64\INCLUDE Forced Includes: d:/bug_test/.vscode/android_force_include.h Standard Version: c++14 IntelliSense Mode: linux-gcc-x64 Other Flags: --g++ --gnu_version=40201 --header_only_fallback Total Memory Usage: 29 MB Browse Paths from compile_commands.json, from workspace folder: d:\bug_test C:\USERS\NGERO\APPDATA\LOCAL\ANDROID\SDK\NDK\23.0.7599858\SOURCES\CXX-STL\LLVM-LIBC++ABI\INCLUDE C:\USERS\NGERO\APPDATA\LOCAL\ANDROID\SDK\NDK\23.0.7599858\SOURCES\CXX-STL\LLVM-LIBC++\INCLUDE D:\BUG_TEST

------- Workspace parsing diagnostics ------- Number of files discovered (not excluded): 383

- Logs from [the language server logging](https://code.visualstudio.com/docs/cpp/enable-logging-cpp#_enable-logging-for-the-language-server)

loggingLevel: Debug cpptools/didChangeCppProperties Attempting to get defaults from C compiler in "compilerPath" property: 'C:/Users/ngero/AppData/Local/Android/Sdk/ndk/23.0.7599858/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe' Querying compiler for default C++ language standard using command line: "C:/Users/ngero/AppData/Local/Android/Sdk/ndk/23.0.7599858/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe" -x c++ -E -dM nul Detected language standard version: c++14 Querying compiler for default C language standard using command line: "C:/Users/ngero/AppData/Local/Android/Sdk/ndk/23.0.7599858/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe" -x c -E -dM nul Detected language standard version: c17 Querying compiler's default target using command line: "C:/Users/ngero/AppData/Local/Android/Sdk/ndk/23.0.7599858/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe" -dumpmachine Compiler returned default target value: x86_64-w64-windows-gnu

Compiler query command line: "C:/Users/ngero/AppData/Local/Android/Sdk/ndk/23.0.7599858/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe" -std=c17 -Wp,-v -E -dM -x c -m64 -fno-blocks nul Code browsing service initialized Attempting to get defaults from C++ compiler in "compilerPath" property: 'C:/Users/ngero/AppData/Local/Android/Sdk/ndk/23.0.7599858/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe' Compiler query command line: "C:/Users/ngero/AppData/Local/Android/Sdk/ndk/23.0.7599858/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe" -std=c++14 -Wp,-v -E -dM -x c++ -m64 -fno-blocks nul Attempting to get defaults from C++ compiler in "compilerPath" property: 'C:/Users/ngero/AppData/Local/Android/Sdk/ndk/23.0.7599858/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe' Folder: C:/USERS/NGERO/APPDATA/LOCAL/ANDROID/SDK/NDK/23.0.7599858/TOOLCHAINS/LLVM/PREBUILT/WINDOWS-X86_64/INCLUDE/ will be indexed Folder: C:/USERS/NGERO/APPDATA/LOCAL/ANDROID/SDK/NDK/23.0.7599858/TOOLCHAINS/LLVM/PREBUILT/WINDOWS-X86_64/LIB64/CLANG/12.0.5/INCLUDE/ will be indexed Folder: C:/USERS/NGERO/APPDATA/LOCAL/ANDROID/SDK/NDK/23.0.7599858/SOURCES/CXX-STL/LLVM-LIBC++/INCLUDE/ will be indexed Folder: C:/USERS/NGERO/APPDATA/LOCAL/ANDROID/SDK/NDK/23.0.7599858/SOURCES/CXX-STL/LLVM-LIBC++ABI/INCLUDE/ will be indexed Folder: D:/BUG_TEST/ will be indexed textDocument/didOpen: D:\bug_test.vscode\android_force_include.h Discovering files... Checking for syntax errors: D:\bug_test.vscode\android_force_include.h cpptools/textEditorSelectionChange textDocument/documentHighlight: D:\bug_test.vscode\android_force_include.h (id: 2) cpptools/textEditorSelectionChange cpptools/activeDocumentChange: D:\bug_test.vscode\android_force_include.h cpptools/activeDocumentChange: D:\bug_test.vscode\android_force_include.h cpptools/getDocumentSymbols: D:\bug_test.vscode\android_force_include.h (id: 3) cpptools/getCodeActions: D:\bug_test.vscode\android_force_include.h (id: 4) cpptools/getDocumentSymbols cpptools/getFoldingRanges: D:\bug_test.vscode\android_force_include.h (id: 5) cpptools/getSemanticTokens: D:\bug_test.vscode\android_force_include.h (id: 6) cpptools/didChangeCompileCommands: D:\bug_test\compile_commands.json Processing folder (recursive): C:/USERS/NGERO/APPDATA/LOCAL/ANDROID/SDK/NDK/23.0.7599858/TOOLCHAINS/LLVM/PREBUILT/WINDOWS-X86_64/INCLUDE/ Processing folder (recursive): C:/USERS/NGERO/APPDATA/LOCAL/ANDROID/SDK/NDK/23.0.7599858/TOOLCHAINS/LLVM/PREBUILT/WINDOWS-X86_64/LIB64/CLANG/12.0.5/INCLUDE/ Processing folder (recursive): C:/USERS/NGERO/APPDATA/LOCAL/ANDROID/SDK/NDK/23.0.7599858/SOURCES/CXX-STL/LLVM-LIBC++/INCLUDE/ Processing folder (recursive): C:/USERS/NGERO/APPDATA/LOCAL/ANDROID/SDK/NDK/23.0.7599858/SOURCES/CXX-STL/LLVM-LIBC++ABI/INCLUDE/ Processing folder (recursive): D:/BUG_TEST/ Discovering files: 383 file(s) processed 0 file(s) removed from database Done discovering files. Populating include completion cache. Parsing remaining files... Parsing: 0 files(s) processed Done parsing remaining files. sending compilation args for D:\bug_test.vscode\android_force_include.h include: C:\USERS\NGERO\APPDATA\LOCAL\ANDROID\SDK\NDK\23.0.7599858\TOOLCHAINS\LLVM\PREBUILT\WINDOWS-X86_64\INCLUDE\C++ include: C:\USERS\NGERO\APPDATA\LOCAL\ANDROID\SDK\NDK\23.0.7599858\TOOLCHAINS\LLVM\PREBUILT\WINDOWS-X86_64\LIB64\CLANG\12.0.5\INCLUDE include: C:\USERS\NGERO\APPDATA\LOCAL\ANDROID\SDK\NDK\23.0.7599858\TOOLCHAINS\LLVM\PREBUILT\WINDOWS-X86_64\INCLUDE define: _WIN32=1 define: _WIN64=1 define: ATOMIC_ACQUIRE=2 define: ATOMIC_ACQ_REL=4 define: ATOMIC_CONSUME=1 define: ATOMIC_RELAXED=0 define: ATOMIC_RELEASE=3 define: ATOMIC_SEQ_CST=5 define: BIGGEST_ALIGNMENT=16 define: BYTE_ORDER=ORDER_LITTLE_ENDIAN define: CHAR16_TYPE=unsigned short define: CHAR32_TYPE=unsigned int define: CHAR_BIT=8 define: CLANG_ATOMIC_BOOL_LOCK_FREE=2 define: CLANG_ATOMIC_CHAR16_T_LOCK_FREE=2 define: CLANG_ATOMIC_CHAR32_T_LOCK_FREE=2 define: CLANG_ATOMIC_CHAR_LOCK_FREE=2 define: CLANG_ATOMIC_INT_LOCK_FREE=2 define: CLANG_ATOMIC_LLONG_LOCK_FREE=2 define: CLANG_ATOMIC_LONG_LOCK_FREE=2 define: CLANG_ATOMIC_POINTER_LOCK_FREE=2 define: CLANG_ATOMIC_SHORT_LOCK_FREE=2 define: __CLANG_ATOMIC_WCHAR_T_LOCK_FREE=2 define: CONSTANT_CFSTRINGS=1 define: DBL_DECIMAL_DIG=17 define: DBL_DENORM_MIN=4.9406564584124654e-324 define: DBL_DIG=15 define: DBL_EPSILON=2.2204460492503131e-16 define: DBL_HAS_DENORM=1 define: DBL_HAS_INFINITY=1 define: DBL_HAS_QUIET_NAN=1 define: DBL_MANT_DIG=53 define: DBL_MAX_10_EXP=308 define: DBL_MAX_EXP=1024 define: DBL_MAX=1.7976931348623157e+308 define: DBL_MIN_10_EXP=(-307) define: DBL_MIN_EXP=(-1021) define: DBL_MIN=2.2250738585072014e-308 define: DECIMAL_DIG=LDBL_DECIMAL_DIG define: DEPRECATED=1 define: EXCEPTIONS=1 define: FINITE_MATH_ONLY=0 define: FLT_DECIMAL_DIG=9 define: FLT_DENORM_MIN=1.40129846e-45F define: FLT_DIG=6 define: FLT_EPSILON=1.19209290e-7F define: FLT_EVAL_METHOD=0 define: FLT_HAS_DENORM=1 define: FLT_HAS_INFINITY=1 define: FLT_HAS_QUIET_NAN=1 define: FLT_MANT_DIG=24 define: FLT_MAX_10_EXP=38 define: FLT_MAX_EXP=128 define: FLT_MAX=3.40282347e+38F define: FLT_MIN_10_EXP=(-37) define: FLT_MIN_EXP=(-125) define: FLT_MIN=1.17549435e-38F define: FLT_RADIX=2 define: FXSR=1 define: GCC_ASM_FLAG_OUTPUTS=1 define: GCC_ATOMIC_BOOL_LOCK_FREE=2 define: GCC_ATOMIC_CHAR16_T_LOCK_FREE=2 define: __GCC_ATOMIC_CHAR32_T_LOCK_FREE=2 define: GCC_ATOMIC_CHAR_LOCK_FREE=2 define: GCC_ATOMIC_INT_LOCK_FREE=2 define: GCC_ATOMIC_LLONG_LOCK_FREE=2 define: GCC_ATOMIC_LONG_LOCK_FREE=2 define: GCC_ATOMIC_POINTER_LOCK_FREE=2 define: GCC_ATOMIC_SHORT_LOCK_FREE=2 define: GCC_ATOMIC_TEST_AND_SET_TRUEVAL=1 define: GCC_ATOMIC_WCHAR_T_LOCK_FREE=2 define: GCC_HAVE_SYNC_COMPARE_AND_SWAP_1=1 define: GCC_HAVE_SYNC_COMPARE_AND_SWAP_2=1 define: GCC_HAVE_SYNC_COMPARE_AND_SWAP_4=1 define: GCC_HAVE_SYNC_COMPARE_AND_SWAP_8=1 define: GNUC_GNU_INLINE=1 define: __GNUC_MINOR=2 define: GNUC_PATCHLEVEL=1 define: GNUC=4 define: GNUG=4 define: GXX_ABI_VERSION=1002 define: GXX_EXPERIMENTAL_CXX0X=1 define: __GXX_RTTI=1 define: GXX_WEAK=1 define: INT16_C_SUFFIX= define: INT16_FMTd="hd" define: INT16_FMTi="hi" define: INT16_MAX=32767 define: INT16_TYPE=short define: INT32_C_SUFFIX= define: INT32_FMTd="d" define: INT32_FMTi="i" define: INT32_MAX=2147483647 define: INT32_TYPE=int define: INT64_C_SUFFIX=LL define: INT64_FMTd="lld" define: INT64_FMTi="lli" define: INT64_MAX=9223372036854775807LL define: INT64_TYPE=long long int define: INT8_C_SUFFIX= define: INT8_FMTd="hhd" define: INT8_FMTi="hhi" define: INT8_MAX=127 define: INT8_TYPE=signed char define: INTMAX_C_SUFFIX=LL define: INTMAX_FMTd="lld" define: INTMAX_FMTi="lli" define: INTMAX_MAX=9223372036854775807LL define: INTMAX_TYPE=long long int define: INTMAX_WIDTH=64 define: INTPTR_FMTd="lld" define: INTPTR_FMTi="lli" define: INTPTR_MAX=9223372036854775807LL define: INTPTR_TYPE=long long int define: INTPTR_WIDTH=64 define: INT_FAST16_FMTd="hd" define: INT_FAST16_FMTi="hi" define: INT_FAST16_MAX=32767 define: INT_FAST16_TYPE=short define: INT_FAST32_FMTd="d" define: INT_FAST32_FMTi="i" define: INT_FAST32_MAX=2147483647 define: INT_FAST32_TYPE=int define: INT_FAST64_FMTd="lld" define: INT_FAST64_FMTi="lli" define: INT_FAST64_MAX=9223372036854775807LL define: INT_FAST64_TYPE=long long int define: INT_FAST8_FMTd="hhd" define: INT_FAST8_FMTi="hhi" define: INT_FAST8_MAX=127 define: INT_FAST8_TYPE=signed char define: INT_LEAST16_FMTd="hd" define: INT_LEAST16_FMTi="hi" define: INT_LEAST16_MAX=32767 define: INT_LEAST16_TYPE=short define: INT_LEAST32_FMTd="d" define: INT_LEAST32_FMTi="i" define: INT_LEAST32_MAX=2147483647 define: INT_LEAST32_TYPE=int define: INT_LEAST64_FMTd="lld" define: INT_LEAST64_FMTi="lli" define: INT_LEAST64_MAX=9223372036854775807LL define: INT_LEAST64_TYPE=long long int define: INT_LEAST8_FMTd="hhd" define: INT_LEAST8_FMTi="hhi" define: INT_LEAST8_MAX=127 define: INT_LEAST8_TYPE=signed char define: INT_MAX=2147483647 define: LDBL_DECIMAL_DIG=21 define: LDBL_DENORM_MIN=3.64519953188247460253e-4951L define: LDBL_DIG=18 define: LDBL_EPSILON=1.08420217248550443401e-19L define: LDBL_HAS_DENORM=1 define: LDBL_HAS_INFINITY=1 define: LDBL_HAS_QUIET_NAN=1 define: LDBL_MANT_DIG=64 define: LDBL_MAX_10_EXP=4932 define: LDBL_MAX_EXP=16384 define: LDBL_MAX=1.18973149535723176502e+4932L define: LDBL_MIN_10_EXP=(-4931) define: LDBL_MIN_EXP=(-16381) define: LDBL_MIN=3.36210314311209350626e-4932L define: LITTLE_ENDIAN=1 define: LONG_LONG_MAX=9223372036854775807LL define: LONG_MAX=2147483647L define: MINGW32=1 define: MINGW64=1 define: MMX=1 define: MSVCRT=1 define: NO_INLINE=1 define: NO_MATH_INLINES=1 define: OBJC_BOOL_IS_BOOL=0 define: __OPENCL_MEMORY_SCOPE_ALL_SVM_DEVICES=3 define: OPENCL_MEMORY_SCOPE_DEVICE=2 define: OPENCL_MEMORY_SCOPE_SUB_GROUP=4 define: OPENCL_MEMORY_SCOPE_WORK_GROUP=1 define: OPENCL_MEMORY_SCOPE_WORK_ITEM=0 define: ORDER_BIG_ENDIAN=4321 define: ORDER_LITTLE_ENDIAN=1234 define: ORDER_PDP_ENDIAN=3412 define: PIC=2 define: POINTER_WIDTH=64 define: PRAGMA_REDEFINE_EXTNAME=1 define: PTRDIFF_FMTd="lld" define: PTRDIFF_FMTi="lli" define: PTRDIFF_MAX=9223372036854775807LL define: PTRDIFF_TYPE=long long int define: PTRDIFF_WIDTH=64 define: REGISTER_PREFIX= define: SCHAR_MAX=127 define: SEG_FS=1 define: SEG_GS=1 define: SEH=1 define: SHRT_MAX=32767 define: SIG_ATOMIC_MAX=2147483647 define: SIG_ATOMIC_WIDTH=32 define: SIZEOF_DOUBLE=8 define: SIZEOF_FLOAT128=16 define: SIZEOF_FLOAT=4 define: SIZEOF_INT128=16 define: SIZEOF_INT=4 define: SIZEOF_LONG_DOUBLE=16 define: SIZEOF_LONG_LONG=8 define: SIZEOF_LONG=4 define: SIZEOF_POINTER=8 define: SIZEOF_PTRDIFF_T=8 define: SIZEOF_SHORT=2 define: SIZEOF_SIZE_T=8 define: SIZEOF_WCHAR_T=2 define: SIZEOF_WINT_T=2 define: SIZE_FMTX="llX" define: SIZE_FMTo="llo" define: SIZE_FMTu="llu" define: SIZE_FMTx="llx" define: SIZE_MAX=18446744073709551615ULL define: SIZE_TYPE=long long unsigned int define: SIZE_WIDTH=64 define: SSE2_MATH=1 define: SSE2=1 define: SSE_MATH=1 define: SSE=1 define: STDCPP_DEFAULT_NEW_ALIGNMENT=16ULL define: STDCPP_THREADS=1 define: STDC_HOSTED=1 define: STDC_UTF_16=1 define: STDC_UTF_32=1 define: STDC=1 define: STRICT_ANSI=1 define: UINT16_C_SUFFIX= define: UINT16_FMTX="hX" define: UINT16_FMTo="ho" define: UINT16_FMTu="hu" define: UINT16_FMTx="hx" define: UINT16_MAX=65535 define: UINT16_TYPE=unsigned short define: UINT32_C_SUFFIX=U define: UINT32_FMTX="X" define: UINT32_FMTo="o" define: UINT32_FMTu="u" define: UINT32_FMTx="x" define: UINT32_MAX=4294967295U define: UINT32_TYPE=unsigned int define: UINT64_C_SUFFIX=ULL define: UINT64_FMTX="llX" define: UINT64_FMTo="llo" define: UINT64_FMTu="llu" define: UINT64_FMTx="llx" define: UINT64_MAX=18446744073709551615ULL define: UINT64_TYPE=long long unsigned int define: UINT8_C_SUFFIX= define: UINT8_FMTX="hhX" define: UINT8_FMTo="hho" define: UINT8_FMTu="hhu" define: UINT8_FMTx="hhx" define: UINT8_MAX=255 define: UINT8_TYPE=unsigned char define: UINTMAX_C_SUFFIX=ULL define: UINTMAX_FMTX="llX" define: UINTMAX_FMTo="llo" define: UINTMAX_FMTu="llu" define: UINTMAX_FMTx="llx" define: UINTMAX_MAX=18446744073709551615ULL define: UINTMAX_TYPE=long long unsigned int define: UINTMAX_WIDTH=64 define: UINTPTR_FMTX="llX" define: UINTPTR_FMTo="llo" define: UINTPTR_FMTu="llu" define: UINTPTR_FMTx="llx" define: UINTPTR_MAX=18446744073709551615ULL define: UINTPTR_TYPE=long long unsigned int define: UINTPTR_WIDTH=64 define: UINT_FAST16_FMTX="hX" define: UINT_FAST16_FMTo="ho" define: UINT_FAST16_FMTu="hu" define: UINT_FAST16_FMTx="hx" define: UINT_FAST16_MAX=65535 define: UINT_FAST16_TYPE=unsigned short define: UINT_FAST32_FMTX="X" define: UINT_FAST32_FMTo="o" define: UINT_FAST32_FMTu="u" define: UINT_FAST32_FMTx="x" define: UINT_FAST32_MAX=4294967295U define: UINT_FAST32_TYPE=unsigned int define: UINT_FAST64_FMTX="llX" define: UINT_FAST64_FMTo="llo" define: UINT_FAST64_FMTu="llu" define: UINT_FAST64_FMTx="llx" define: UINT_FAST64_MAX=18446744073709551615ULL define: UINT_FAST64_TYPE=long long unsigned int define: UINT_FAST8_FMTX="hhX" define: UINT_FAST8_FMTo="hho" define: UINT_FAST8_FMTu="hhu" define: UINT_FAST8_FMTx="hhx" define: UINT_FAST8_MAX=255 define: UINT_FAST8_TYPE=unsigned char define: UINT_LEAST16_FMTX="hX" define: UINT_LEAST16_FMTo="ho" define: UINT_LEAST16_FMTu="hu" define: UINT_LEAST16_FMTx="hx" define: UINT_LEAST16_MAX=65535 define: UINT_LEAST16_TYPE=unsigned short define: UINT_LEAST32_FMTX="X" define: UINT_LEAST32_FMTo="o" define: UINT_LEAST32_FMTu="u" define: UINT_LEAST32_FMTx="x" define: UINT_LEAST32_MAX=4294967295U define: UINT_LEAST32_TYPE=unsigned int define: UINT_LEAST64_FMTX="llX" define: UINT_LEAST64_FMTo="llo" define: UINT_LEAST64_FMTu="llu" define: UINT_LEAST64_FMTx="llx" define: UINT_LEAST64_MAX=18446744073709551615ULL define: UINT_LEAST64_TYPE=long long unsigned int define: UINT_LEAST8_FMTX="hhX" define: UINT_LEAST8_FMTo="hho" define: UINT_LEAST8_FMTu="hhu" define: UINT_LEAST8_FMTx="hhx" define: UINT_LEAST8_MAX=255 define: UINT_LEAST8_TYPE=unsigned char define: USER_LABEL_PREFIX= define: VERSION="Android (7284624, based on r416183b) Clang 12.0.5 (https://android.googlesource.com/toolchain/llvm-project c935d99d7cf2016289302412d708641d52d2f7ee)" define: WCHAR_MAX=65535 define: WCHAR_TYPE=unsigned short define: WCHAR_UNSIGNED=1 define: WCHAR_WIDTH=16 define: WIN32=1 define: WIN32=1 define: WIN64=1 define: WIN64=1 define: WINNT=1 define: WINNT=1 define: WINT_MAX=65535 define: WINT_TYPE=unsigned short define: WINT_UNSIGNED=1 define: WINT_WIDTH=16 define: amd64=1 define: amd64=1 define: cdecl=attribute((cdecl)) define: clang=1 define: clang_major=12 define: clang_minor=0 define: clang_patchlevel=5 define: clang_version="12.0.5 (https://android.googlesource.com/toolchain/llvm-project c935d99d7cf2016289302412d708641d52d2f7ee)" define: code_model_small=1 define: cplusplus=201402L define: declspec(a)=attribute((a)) define: fastcall=attribute((fastcall)) define: k8=1 define: k8=1 define: llvm=1 define: pascal=attribute((pascal)) define: pic=2 define: private_extern=extern define: seg_fs=attribute((address_space(257))) define: __seg_gs=attribute((address_space(256))) define: stdcall=attribute((stdcall)) define: thiscall=attribute((thiscall)) define: __tune_k8=1 define: x86_64=1 define: __x86_64=1 define: _cdecl=attribute((cdecl)) define: _fastcall=attribute((fastcall)) define: _pascal=attribute((pascal)) define: _stdcall=attribute((stdcall)) define: _thiscall=attribute((thiscall)) preinclude: d:/bug_test/.vscode/android_force_include.h other: --g++ other: --gnu_version=40201 other: --header_only_fallback stdver: c++14 intelliSenseMode: linux-gcc-x64 Checking for syntax errors: D:\bug_test.vscode\android_force_include.h Shutting down IntelliSense server: D:\bug_test.vscode\android_force_include.h sending compilation args for D:\bug_test.vscode\android_force_include.h include: C:\USERS\NGERO\APPDATA\LOCAL\ANDROID\SDK\NDK\23.0.7599858\TOOLCHAINS\LLVM\PREBUILT\WINDOWS-X86_64\INCLUDE\C++ include: C:\USERS\NGERO\APPDATA\LOCAL\ANDROID\SDK\NDK\23.0.7599858\TOOLCHAINS\LLVM\PREBUILT\WINDOWS-X86_64\LIB64\CLANG\12.0.5\INCLUDE include: C:\USERS\NGERO\APPDATA\LOCAL\ANDROID\SDK\NDK\23.0.7599858\TOOLCHAINS\LLVM\PREBUILT\WINDOWS-X86_64\INCLUDE define: _WIN32=1 define: _WIN64=1 define: ATOMIC_ACQUIRE=2 define: ATOMIC_ACQ_REL=4 define: ATOMIC_CONSUME=1 define: ATOMIC_RELAXED=0 define: ATOMIC_RELEASE=3 define: ATOMIC_SEQ_CST=5 define: BIGGEST_ALIGNMENT=16 define: BYTE_ORDER=ORDER_LITTLE_ENDIAN define: CHAR16_TYPE=unsigned short define: CHAR32_TYPE=unsigned int define: CHAR_BIT=8 define: CLANG_ATOMIC_BOOL_LOCK_FREE=2 define: CLANG_ATOMIC_CHAR16_T_LOCK_FREE=2 define: CLANG_ATOMIC_CHAR32_T_LOCK_FREE=2 define: CLANG_ATOMIC_CHAR_LOCK_FREE=2 define: CLANG_ATOMIC_INT_LOCK_FREE=2 define: CLANG_ATOMIC_LLONG_LOCK_FREE=2 define: CLANG_ATOMIC_LONG_LOCK_FREE=2 define: CLANG_ATOMIC_POINTER_LOCK_FREE=2 define: CLANG_ATOMIC_SHORT_LOCK_FREE=2 define: __CLANG_ATOMIC_WCHAR_T_LOCK_FREE=2 define: CONSTANT_CFSTRINGS=1 define: DBL_DECIMAL_DIG=17 define: DBL_DENORM_MIN=4.9406564584124654e-324 define: DBL_DIG=15 define: DBL_EPSILON=2.2204460492503131e-16 define: DBL_HAS_DENORM=1 define: DBL_HAS_INFINITY=1 define: DBL_HAS_QUIET_NAN=1 define: DBL_MANT_DIG=53 define: DBL_MAX_10_EXP=308 define: DBL_MAX_EXP=1024 define: DBL_MAX=1.7976931348623157e+308 define: DBL_MIN_10_EXP=(-307) define: DBL_MIN_EXP=(-1021) define: DBL_MIN=2.2250738585072014e-308 define: DECIMAL_DIG=LDBL_DECIMAL_DIG define: DEPRECATED=1 define: EXCEPTIONS=1 define: FINITE_MATH_ONLY=0 define: FLT_DECIMAL_DIG=9 define: FLT_DENORM_MIN=1.40129846e-45F define: FLT_DIG=6 define: FLT_EPSILON=1.19209290e-7F define: FLT_EVAL_METHOD=0 define: FLT_HAS_DENORM=1 define: FLT_HAS_INFINITY=1 define: FLT_HAS_QUIET_NAN=1 define: FLT_MANT_DIG=24 define: FLT_MAX_10_EXP=38 define: FLT_MAX_EXP=128 define: FLT_MAX=3.40282347e+38F define: FLT_MIN_10_EXP=(-37) define: FLT_MIN_EXP=(-125) define: FLT_MIN=1.17549435e-38F define: FLT_RADIX=2 define: FXSR=1 define: GCC_ASM_FLAG_OUTPUTS=1 define: GCC_ATOMIC_BOOL_LOCK_FREE=2 define: GCC_ATOMIC_CHAR16_T_LOCK_FREE=2 define: __GCC_ATOMIC_CHAR32_T_LOCK_FREE=2 define: GCC_ATOMIC_CHAR_LOCK_FREE=2 define: GCC_ATOMIC_INT_LOCK_FREE=2 define: GCC_ATOMIC_LLONG_LOCK_FREE=2 define: GCC_ATOMIC_LONG_LOCK_FREE=2 define: GCC_ATOMIC_POINTER_LOCK_FREE=2 define: GCC_ATOMIC_SHORT_LOCK_FREE=2 define: GCC_ATOMIC_TEST_AND_SET_TRUEVAL=1 define: GCC_ATOMIC_WCHAR_T_LOCK_FREE=2 define: GCC_HAVE_SYNC_COMPARE_AND_SWAP_1=1 define: GCC_HAVE_SYNC_COMPARE_AND_SWAP_2=1 define: GCC_HAVE_SYNC_COMPARE_AND_SWAP_4=1 define: GCC_HAVE_SYNC_COMPARE_AND_SWAP_8=1 define: GNUC_GNU_INLINE=1 define: __GNUC_MINOR=2 define: GNUC_PATCHLEVEL=1 define: GNUC=4 define: GNUG=4 define: GXX_ABI_VERSION=1002 define: GXX_EXPERIMENTAL_CXX0X=1 define: __GXX_RTTI=1 define: GXX_WEAK=1 define: INT16_C_SUFFIX= define: INT16_FMTd="hd" define: INT16_FMTi="hi" define: INT16_MAX=32767 define: INT16_TYPE=short define: INT32_C_SUFFIX= define: INT32_FMTd="d" define: INT32_FMTi="i" define: INT32_MAX=2147483647 define: INT32_TYPE=int define: INT64_C_SUFFIX=LL define: INT64_FMTd="lld" define: INT64_FMTi="lli" define: INT64_MAX=9223372036854775807LL define: INT64_TYPE=long long int define: INT8_C_SUFFIX= define: INT8_FMTd="hhd" define: INT8_FMTi="hhi" define: INT8_MAX=127 define: INT8_TYPE=signed char define: INTMAX_C_SUFFIX=LL define: INTMAX_FMTd="lld" define: INTMAX_FMTi="lli" define: INTMAX_MAX=9223372036854775807LL define: INTMAX_TYPE=long long int define: INTMAX_WIDTH=64 define: INTPTR_FMTd="lld" define: INTPTR_FMTi="lli" define: INTPTR_MAX=9223372036854775807LL define: INTPTR_TYPE=long long int define: INTPTR_WIDTH=64 define: INT_FAST16_FMTd="hd" define: INT_FAST16_FMTi="hi" define: INT_FAST16_MAX=32767 define: INT_FAST16_TYPE=short define: INT_FAST32_FMTd="d" define: INT_FAST32_FMTi="i" define: INT_FAST32_MAX=2147483647 define: INT_FAST32_TYPE=int define: INT_FAST64_FMTd="lld" define: INT_FAST64_FMTi="lli" define: INT_FAST64_MAX=9223372036854775807LL define: INT_FAST64_TYPE=long long int define: INT_FAST8_FMTd="hhd" define: INT_FAST8_FMTi="hhi" define: INT_FAST8_MAX=127 define: INT_FAST8_TYPE=signed char define: INT_LEAST16_FMTd="hd" define: INT_LEAST16_FMTi="hi" define: INT_LEAST16_MAX=32767 define: INT_LEAST16_TYPE=short define: INT_LEAST32_FMTd="d" define: INT_LEAST32_FMTi="i" define: INT_LEAST32_MAX=2147483647 define: INT_LEAST32_TYPE=int define: INT_LEAST64_FMTd="lld" define: INT_LEAST64_FMTi="lli" define: INT_LEAST64_MAX=9223372036854775807LL define: INT_LEAST64_TYPE=long long int define: INT_LEAST8_FMTd="hhd" define: INT_LEAST8_FMTi="hhi" define: INT_LEAST8_MAX=127 define: INT_LEAST8_TYPE=signed char define: INT_MAX=2147483647 define: LDBL_DECIMAL_DIG=21 define: LDBL_DENORM_MIN=3.64519953188247460253e-4951L define: LDBL_DIG=18 define: LDBL_EPSILON=1.08420217248550443401e-19L define: LDBL_HAS_DENORM=1 define: LDBL_HAS_INFINITY=1 define: LDBL_HAS_QUIET_NAN=1 define: LDBL_MANT_DIG=64 define: LDBL_MAX_10_EXP=4932 define: LDBL_MAX_EXP=16384 define: LDBL_MAX=1.18973149535723176502e+4932L define: LDBL_MIN_10_EXP=(-4931) define: LDBL_MIN_EXP=(-16381) define: LDBL_MIN=3.36210314311209350626e-4932L define: LITTLE_ENDIAN=1 define: LONG_LONG_MAX=9223372036854775807LL define: LONG_MAX=2147483647L define: MINGW32=1 define: MINGW64=1 define: MMX=1 define: MSVCRT=1 define: NO_INLINE=1 define: NO_MATH_INLINES=1 define: OBJC_BOOL_IS_BOOL=0 define: __OPENCL_MEMORY_SCOPE_ALL_SVM_DEVICES=3 define: OPENCL_MEMORY_SCOPE_DEVICE=2 define: OPENCL_MEMORY_SCOPE_SUB_GROUP=4 define: OPENCL_MEMORY_SCOPE_WORK_GROUP=1 define: OPENCL_MEMORY_SCOPE_WORK_ITEM=0 define: ORDER_BIG_ENDIAN=4321 define: ORDER_LITTLE_ENDIAN=1234 define: ORDER_PDP_ENDIAN=3412 define: PIC=2 define: POINTER_WIDTH=64 define: PRAGMA_REDEFINE_EXTNAME=1 define: PTRDIFF_FMTd="lld" define: PTRDIFF_FMTi="lli" define: PTRDIFF_MAX=9223372036854775807LL define: PTRDIFF_TYPE=long long int define: PTRDIFF_WIDTH=64 define: REGISTER_PREFIX= define: SCHAR_MAX=127 define: SEG_FS=1 define: SEG_GS=1 define: SEH=1 define: SHRT_MAX=32767 define: SIG_ATOMIC_MAX=2147483647 define: SIG_ATOMIC_WIDTH=32 define: SIZEOF_DOUBLE=8 define: SIZEOF_FLOAT128=16 define: SIZEOF_FLOAT=4 define: SIZEOF_INT128=16 define: SIZEOF_INT=4 define: SIZEOF_LONG_DOUBLE=16 define: SIZEOF_LONG_LONG=8 define: SIZEOF_LONG=4 define: SIZEOF_POINTER=8 define: SIZEOF_PTRDIFF_T=8 define: SIZEOF_SHORT=2 define: SIZEOF_SIZE_T=8 define: SIZEOF_WCHAR_T=2 define: SIZEOF_WINT_T=2 define: SIZE_FMTX="llX" define: SIZE_FMTo="llo" define: SIZE_FMTu="llu" define: SIZE_FMTx="llx" define: SIZE_MAX=18446744073709551615ULL define: SIZE_TYPE=long long unsigned int define: SIZE_WIDTH=64 define: SSE2_MATH=1 define: SSE2=1 define: SSE_MATH=1 define: SSE=1 define: STDCPP_DEFAULT_NEW_ALIGNMENT=16ULL define: STDCPP_THREADS=1 define: STDC_HOSTED=1 define: STDC_UTF_16=1 define: STDC_UTF_32=1 define: STDC=1 define: STRICT_ANSI=1 define: UINT16_C_SUFFIX= define: UINT16_FMTX="hX" define: UINT16_FMTo="ho" define: UINT16_FMTu="hu" define: UINT16_FMTx="hx" define: UINT16_MAX=65535 define: UINT16_TYPE=unsigned short define: UINT32_C_SUFFIX=U define: UINT32_FMTX="X" define: UINT32_FMTo="o" define: UINT32_FMTu="u" define: UINT32_FMTx="x" define: UINT32_MAX=4294967295U define: UINT32_TYPE=unsigned int define: UINT64_C_SUFFIX=ULL define: UINT64_FMTX="llX" define: UINT64_FMTo="llo" define: UINT64_FMTu="llu" define: UINT64_FMTx="llx" define: UINT64_MAX=18446744073709551615ULL define: UINT64_TYPE=long long unsigned int define: UINT8_C_SUFFIX= define: UINT8_FMTX="hhX" define: UINT8_FMTo="hho" define: UINT8_FMTu="hhu" define: UINT8_FMTx="hhx" define: UINT8_MAX=255 define: UINT8_TYPE=unsigned char define: UINTMAX_C_SUFFIX=ULL define: UINTMAX_FMTX="llX" define: UINTMAX_FMTo="llo" define: UINTMAX_FMTu="llu" define: UINTMAX_FMTx="llx" define: UINTMAX_MAX=18446744073709551615ULL define: UINTMAX_TYPE=long long unsigned int define: UINTMAX_WIDTH=64 define: UINTPTR_FMTX="llX" define: UINTPTR_FMTo="llo" define: UINTPTR_FMTu="llu" define: UINTPTR_FMTx="llx" define: UINTPTR_MAX=18446744073709551615ULL define: UINTPTR_TYPE=long long unsigned int define: UINTPTR_WIDTH=64 define: UINT_FAST16_FMTX="hX" define: UINT_FAST16_FMTo="ho" define: UINT_FAST16_FMTu="hu" define: UINT_FAST16_FMTx="hx" define: UINT_FAST16_MAX=65535 define: UINT_FAST16_TYPE=unsigned short define: UINT_FAST32_FMTX="X" define: UINT_FAST32_FMTo="o" define: UINT_FAST32_FMTu="u" define: UINT_FAST32_FMTx="x" define: UINT_FAST32_MAX=4294967295U define: UINT_FAST32_TYPE=unsigned int define: UINT_FAST64_FMTX="llX" define: UINT_FAST64_FMTo="llo" define: UINT_FAST64_FMTu="llu" define: UINT_FAST64_FMTx="llx" define: UINT_FAST64_MAX=18446744073709551615ULL define: UINT_FAST64_TYPE=long long unsigned int define: UINT_FAST8_FMTX="hhX" define: UINT_FAST8_FMTo="hho" define: UINT_FAST8_FMTu="hhu" define: UINT_FAST8_FMTx="hhx" define: UINT_FAST8_MAX=255 define: UINT_FAST8_TYPE=unsigned char define: UINT_LEAST16_FMTX="hX" define: UINT_LEAST16_FMTo="ho" define: UINT_LEAST16_FMTu="hu" define: UINT_LEAST16_FMTx="hx" define: UINT_LEAST16_MAX=65535 define: UINT_LEAST16_TYPE=unsigned short define: UINT_LEAST32_FMTX="X" define: UINT_LEAST32_FMTo="o" define: UINT_LEAST32_FMTu="u" define: UINT_LEAST32_FMTx="x" define: UINT_LEAST32_MAX=4294967295U define: UINT_LEAST32_TYPE=unsigned int define: UINT_LEAST64_FMTX="llX" define: UINT_LEAST64_FMTo="llo" define: UINT_LEAST64_FMTu="llu" define: UINT_LEAST64_FMTx="llx" define: UINT_LEAST64_MAX=18446744073709551615ULL define: UINT_LEAST64_TYPE=long long unsigned int define: UINT_LEAST8_FMTX="hhX" define: UINT_LEAST8_FMTo="hho" define: UINT_LEAST8_FMTu="hhu" define: UINT_LEAST8_FMTx="hhx" define: UINT_LEAST8_MAX=255 define: UINT_LEAST8_TYPE=unsigned char define: USER_LABEL_PREFIX= define: VERSION="Android (7284624, based on r416183b) Clang 12.0.5 (https://android.googlesource.com/toolchain/llvm-project c935d99d7cf2016289302412d708641d52d2f7ee)" define: WCHAR_MAX=65535 define: WCHAR_TYPE=unsigned short define: WCHAR_UNSIGNED=1 define: WCHAR_WIDTH=16 define: WIN32=1 define: WIN32=1 define: WIN64=1 define: WIN64=1 define: WINNT=1 define: WINNT=1 define: WINT_MAX=65535 define: WINT_TYPE=unsigned short define: WINT_UNSIGNED=1 define: WINT_WIDTH=16 define: amd64=1 define: amd64=1 define: cdecl=attribute((cdecl)) define: clang=1 define: clang_major=12 define: clang_minor=0 define: clang_patchlevel=5 define: clang_version="12.0.5 (https://android.googlesource.com/toolchain/llvm-project c935d99d7cf2016289302412d708641d52d2f7ee)" define: code_model_small=1 define: cplusplus=201402L define: declspec(a)=attribute((a)) define: fastcall=attribute((fastcall)) define: k8=1 define: k8=1 define: llvm=1 define: pascal=attribute((pascal)) define: pic=2 define: private_extern=extern define: seg_fs=attribute((address_space(257))) define: __seg_gs=attribute((address_space(256))) define: stdcall=attribute((stdcall)) define: thiscall=attribute((thiscall)) define: __tune_k8=1 define: x86_64=1 define: __x86_64=1 define: _cdecl=attribute((cdecl)) define: _fastcall=attribute((fastcall)) define: _pascal=attribute((pascal)) define: _stdcall=attribute((stdcall)) define: _thiscall=attribute((thiscall)) preinclude: d:/bug_test/.vscode/android_force_include.h other: --g++ other: --gnu_version=40201 other: --header_only_fallback stdver: c++14 intelliSenseMode: linux-gcc-x64 Queueing IntelliSense update for files in translation unit of: D:\bug_test.vscode\android_force_include.h cpptools/finishUpdateSquiggles Error squiggle count: 0 Update IntelliSense time (sec): 0.615 cpptools/getFoldingRanges: D:\bug_test.vscode\android_force_include.h (id: 7) cpptools/getCodeActions: D:\bug_test\main.cpp (id: 8) textDocument/didOpen: D:\bug_test\main.cpp cpptools/textEditorSelectionChange cpptools/getDocumentSymbols: D:\bug_test\main.cpp (id: 9) cpptools/textEditorSelectionChange cpptools/getSemanticTokens: D:\bug_test\main.cpp (id: 10) cpptools/activeDocumentChange: D:\bug_test\main.cpp cpptools/getDocumentSymbols Attempting to get defaults from C++ compiler in "compilerPath" property: 'C:/Users/ngero/AppData/Local/Android/Sdk/ndk/23.0.7599858/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe' sending compilation args for D:\bug_test\main.cpp include: C:\USERS\NGERO\APPDATA\LOCAL\ANDROID\SDK\NDK\23.0.7599858\SOURCES\CXX-STL\LLVM-LIBC++\INCLUDE include: C:\USERS\NGERO\APPDATA\LOCAL\ANDROID\SDK\NDK\23.0.7599858\SOURCES\CXX-STL\LLVM-LIBC++ABI\INCLUDE include: C:\USERS\NGERO\APPDATA\LOCAL\ANDROID\SDK\NDK\23.0.7599858\TOOLCHAINS\LLVM\PREBUILT\WINDOWS-X86_64\INCLUDE\C++ include: C:\USERS\NGERO\APPDATA\LOCAL\ANDROID\SDK\NDK\23.0.7599858\TOOLCHAINS\LLVM\PREBUILT\WINDOWS-X86_64\LIB64\CLANG\12.0.5\INCLUDE include: C:\USERS\NGERO\APPDATA\LOCAL\ANDROID\SDK\NDK\23.0.7599858\TOOLCHAINS\LLVM\PREBUILT\WINDOWS-X86_64\INCLUDE define: _WIN32=1 define: _WIN64=1 define: ATOMIC_ACQUIRE=2 define: ATOMIC_ACQ_REL=4 define: ATOMIC_CONSUME=1 define: ATOMIC_RELAXED=0 define: ATOMIC_RELEASE=3 define: ATOMIC_SEQ_CST=5 define: BIGGEST_ALIGNMENT=16 define: BYTE_ORDER=ORDER_LITTLE_ENDIAN define: CHAR16_TYPE=unsigned short define: CHAR32_TYPE=unsigned int define: CHAR_BIT=8 define: CLANG_ATOMIC_BOOL_LOCK_FREE=2 define: CLANG_ATOMIC_CHAR16_T_LOCK_FREE=2 define: CLANG_ATOMIC_CHAR32_T_LOCK_FREE=2 define: CLANG_ATOMIC_CHAR_LOCK_FREE=2 define: CLANG_ATOMIC_INT_LOCK_FREE=2 define: CLANG_ATOMIC_LLONG_LOCK_FREE=2 define: CLANG_ATOMIC_LONG_LOCK_FREE=2 define: CLANG_ATOMIC_POINTER_LOCK_FREE=2 define: CLANG_ATOMIC_SHORT_LOCK_FREE=2 define: __CLANG_ATOMIC_WCHAR_T_LOCK_FREE=2 define: CONSTANT_CFSTRINGS=1 define: DBL_DECIMAL_DIG=17 define: DBL_DENORM_MIN=4.9406564584124654e-324 define: DBL_DIG=15 define: DBL_EPSILON=2.2204460492503131e-16 define: DBL_HAS_DENORM=1 define: DBL_HAS_INFINITY=1 define: DBL_HAS_QUIET_NAN=1 define: DBL_MANT_DIG=53 define: DBL_MAX_10_EXP=308 define: DBL_MAX_EXP=1024 define: DBL_MAX=1.7976931348623157e+308 define: DBL_MIN_10_EXP=(-307) define: DBL_MIN_EXP=(-1021) define: DBL_MIN=2.2250738585072014e-308 define: DECIMAL_DIG=LDBL_DECIMAL_DIG define: DEPRECATED=1 define: EXCEPTIONS=1 define: FINITE_MATH_ONLY=0 define: FLT_DECIMAL_DIG=9 define: FLT_DENORM_MIN=1.40129846e-45F define: FLT_DIG=6 define: FLT_EPSILON=1.19209290e-7F define: FLT_EVAL_METHOD=0 define: FLT_HAS_DENORM=1 define: FLT_HAS_INFINITY=1 define: FLT_HAS_QUIET_NAN=1 define: FLT_MANT_DIG=24 define: FLT_MAX_10_EXP=38 define: FLT_MAX_EXP=128 define: FLT_MAX=3.40282347e+38F define: FLT_MIN_10_EXP=(-37) define: FLT_MIN_EXP=(-125) define: FLT_MIN=1.17549435e-38F define: FLT_RADIX=2 define: FXSR=1 define: GCC_ASM_FLAG_OUTPUTS=1 define: GCC_ATOMIC_BOOL_LOCK_FREE=2 define: GCC_ATOMIC_CHAR16_T_LOCK_FREE=2 define: __GCC_ATOMIC_CHAR32_T_LOCK_FREE=2 define: GCC_ATOMIC_CHAR_LOCK_FREE=2 define: GCC_ATOMIC_INT_LOCK_FREE=2 define: GCC_ATOMIC_LLONG_LOCK_FREE=2 define: GCC_ATOMIC_LONG_LOCK_FREE=2 define: GCC_ATOMIC_POINTER_LOCK_FREE=2 define: GCC_ATOMIC_SHORT_LOCK_FREE=2 define: GCC_ATOMIC_TEST_AND_SET_TRUEVAL=1 define: GCC_ATOMIC_WCHAR_T_LOCK_FREE=2 define: GCC_HAVE_SYNC_COMPARE_AND_SWAP_1=1 define: GCC_HAVE_SYNC_COMPARE_AND_SWAP_2=1 define: GCC_HAVE_SYNC_COMPARE_AND_SWAP_4=1 define: GCC_HAVE_SYNC_COMPARE_AND_SWAP_8=1 define: GNUC_GNU_INLINE=1 define: __GNUC_MINOR=2 define: GNUC_PATCHLEVEL=1 define: GNUC=4 define: GNUG=4 define: GXX_ABI_VERSION=1002 define: GXX_EXPERIMENTAL_CXX0X=1 define: __GXX_RTTI=1 define: GXX_WEAK=1 define: INT16_C_SUFFIX= define: INT16_FMTd="hd" define: INT16_FMTi="hi" define: INT16_MAX=32767 define: INT16_TYPE=short define: INT32_C_SUFFIX= define: INT32_FMTd="d" define: INT32_FMTi="i" define: INT32_MAX=2147483647 define: INT32_TYPE=int define: INT64_C_SUFFIX=LL define: INT64_FMTd="lld" define: INT64_FMTi="lli" define: INT64_MAX=9223372036854775807LL define: INT64_TYPE=long long int define: INT8_C_SUFFIX= define: INT8_FMTd="hhd" define: INT8_FMTi="hhi" define: INT8_MAX=127 define: INT8_TYPE=signed char define: INTMAX_C_SUFFIX=LL define: INTMAX_FMTd="lld" define: INTMAX_FMTi="lli" define: INTMAX_MAX=9223372036854775807LL define: INTMAX_TYPE=long long int define: INTMAX_WIDTH=64 define: INTPTR_FMTd="lld" define: INTPTR_FMTi="lli" define: INTPTR_MAX=9223372036854775807LL define: INTPTR_TYPE=long long int define: INTPTR_WIDTH=64 define: INT_FAST16_FMTd="hd" define: INT_FAST16_FMTi="hi" define: INT_FAST16_MAX=32767 define: INT_FAST16_TYPE=short define: INT_FAST32_FMTd="d" define: INT_FAST32_FMTi="i" define: INT_FAST32_MAX=2147483647 define: INT_FAST32_TYPE=int define: INT_FAST64_FMTd="lld" define: INT_FAST64_FMTi="lli" define: INT_FAST64_MAX=9223372036854775807LL define: INT_FAST64_TYPE=long long int define: INT_FAST8_FMTd="hhd" define: INT_FAST8_FMTi="hhi" define: INT_FAST8_MAX=127 define: INT_FAST8_TYPE=signed char define: INT_LEAST16_FMTd="hd" define: INT_LEAST16_FMTi="hi" define: INT_LEAST16_MAX=32767 define: INT_LEAST16_TYPE=short define: INT_LEAST32_FMTd="d" define: INT_LEAST32_FMTi="i" define: INT_LEAST32_MAX=2147483647 define: INT_LEAST32_TYPE=int define: INT_LEAST64_FMTd="lld" define: INT_LEAST64_FMTi="lli" define: INT_LEAST64_MAX=9223372036854775807LL define: INT_LEAST64_TYPE=long long int define: INT_LEAST8_FMTd="hhd" define: INT_LEAST8_FMTi="hhi" define: INT_LEAST8_MAX=127 define: INT_LEAST8_TYPE=signed char define: INT_MAX=2147483647 define: LDBL_DECIMAL_DIG=21 define: LDBL_DENORM_MIN=3.64519953188247460253e-4951L define: LDBL_DIG=18 define: LDBL_EPSILON=1.08420217248550443401e-19L define: LDBL_HAS_DENORM=1 define: LDBL_HAS_INFINITY=1 define: LDBL_HAS_QUIET_NAN=1 define: LDBL_MANT_DIG=64 define: LDBL_MAX_10_EXP=4932 define: LDBL_MAX_EXP=16384 define: LDBL_MAX=1.18973149535723176502e+4932L define: LDBL_MIN_10_EXP=(-4931) define: LDBL_MIN_EXP=(-16381) define: LDBL_MIN=3.36210314311209350626e-4932L define: LITTLE_ENDIAN=1 define: LONG_LONG_MAX=9223372036854775807LL define: LONG_MAX=2147483647L define: MINGW32=1 define: MINGW64=1 define: MMX=1 define: MSVCRT=1 define: NO_INLINE=1 define: NO_MATH_INLINES=1 define: OBJC_BOOL_IS_BOOL=0 define: __OPENCL_MEMORY_SCOPE_ALL_SVM_DEVICES=3 define: OPENCL_MEMORY_SCOPE_DEVICE=2 define: OPENCL_MEMORY_SCOPE_SUB_GROUP=4 define: OPENCL_MEMORY_SCOPE_WORK_GROUP=1 define: OPENCL_MEMORY_SCOPE_WORK_ITEM=0 define: ORDER_BIG_ENDIAN=4321 define: ORDER_LITTLE_ENDIAN=1234 define: ORDER_PDP_ENDIAN=3412 define: PIC=2 define: POINTER_WIDTH=64 define: PRAGMA_REDEFINE_EXTNAME=1 define: PTRDIFF_FMTd="lld" define: PTRDIFF_FMTi="lli" define: PTRDIFF_MAX=9223372036854775807LL define: PTRDIFF_TYPE=long long int define: PTRDIFF_WIDTH=64 define: REGISTER_PREFIX= define: SCHAR_MAX=127 define: SEG_FS=1 define: SEG_GS=1 define: SEH=1 define: SHRT_MAX=32767 define: SIG_ATOMIC_MAX=2147483647 define: SIG_ATOMIC_WIDTH=32 define: SIZEOF_DOUBLE=8 define: SIZEOF_FLOAT128=16 define: SIZEOF_FLOAT=4 define: SIZEOF_INT128=16 define: SIZEOF_INT=4 define: SIZEOF_LONG_DOUBLE=16 define: SIZEOF_LONG_LONG=8 define: SIZEOF_LONG=4 define: SIZEOF_POINTER=8 define: SIZEOF_PTRDIFF_T=8 define: SIZEOF_SHORT=2 define: SIZEOF_SIZE_T=8 define: SIZEOF_WCHAR_T=2 define: SIZEOF_WINT_T=2 define: SIZE_FMTX="llX" define: SIZE_FMTo="llo" define: SIZE_FMTu="llu" define: SIZE_FMTx="llx" define: SIZE_MAX=18446744073709551615ULL define: SIZE_TYPE=long long unsigned int define: SIZE_WIDTH=64 define: SSE2_MATH=1 define: SSE2=1 define: SSE_MATH=1 define: SSE=1 define: STDCPP_DEFAULT_NEW_ALIGNMENT=16ULL define: STDCPP_THREADS=1 define: STDC_HOSTED=1 define: STDC_UTF_16=1 define: STDC_UTF_32=1 define: STDC=1 define: STRICT_ANSI=1 define: UINT16_C_SUFFIX= define: UINT16_FMTX="hX" define: UINT16_FMTo="ho" define: UINT16_FMTu="hu" define: UINT16_FMTx="hx" define: UINT16_MAX=65535 define: UINT16_TYPE=unsigned short define: UINT32_C_SUFFIX=U define: UINT32_FMTX="X" define: UINT32_FMTo="o" define: UINT32_FMTu="u" define: UINT32_FMTx="x" define: UINT32_MAX=4294967295U define: UINT32_TYPE=unsigned int define: UINT64_C_SUFFIX=ULL define: UINT64_FMTX="llX" define: UINT64_FMTo="llo" define: UINT64_FMTu="llu" define: UINT64_FMTx="llx" define: UINT64_MAX=18446744073709551615ULL define: UINT64_TYPE=long long unsigned int define: UINT8_C_SUFFIX= define: UINT8_FMTX="hhX" define: UINT8_FMTo="hho" define: UINT8_FMTu="hhu" define: UINT8_FMTx="hhx" define: UINT8_MAX=255 define: UINT8_TYPE=unsigned char define: UINTMAX_C_SUFFIX=ULL define: UINTMAX_FMTX="llX" define: UINTMAX_FMTo="llo" define: UINTMAX_FMTu="llu" define: UINTMAX_FMTx="llx" define: UINTMAX_MAX=18446744073709551615ULL define: UINTMAX_TYPE=long long unsigned int define: UINTMAX_WIDTH=64 define: UINTPTR_FMTX="llX" define: UINTPTR_FMTo="llo" define: UINTPTR_FMTu="llu" define: UINTPTR_FMTx="llx" define: UINTPTR_MAX=18446744073709551615ULL define: UINTPTR_TYPE=long long unsigned int define: UINTPTR_WIDTH=64 define: UINT_FAST16_FMTX="hX" define: UINT_FAST16_FMTo="ho" define: UINT_FAST16_FMTu="hu" define: UINT_FAST16_FMTx="hx" define: UINT_FAST16_MAX=65535 define: UINT_FAST16_TYPE=unsigned short define: UINT_FAST32_FMTX="X" define: UINT_FAST32_FMTo="o" define: UINT_FAST32_FMTu="u" define: UINT_FAST32_FMTx="x" define: UINT_FAST32_MAX=4294967295U define: UINT_FAST32_TYPE=unsigned int define: UINT_FAST64_FMTX="llX" define: UINT_FAST64_FMTo="llo" define: UINT_FAST64_FMTu="llu" define: UINT_FAST64_FMTx="llx" define: UINT_FAST64_MAX=18446744073709551615ULL define: UINT_FAST64_TYPE=long long unsigned int define: UINT_FAST8_FMTX="hhX" define: UINT_FAST8_FMTo="hho" define: UINT_FAST8_FMTu="hhu" define: UINT_FAST8_FMTx="hhx" define: UINT_FAST8_MAX=255 define: UINT_FAST8_TYPE=unsigned char define: UINT_LEAST16_FMTX="hX" define: UINT_LEAST16_FMTo="ho" define: UINT_LEAST16_FMTu="hu" define: UINT_LEAST16_FMTx="hx" define: UINT_LEAST16_MAX=65535 define: UINT_LEAST16_TYPE=unsigned short define: UINT_LEAST32_FMTX="X" define: UINT_LEAST32_FMTo="o" define: UINT_LEAST32_FMTu="u" define: UINT_LEAST32_FMTx="x" define: UINT_LEAST32_MAX=4294967295U define: UINT_LEAST32_TYPE=unsigned int define: UINT_LEAST64_FMTX="llX" define: UINT_LEAST64_FMTo="llo" define: UINT_LEAST64_FMTu="llu" define: UINT_LEAST64_FMTx="llx" define: UINT_LEAST64_MAX=18446744073709551615ULL define: UINT_LEAST64_TYPE=long long unsigned int define: UINT_LEAST8_FMTX="hhX" define: UINT_LEAST8_FMTo="hho" define: UINT_LEAST8_FMTu="hhu" define: UINT_LEAST8_FMTx="hhx" define: UINT_LEAST8_MAX=255 define: UINT_LEAST8_TYPE=unsigned char define: USER_LABEL_PREFIX= define: VERSION="Android (7284624, based on r416183b) Clang 12.0.5 (https://android.googlesource.com/toolchain/llvm-project c935d99d7cf2016289302412d708641d52d2f7ee)" define: WCHAR_MAX=65535 define: WCHAR_TYPE=unsigned short define: WCHAR_UNSIGNED=1 define: WCHAR_WIDTH=16 define: WIN32=1 define: WIN32=1 define: WIN64=1 define: WIN64=1 define: WINNT=1 define: WINNT=1 define: WINT_MAX=65535 define: WINT_TYPE=unsigned short define: WINT_UNSIGNED=1 define: WINT_WIDTH=16 define: amd64=1 define: amd64=1 define: cdecl=attribute((cdecl)) define: clang=1 define: clang_major=12 define: clang_minor=0 define: clang_patchlevel=5 define: clang_version="12.0.5 (https://android.googlesource.com/toolchain/llvm-project c935d99d7cf2016289302412d708641d52d2f7ee)" define: code_model_small=1 define: cplusplus=201402L define: declspec(a)=attribute((a)) define: fastcall=attribute((fastcall)) define: k8=1 define: k8=1 define: llvm=1 define: pascal=attribute((pascal)) define: pic=2 define: private_extern=extern define: seg_fs=attribute((address_space(257))) define: __seg_gs=attribute((address_space(256))) define: stdcall=attribute((stdcall)) define: thiscall=attribute((thiscall)) define: __tune_k8=1 define: x86_64=1 define: __x86_64=1 define: _cdecl=attribute((cdecl)) define: _fastcall=attribute((fastcall)) define: _pascal=attribute((pascal)) define: _stdcall=attribute((stdcall)) define: _thiscall=attribute((thiscall)) define: _FORTIFY_SOURCE=2 define: ANDROID other: --g++ other: --gnu_version=40201 stdver: c++14 intelliSenseMode: linux-gcc-x64 Checking for syntax errors: D:\bug_test\main.cpp Queueing IntelliSense update for files in translation unit of: D:\bug_test\main.cpp cpptools/getCodeActions: D:\bug_test\main.cpp (id: 11) cpptools/getFoldingRanges: D:\bug_test\main.cpp (id: 12) cpptools/finishUpdateSquiggles Error squiggle count: 4 Error squiggles will be disabled in: file:///D%3A/bug_test/main.cpp Update IntelliSense time (sec): 0.552 cpptools/getFoldingRanges: D:\bug_test\main.cpp (id: 13) cpptools/getCodeActions: D:\bug_test\main.cpp (id: 14)


**Screenshots**
<!-- If applicable, add screenshots to help explain your problem. -->
![image](https://user-images.githubusercontent.com/44300132/157999000-13238a28-9a16-49e9-9b43-e001dee9806d.png)
sean-mcmanus commented 2 years ago

The forcedInclude is not used if you have compileCommands set and your compileCommands doesn't specify to use that forcedInclude. Is that the issue?

ngerow2025 commented 2 years ago

That fixed it, thank you so much, I spent hours trying to find solutions to this. For anyone else who gets this issue, I fixed by adding -include path/to/force/include.h to my compile command in my compile_commands.json