IntelliSense internal error 1504 on malformed enum constructor declaration
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 30/100
Rechercherichtung
Reproduce with the four-line repro.cpp (enum A { B, C, D }; followed by A(std::string s) {}) in a fresh workspace, with C_Cpp.loggingLevel set to Debug so the IntelliSense log shows the failure. The internal error 1504 comes from the native IntelliSense parser, so first locate where that error code is raised and what declaration state triggers it. Done looks like IntelliSense emitting ordinary syntax diagnostics for the malformed declaration instead of an internal error, with no regression in enum handling tests.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Environment
- OS and Version: macOS 26.6.2 (25G83), Apple M5 / ARM64; local
- VS Code Version: 1.138.0 ARM64
- C/C++ Extension Version: Microsoft C/C++ 1.34.4 (darwin-arm64)
- If using SSH remote, specify OS of remote machine: N/A
Bug Summary and Steps to Reproduce
Bug Summary:
The following C++ program produces an internal error on a fresh install of vscode in the above environment.
#include <string>
enum A { B, C, D };
A(std::string s) {}
Expected: ordinary syntax diagnostics for this invalid declaration without an internal error
Configuration and Logs
c_cpp_properties.json:
{
"configurations": [
{
"name": "Mac",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"cStandard": "c17",
"intelliSenseMode": "macos-clang-arm64"
}
],
"version": 4
}
Diagnostics:
-------- Diagnostics - 10/4/2026, 7:14:27 PM
Version: 1.34.4
Current Configuration:
{
"name": "Mac",
"includePath": [
"/var/folders/_r/b4g_tw1j3tq6b46wzlwc_8h00000gn/T/cpptools-repro-2d1rjnrn/workspace/**"
],
"defines": [],
"cStandard": "c17",
"intelliSenseMode": "macos-clang-arm64",
"compilerPathIsExplicit": true,
"cStandardIsExplicit": true,
"cppStandardIsExplicit": true,
"intelliSenseModeIsExplicit": true,
"recursiveIncludesPriorityIsExplicit": false,
"recursiveIncludesOrderIsExplicit": false,
"cppStandard": "c++20",
"mergeConfigurations": false,
"recursiveIncludes": {},
"compilerPath": "/opt/homebrew/opt/llvm/bin/clang++",
"browse": {
"limitSymbolsToIncludedHeaders": true
}
}
Modified Settings:
{
"C_Cpp.default.compilerPath": "/opt/homebrew/opt/llvm/bin/clang++",
"C_Cpp.default.cppStandard": "c++20",
"C_Cpp.loggingLevel": "Debug"
}
Additional Tracked Settings:
{
"editorTabSize": 4,
"editorInsertSpaces": true,
"editorAutoClosingBrackets": "languageDefined",
"filesEncoding": "utf8",
"filesAssociations": {},
"filesExclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
"**/Thumbs.db": true
},
"filesAutoSaveAfterDelay": false,
"editorInlayHintsEnabled": true,
"editorParameterHintsEnabled": true,
"searchExclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/*.code-search": true
},
"workbenchSettingsEditor": "ui"
}
cpptools version (native): 1.34.3.0
Current database path: /Users/elliotmiller/Library/Caches/vscode-cpptools/510a4a88be99a8a17a93e2b81192563e/.browse.VC.db
Translation Unit Mappings:
[ /var/folders/_r/b4g_tw1j3tq6b46wzlwc_8h00000gn/T/cpptools-repro-2d1rjnrn/workspace/repro.cpp - source TU]:
Translation Unit Configurations:
[ /var/folders/_r/b4g_tw1j3tq6b46wzlwc_8h00000gn/T/cpptools-repro-2d1rjnrn/workspace/repro.cpp ]
Process ID: 51480
Memory Usage: 100 MB
Compiler Path: /opt/homebrew/opt/llvm/bin/clang++
Language: C++
Include Paths:
system include: /opt/homebrew/Cellar/llvm/23.1.0/include/c++/v1
system include: /opt/homebrew/Cellar/llvm/23.1.0/lib/clang/23/include
system include: /Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk/usr/include
system framework search path (default): /Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk/System/Library/Frameworks
system framework search path (default): /Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk/System/Library/SubFrameworks
include (recursive): /var/folders/_r/b4g_tw1j3tq6b46wzlwc_8h00000gn/T/cpptools-repro-2d1rjnrn/workspace
Standard Version: c++20
IntelliSense Mode: macos-clang-arm64
Other Flags:
--clang
--clang_version=230100
Total Memory Usage: 100 MB
Other Extensions
I repro'd this in a fresh install of vscode with only the C/C++ extension installed
Additional context
No response
- Vorherrschende Sprache
- TypeScript
- Sterne
- 6.2k
- Forks
- 1.7k
- Ø Merge
- 20 Std. 53 Min.
- Gemergte PRs (30 T.)
- 41
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/vscode-cpptools
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 15/100
microsoft/vscode-cpptools#14816 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
microsoft/vscode-cpptools#14815 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
microsoft/vscode-cpptools#14807 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Intellisense errors for projects after updating C/C++ extension to a version newer than 1.32.2Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
microsoft/vscode-cpptools#14806 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Feature] Memory LayoutOffenFeature Request Language Service
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
microsoft/vscode-cpptools#14805 · 2 Reaktionen ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in microsoft/vscode-cpptools
Ähnliche Issues
-
bot:ai-assisted status:untriaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
midnightntwrk/midnight-js#1424 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
mksglu/context-mode#1268 ·
Maintainer antworten meist innerhalb von 5 Tagen
-
Edit:Offencheck:failed streams:edit
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 60/100
iptv-org/iptv#54352 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Table] reserveSelectedRowOnPaginate=false 时表头全选包含其他页数据Evtl. vergeben @dvd233 hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Tencent/tdesign-react#4416 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:widget bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
interledger/publisher-tools#894 ·
Maintainer antworten meist innerhalb von 1 Tag