Wumpf / IncludeToolbox

Visual Studio extension to format, prune, and inspect include directives.
https://marketplace.visualstudio.com/items?itemName=Wumpf.IncludeToolbox
MIT License
51 stars 22 forks source link

"error: no input files" and left-over tmp-Files since latest release #70

Open mbeckh opened 5 years ago

mbeckh commented 5 years ago

The latest release has two problems running include-what-you-use.exe:

  1. IWYU does not run any more. The problem seems to lie in IWYU.cs where an empty "-D" option is added to the command. The contents of the .tmp-File are as follows -I "includepath1" -I "includepath2" -D "pathtomyfile.cpp" The problem is the -D without a macro name before the actual file. If I remove the -D from the file and run IWYU from the commandline, it works.

  2. The .tmp file is never cleaned. The extension should remove the temp file after the job has finished, else the Temp-Directory is spammed with obsolete tmp-Files.

Visual Studio 2017 15.9.8, IncludeToolbox 2.4.0

As a workaround, adding a preprocessor macro to the project itself seems to help. However that sheds light on the isssue, that macros inherited from .props-files are not forwarded to IWYU.

dakotahawkins commented 5 years ago

macros inherited from .props-files are not forwarded to IWYU

Possibly related: #40

mbeckh commented 5 years ago

40 explains the missing macros, however the extension should also work when there are no macros defined at all.