-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
Milestone
Description
Type: LanguageService
Describe the bug
- OS and Version: Windows 10 build 17686
- VS Code Version: 1.23.1
- C/C++ Extension Version: 0.17.4
- Other extensions you installed (and if the issue persists after disabling them): I have others extensions installed, but after disabling all of them except my theme (Railgun) and this addon, it still persists.
- Description: VSCode reports an error for code that builds correctly.
To Reproduce
Steps to reproduce the behavior: (The default C++ properties were used)
- Clone the following gist: https://gist.github.com/sylveon/b63621297d566d06ab38bd5586eca0ed
- Open it in vscode
- Open main.cpp
- See red squiggles on CalculateHueGradient() call
- When hovering, you can read
expression must have a constant value -- conversion from "float" to "unsigned short" is invalid in constant-expression evaluation
Expected behavior
No error, like msvc and clang do while building the snippet:
C:\Users\Charles\Git\TranslucentTB>cl test.cpp /EHsc
Microsoft (R) C/C++ Optimizing Compiler Version 19.14.26430 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
test.cpp
Microsoft (R) Incremental Linker Version 14.14.26430.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:test.exe
test.obj
C:\Users\Charles\Git\TranslucentTB>clang-cl --version
clang version 6.0.0 (tags/RELEASE_600/final)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\LLVM\bin
C:\Users\Charles\Git\TranslucentTB>clang-cl /EHsc test.cpp
(no output, meaning a successful compilation)