Comments (3)
Hi @leidegre I can repro this issue with 1.20.5, but it appears to be fixed in the latest prerelease (1.21.0). Closing as fixed.
from vscode-cpptools.
Could you provide the code snippet that is causing the issue?
Does this issue persist when all other extension except for C/C++ are disabled?
from vscode-cpptools.
If I try to goto the definition of the _countof macro I end up here, in vcruntime.h. __crt_countof
happens to be the same length as the incorrectly colored tokens, so it is somehow mistaking _countof
for __crt_countof
(it's five additional characters that gets colored incorrectly).
#ifdef __cplusplus
extern "C++"
{
template <typename _CountofType, size_t _SizeOfArray>
char (*__countof_helper(_UNALIGNED _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray];
#define __crt_countof(_Array) (sizeof(*__countof_helper(_Array)) + 0)
}
#else
#define __crt_countof(_Array) (sizeof(_Array) / sizeof(_Array[0]))
#endif
The actual definition of _countof
is in stdlib.h and looks like this
#ifndef _countof
#define _countof __crt_countof
#endif
This happens with all other extensions disabled.
from vscode-cpptools.
Related Issues (20)
- Duplicate Intellisense Hints HOT 6
- Constants defined c++ highlight not working HOT 1
- class "_PEB::<unnamed>" has no field "ImageUsedLargePages" HOT 4
- C/C++ tag parsing status is not in a busy state when the status shows "Initializing..."
- Undefined functions do not report errors HOT 4
- Undefined reference to `WinMain` HOT 5
- Is the warning a bug or a setting problem?
- Have trouble when Run VS Code outside the Developer Command Prompt HOT 4
- Dumps cores a lot HOT 1
- strdup missing from intellisense HOT 5
- IntelliSense completion fails to give results in a return statement (works in VS)
- [Regression] The 'Learn how to install a library for this header with vcpkg' option has disappeared HOT 1
- Found a Spelling mistake in the code snippet in time_t description HOT 1
- system includes from cmake and not pass as system HOT 1
- Debugger pauses unexpectedly and also has SegFaults and unknown signals which only occur during debugging
- Unable to read file HOT 1
- Ability to exclude files from intellisense HOT 1
- add option to hide declarations in 'Outline' HOT 2
- Workspace symbol search may give no results if the database read times out after 5 seconds
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-cpptools.