Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems not transferred from error output produced by clang-cl #1537

Closed
skhrshin opened this issue Nov 9, 2020 · 2 comments
Closed

Problems not transferred from error output produced by clang-cl #1537

skhrshin opened this issue Nov 9, 2020 · 2 comments
Labels
bug a bug in the product Feature: build

Comments

@skhrshin
Copy link

skhrshin commented Nov 9, 2020

Brief Issue Summary

Whereas errors produced by compiler should be transferred to the problems window, this feature doesn't work properly with clang-cl.

Expected:

  1. Make sure you have installed Visual C++ 2017 Desktop Express and Clang 9.0.0
  2. Create a directory
  3. Put test.cpp in the directory
int main() {
    return nullptr;
}
  1. Put CMakeLists.txt in the directory
cmake_minimum_required (VERSION 3.0.0)
project (test)
add_executable (test test.cpp)
  1. Put .vscode/settings.json in the directory
{
    "cmake.generator": "Ninja",
    "cmake.configureSettings": {
        "CMAKE_MAKE_PROGRAM": "C:/your/path/to/ninja.exe"
    }
}
  1. Open the directory with VSCode
  2. Select "Clang 9.0.0 for MSVC with Visual Studio 2017 Desktop Express Release" kit
  3. Build
  4. The compiler produces the following error
[build] ..\test.cpp(2,12): error: cannot initialize return object of type 'int' with an rvalue of type 'nullptr_t'
[build]     return nullptr;
[build]            ^~~~~~~
[build] 1 error generated.
  1. The error should be also shown in the problems window

Apparent Behavior:

The compile error isn't shown in the problems window. If you open test.cpp by the editor, an error appears but the message is different. It works fine with "Visual Studio 2017 Desktop Express Release" kits.

Platform and Versions

  • Operating System: Windows
  • CMake Version: 3.18.0
  • VSCode Version: 1.51.0
  • CMake Tools Extension Version: 1.5.1
  • Compiler/Toolchain: Clang 9.0.0 with Visual C++ 2017 Express
@andreeis
Copy link
Contributor

andreeis commented Nov 9, 2020

Thank you for reporting this issue. We reproduce it and we will let you know if we need anything else for the investigation.
Possibly related to #517.

@andreeis andreeis added bug a bug in the product Feature: build labels Nov 9, 2020
@bobbrow
Copy link
Member

bobbrow commented Nov 9, 2020

Yes, I believe this is a duplicate of #517. Closing...

@bobbrow bobbrow closed this as completed Nov 9, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug a bug in the product Feature: build
Projects
None yet
Development

No branches or pull requests

3 participants