-
Notifications
You must be signed in to change notification settings - Fork 31
Move CppInterOp.h into its own location; issue a warning to help users. #591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There were too many comments to post at once. Showing the first 10 out of 27. Check the log or trigger a new build to see more.
void ReportInvokeEnd() const; | ||
|
||
public: | ||
Kind getKind() const { return m_Kind; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There were too many comments to post at once. Showing the first 10 out of 18. Check the log or trigger a new build to see more.
|
||
public: | ||
Kind getKind() const { return m_Kind; } | ||
bool isValid() const { return getKind() != kUnknown; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
This would help us resolve headers such as gtest.h and reduce the clang-tidy compilation errors.
6cee917
to
54e04e6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
#include <memory> | ||
#include <string> | ||
#include <vector> | ||
#include "clang-c/CXCppInterOp.h" | ||
#include "clang-c/CXString.h" | ||
|
||
using namespace clang; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: expected namespace name [clang-diagnostic-error]
using namespace clang;
^
54e04e6
to
6be71ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
406b7d5
to
3cec1bf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
3cec1bf
to
3ef8b36
Compare
3ef8b36
to
dffab27
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
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.h
inclang/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
libclangCppInterOp
intolibCppInterOp
which 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.