microsoft / microsoft/vscode-cpptools
IntelliSense for clang-cl produces incorrect error with boost::function
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 6.2k
- Forks
- 1.7k
- Ø Merge
- 14 Std. 46 Min.
- Gemergte PRs (30 T.)
- 61
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduziere die Diagnose mit der bereitgestellten test.cpp, Boost 1.73.0 und .vscode/c_cpp_properties.json unter Verwendung von clang-cl.exe und vergleiche sie anschließend mit clang.exe. Verfolge die Verarbeitung der Einstellung compilerPath durch den IntelliSense-Sprachdienst; abgeschlossen ist die Aufgabe, wenn das boost::function-Beispiel keinen Problems-window-Fehler erzeugt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- cpp, vscode
- Bereich
- compilers, tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 35/100