Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Linter-clang not working with SYSTEM include directories #237

@dstocco

Description

@dstocco

Dear all,
the linter-clang is not recognizing the header files when they're included as "SYSTEM".
The issue can be reproduced with the attached example, that generates a compile_commands.json file.
In this example I include the directories using the SYSTEM flag. Doing so, the header file is included with:
-isystem include
However, as written in the doc, linter-clang searches for the directory include (preceded by a space), which ultimately result in linter-clang not finding the header.
On the other hand, everything works as expected when removing the SYSTEM flag, since in that case the compile_commands.json file reads:
-Iinclude
(with no space).

Would it be possible to add a protection, removing the leading space of a path when the flag -isystem is found?

Thanks in advance,
best regards,
Diego

linter_clang_example.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions