microsoft / microsoft/vscode-cpptools
IntelliSense for clang-cl produces incorrect error with boost::function
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 6.2k
- フォーク
- 1.7k
- 平均マージ
- 14時間 46分
- マージ済み PR(30日)
- 61
説明
Type: LanguageService
Describe the bug
- OS and Version: Windows 10 Pro 1909
- VS Code Version: 1.51.0
- C/C++ Extension Version: 1.1.0
When I specify the path to clang-cl.exe to compilerPath property of c_cpp_properties.json, incorrect errors appear in the problems window. Using boost::function is an easy way to reproduce it.
Steps to reproduce
- Make sure you have installed Clang 9.0.0 for Windows
- Download Boost 1.73.0 from https://www.boost.org and extract it somewhere
- Create a directory
- Put test.cpp in the directory
#include <boost/function.hpp>
void f(const boost::function<void()> &x) {
x();
}
- Put .vscode/c_cpp_properties.json
{
"version": 4,
"configurations": [
{
"name": "Clang",
"compilerPath": "C:/Program Files/LLVM/bin/clang-cl.exe",
"includePath": [
"C:/your/path/to/boost_1_73_0"
]
}
]
}
- Open the directory with VSCode
- Open test.cpp with the editor
Expected behavior
No error is shown in the problems window. You can get this result by specifying clang.exe instead of clang-cl.exe.
Actual behavior
The following error is shown in the problems window.
call of an object of a class type without appropriate operator() or conversion functions to pointer-to-function type
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
提供された test.cpp、Boost 1.73.0、.vscode/c_cpp_properties.json を使い、clang-cl.exe で診断を再現してから、clang.exe と比較します。IntelliSense 言語サービスによる compilerPath 設定の処理を追跡します。boost::function の例で Problems-window エラーが発生しなければ完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- cpp, vscode
- 領域
- compilers, tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 35/100