I'm wondering How clang works on windows system.
I followed tutorial on this website and succeeded building binary.
here's my question.
When I build project as Debug Mode, it makes .exe, .pdb, .ilk.
Debugging also works fine too but when I step in some function (ex: std::vector<>::push_back), It finds vector source file on VisualStudio's.
I think, It should've not find source file because implementation of push_back should be belong to libclang.
Why this happening?
Testing Code is below
auto answer = [](int n)
{
return 32 + n;
};
constexpr int response = answer(10);
and build command is
C:/Program Files/LLVM/bin/clang++.exe' -std=c++2a ./example_1.cpp -o example_1.exe --debug
FYI My system has VisualStudio 2015, and LLVM 9.0. vs code configuration is
/* c_cpp_properties.json */
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"C:/Program Files/LLVM/include/llvm-c",
"C:/Program Files/LLVM/include/clang-c"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "8.1",
"compilerPath": "\"C:/Program Files/LLVM/bin/clang++.exe\"",
"cStandard": "c11",
"cppStandard": "c++20",
"intelliSenseMode": "clang-x64"
}
],
"version": 4
}
/* launch.json */
{
"version": "0.2.0",
"configurations": [
{
"name": "(Windows) Launch",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/example_1.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true
}
]
}
}
/* tasks.json */
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "clang++.exe build active file",
"command": "C:/Program Files/LLVM/bin/clang++.exe",
"args": [
"-std=c++2a",
"./example_1.cpp",
"-o",
"example_1.exe",
"--debug"
],
"group": "build"
}
]
}