Move CppInterOp.h into its own location; issue a warning to help users.#591
Conversation
a262a61 to
ef0abf9
Compare
Currently we have the `CppInterOp.h` in `clang/Interpreter/` which makes people think that it is a clang header file. This patch moves the header into its own folder to avoid confusion.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #591 +/- ##
==========================================
+ Coverage 76.43% 77.31% +0.88%
==========================================
Files 9 9
Lines 3666 3685 +19
==========================================
+ Hits 2802 2849 +47
+ Misses 864 836 -28
🚀 New features to boost your workflow:
|
| void ReportInvokeEnd() const; | ||
|
|
||
| public: | ||
| Kind getKind() const { return m_Kind; } |
There was a problem hiding this comment.
warning: function 'getKind' should be marked [[nodiscard]] [modernize-use-nodiscard]
| Kind getKind() const { return m_Kind; } | |
| [[nodiscard]] Kind getKind() const { return m_Kind; } |
|
Thanks a lot for this PR. |
ef0abf9 to
8eb2abd
Compare
|
|
||
| public: | ||
| Kind getKind() const { return m_Kind; } | ||
| bool isValid() const { return getKind() != kUnknown; } |
There was a problem hiding this comment.
warning: function 'isValid' should be marked [[nodiscard]] [modernize-use-nodiscard]
| bool isValid() const { return getKind() != kUnknown; } | |
| [[nodiscard]] bool isValid() const { return getKind() != kUnknown; } |
| public: | ||
| Kind getKind() const { return m_Kind; } | ||
| bool isValid() const { return getKind() != kUnknown; } | ||
| bool isInvalid() const { return !isValid(); } |
There was a problem hiding this comment.
warning: function 'isInvalid' should be marked [[nodiscard]] [modernize-use-nodiscard]
| bool isInvalid() const { return !isValid(); } | |
| [[nodiscard]] bool isInvalid() const { return !isValid(); } |
8eb2abd to
6cee917
Compare
This would help us resolve headers such as gtest.h and reduce the clang-tidy compilation errors.
6cee917 to
54e04e6
Compare
| #include "clang-c/CXCppInterOp.h" | ||
| #include "clang-c/CXString.h" | ||
|
|
||
| using namespace clang; |
There was a problem hiding this comment.
warning: expected namespace name [clang-diagnostic-error]
using namespace clang;
^54e04e6 to
6be71ed
Compare
406b7d5 to
3cec1bf
Compare
3cec1bf to
3ef8b36
Compare
3ef8b36 to
dffab27
Compare
|
I cannot explain the windows failures. It might be that it has to do with some leftovers from the rename locally after the PR gets rebased on the bots... I'd prefer to merge this and debug later if necessary. |
Currently we have the
CppInterOp.hinclang/Interpreter/which makes people think that it is a clang header file. This patch moves the header into its own folder to avoid confusion.This patch also adds a warning for people to update their header files. That's technically not a breaking change and can land any time. The next patch will rename
libclangCppInterOpintolibCppInterOpwhich would be technically a breaking change and will be done in v2.0.This would be a good opportunity to fix stylistic changes without bloating the history such as the header preamble, indentation and such.