Skip to content

Cannot store reports with relative include paths: If the clang-tidy report refers to relative paths the resulting plist contains invalid absolute filepath #4130

@dkrupp

Description

@dkrupp

This error prevents storing the results.

The problem can be reproduced like this:

In the original compiler call the header was included like this:
clang .. -include ../../../Sources/some_header.hpp

the clang-tidy textual output:

gtest_pred_impl.h:40:10: warning: circular header file dependency detected while including 'gte
st.h', please check the include path [misc-header-include-cycle]
   40 | #include "gtest/gtest.h"
      |          ^
/Users/dkrupp.ext/CCMain/Bin.MacARM/Modules_LLVM_4_0_64.dev/GoogleTest/gtest/gtest.h:388:10: note: 'gtest_pred_impl.h' included from here
  388 | #include "gtest/gtest_pred_impl.h"
      |          ^
**./../../../Sources/some_header.hpp:66:10: note: 'gtest.h' included from here**
   66 | #include "gtest/gtest.h"

./../../../Sources/some_header.hpp:66:10: note: 'gtest.h' included from here

In the plist file the file section some_header.hpp is referred to as:

 </array>
    <key>files</key>
    <array>
            <string>/Sources/some_header.hpp</string>

Metadata

Metadata

Assignees

No one assigned

    Labels

    analyzer 📈Related to the analyze commands (analysis driver)bug 🐛clang-tidy 🐉clang-tidy is a clang-based C++ “linter” tool.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions