Skip to content
This repository has been archived by the owner on Mar 25, 2023. It is now read-only.

'ioStream' file not found #25

Open
DeadRabbits307 opened this issue May 3, 2020 · 5 comments
Open

'ioStream' file not found #25

DeadRabbits307 opened this issue May 3, 2020 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@DeadRabbits307
Copy link

DeadRabbits307 commented May 3, 2020

As the screenshots show clang-tidy does not find the MinGW header file iostream.

VS Code version: 1.44.2
OS: Windows 10, version 1903, build 18362.720
clang-tidy extension version: 0.4.1

clang/LLVM:
version: 10.0
InstalledDir: C:\LLVM\bin

MinGW:
version: x86_64-8.1.0-posix-seh-rt_v6-rev0
InstalledDir: C:\MinGW\mingw64

settings.json:

   "clang-tidy.executable": "C:\\LLVM\\bin\\clang-tidy",
    "clang-tidy.lintOnSave": true,
    "clang-tidy.checks": [
        "cppcoreguidelines-*",
        "clang-analyzer-*"
    ],
    "clang-tidy.compilerArgs": [
        "--target=x86_64-pc-windows-gnu"
    ],

03

As the PATH variable shows, according to this everything is set:

04

If I execute the same command vscode-clang-tidy is executing (shown in the OUTPUT window) in the cmd of Windows, no iostream error is shown:

C:\LLVM\bin\clang-tidy c:\Users\xx\Desktop\test\main.cpp --export-fixes=- --checks=cppcoreguidelines-*,clang-analyzer-*,clang-diagnostic-* --extra-arg=--target=x86_64-pc-windows-gnu

@DeadRabbits307 DeadRabbits307 changed the title Error: Clang-Tidy: Lint File resulted in an error (Cannot read property 'toString' of undefined 'ioStream' file not found May 3, 2020
@DeadRabbits307 DeadRabbits307 reopened this May 4, 2020
@notskm
Copy link
Owner

notskm commented May 21, 2020

I can't reproduce this with gcc installed through scoop. I'm having internet issues at the moment, so I can't test further for another few days. Sorry for the wait.

@notskm notskm added the help wanted Extra attention is needed label May 26, 2020
@jackgerrits
Copy link

I am also hitting this. I am using the compile_commands.json produced by cmake. Settings are:

 "clang-tidy.buildPath": "${workspaceFolder}/build",
 "clang-tidy.checks": [
        "readability-*",
        "readability-braces-around-statements",
        "modernize-*",
        "performance-*",
        "-modernize-use-trailing-return-type",
        "-readability-uppercase-literal-suffix"
],

Ubuntu 20.04
Extension version: 0.5.1

$ clang-tidy --version
LLVM (http://llvm.org/):
  LLVM version 10.0.0
  
  Optimized build.
  Default target: x86_64-pc-linux-gnu
  Host CPU: znver2

@notskm
Copy link
Owner

notskm commented Jun 5, 2020

@jackgerrits clang-tidy.buildPath does not currently accept variables like ${workspaceFolder}.

@chocolacula
Copy link

Have the same issue on Manjaro with default setup LLVM 10.0.0

@batunpc
Copy link

batunpc commented Nov 4, 2022

adding this in settings.json solved the issue for me

  "clang-tidy.compilerArgsBefore": [
    "-stdlib=libc++",
    "-isystem",
    "/opt/homebrew/opt/llvm/include/c++/v1"
  ]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants