Repository: vscode
Issue: msCompile problem matcher does not match note: lines which are important for context
Labels: bug,tasks


Type: <b>Bug</b>

If the following c++ compile output is generated

```
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\xutility(145): error C2672: 'std::construct_at': no matching overloaded function found
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\memory(2006): note: see reference to function template instantiation 'void std::_Construct_in_place<_Ty,const std::vector<mw::Rotary::LayerLoopWrapped2D,std::allocator<mw::Rotary::LayerLoopWrapped2D>>,const mw::Rotary::ConeLayer::CPtr&>(_Ty &,const std::vector<mw::Rotary::LayerLoopWrapped2D,std::allocator<mw::Rotary::LayerLoopWrapped2D>> &&,const mw::Rotary::ConeLayer::CPtr &) noexcept(false)' being compiled
        with
        [
            _Ty=mw::Rotary::SlicerResult
        ]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\memory(2725): note: see reference to function template instantiation 'std::_Ref_count_obj2<_Ty>::_Ref_count_obj2<const std::vector<mw::Rotary::LayerLoopWrapped2D,std::allocator<mw::Rotary::LayerLoopWrapped2D>>,const mw::Rotary::ConeLayer::CPtr&>(const std::vector<mw::Rotary::LayerLoopWrapped2D,std::allocator<mw::Rotary::LayerLoopWrapped2D>> &&,const mw::Rotary::ConeLayer::CPtr &)' being compiled
        with
        [
            _Ty=mw::Rotary::SlicerResult
        ]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\memory(2726): note: see reference to function template instantiation 'std::_Ref_count_obj2<_Ty>::_Ref_count_obj2<const std::vector<mw::Rotary::LayerLoopWrapped2D,std::allocator<mw::Rotary::LayerLoopWrapped2D>>,const mw::Rotary::ConeLayer::CPtr&>(const std::vector<mw::Rotary::LayerLoopWrapped2D,std::allocator<mw::Rotary::LayerLoopWrapped2D>> &&,const mw::Rotary::ConeLayer::CPtr &)' being compiled
        with
        [
            _Ty=mw::Rotary::SlicerResult
        ]
D:\\checkouts\\moduleworks\\worktrees\\wt2\\dev\\libraries\\ToolpathStrategies\\Rotary\\src\\Slicer.cpp(134): note: see reference to function template instantiation 'std::shared_ptr<mw::Rotary::SlicerResult> std::make_shared<mw::Rotary::SlicerResult,const std::vector<mw::Rotary::LayerLoopWrapped2D,std::allocator<mw::Rotary::LayerLoopWrapped2D>>,const mw::Rotary::ConeLayer::CPtr&>(const std::vector<mw::Rotary::LayerLoopWrapped2D,std::allocator<mw::Rotary::LayerLoopWrapped2D>> &&,const mw::Rotary::ConeLayer::CPtr &)' being compiled
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\xutility(145): error C2783: '_Ty *std::construct_at(_Ty *const ,_Types &&...) noexcept(<expr>)': could not deduce template argument for '<unnamed-symbol>'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\xutility(134): note: see declaration of 'std::construct_at'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\xutility(149): error C2661: 'mw::Rotary::SlicerResult::SlicerResult': no overloaded function takes 2 arguments     
[4/87] Building CXX object libraries\ToolpathStrategies\Rotary\CMakeFiles\Rotary.dir\src\ConfigFactory.cpp.obj
FAILED: libraries/ToolpathStrategies/Rotary/CMakeFiles/Rotary.dir/src/ConfigFactory.cpp.obj
```

only 

```json
[{
	"resource": "/c:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/include/xutility",
	"owner": "msCompile",
	"code": "C2783",
	"severity": 8,
	"message": "'_Ty *std::construct_at(_Ty *const ,_Types &&...) noexcept(<expr>)': could not deduce template argument for '<unnamed-symbol>'",
	"source": "cpp",
	"startLineNumber": 145,
	"startColumn": 1,
	"endLineNumber": 145,
	"endColumn": 2147483647
},{
	"resource": "/c:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/include/xutility",
	"owner": "msCompile",
	"code": "C2672",
	"severity": 8,
	"message": "'std::construct_at': no matching overloaded function found",
	"source": "cpp",
	"startLineNumber": 145,
	"startColumn": 1,
	"endLineNumber": 145,
	"endColumn": 2147483647
}]
```

is returned to the problems window. However the critical context of the error is

```
D:\\checkouts\\moduleworks\\worktrees\\wt2\\dev\\libraries\\ToolpathStrategies\\Rotary\\src\\Slicer.cpp(134): note: see reference to function template instantiation 'std::shared_ptr<mw::Rotary::SlicerResult> std::make_shared<mw::Rotary::SlicerResult,const std::vector<mw::Rotary::LayerLoopWrapped2D,std::allocator<mw::Rotary::LayerLoopWrapped2D>>,const mw::Rotary::ConeLayer::CPtr&>(const std::vector<mw::Rotary::LayerLoopWrapped2D,std::allocator<mw::Rotary::LayerLoopWrapped2D>> &&,const mw::Rotary::ConeLayer::CPtr &)' being compiled
```

which is where the true error occurs.  The problem matcher should match ``note:`` tags as well to collect this

VS Code version: Code 1.87.2 (863d2581ecda6849923a2118d93a088b0745d9d6, 2024-03-08T15:20:17.278Z)
OS version: Windows_NT x64 10.0.22631
Modes:

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|AMD Ryzen 9 5900X 12-Core Processor             (24 x 3700)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: enabled_on<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_graphite: disabled_off<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled|
|Load (avg)|undefined|
|Memory (System)|63.93GB (43.09GB free)|
|Process Argv|..\\dev\\ --crash-reporter-id 8e0f3da2-bd7f-4547-b593-29b86ad0a63e|
|Screen Reader|no|
|VM|0%|
</details><details><summary>Extensions (57)</summary>

Extension|Author (truncated)|Version
---|---|---
Bookmarks|ale|13.5.0
vite|ant|0.2.5
ast-grep-vscode|ast|0.0.9
vscode-django|bat|1.14.0
doxdocgen|csc|1.4.0
vscode-eslint|dba|2.4.2
python-environment-manager|don|1.2.4
python-extension-pack|don|1.7.0
gitlens|eam|14.4.0
vscode-npm-script|eg2|0.3.29
prettier-vscode|esb|10.1.0
dotnet-test-explorer|for|0.7.8
copilot|Git|1.177.0
copilot-chat|Git|0.13.1
vscode-test-explorer|hbe|2.21.1
debug-visualizer|hed|2.4.0
better-cpp-syntax|jef|1.17.2
vsc-python-indent|Kev|1.18.0
vscode-docker|ms-|1.29.0
csharp|ms-|2.7.25
vscode-dotnet-runtime|ms-|1.8.1
isort|ms-|2023.10.1
python|ms-|2023.22.1
vscode-pylance|ms-|2023.11.10
jupyter|ms-|2023.9.1102792234
jupyter-keymap|ms-|1.1.2
remote-containers|ms-|0.338.1
remote-ssh|ms-|0.106.5
remote-ssh-edit|ms-|0.86.0
remote-wsl|ms-|0.81.8
vscode-remote-extensionpack|ms-|0.24.0
cmake-tools|ms-|1.17.17
cpptools|ms-|1.20.1
cpptools-extension-pack|ms-|1.3.0
makefile-tools|ms-|0.7.0
powershell|ms-|2023.8.0
remote-explorer|ms-|0.4.1
remote-server|ms-|1.4.3
test-adapter-converter|ms-|0.1.8
vscode-speech|ms-|0.6.0
vsliveshare|ms-|1.0.5905
autodocstring|njp|0.6.1
parse-tree|pok|0.28.1
svelte-extractor|pro|0.0.3
vscode-xml|red|0.26.1
code-spell-checker|str|3.0.1
svelte-vscode|sve|108.2.2
textual-syntax-highlighter|Tex|1.1.0
msbuild-project-tools|tin|0.4.9
cmake|twx|0.0.17
vscode-lldb|vad|1.10.0
intellicode-api-usage-examples|Vis|0.2.8
vscodeintellicode|Vis|1.2.30
vim|vsc|1.26.2
debug|web|0.26.1
jinja|who|0.0.8
markdown-all-in-one|yzh|3.6.2

(1 theme extensions excluded)

</details><details>
<summary>A/B Experiments</summary>

```
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscorecescf:30445987
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:30899288
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
2e7ec940:31000449
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
d34g3935:30971562
fegfb526:30981948
bg6jg535:30979843
ccp2r3:30993541
dsvsc020:30976470
pythonait:31006305
jchc7451:30973076
gee8j676:31009558
dsvsc021:30996838
9c06g630:31013171

```

</details>

<!-- generated by issue reporter -->