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
[clang-cpp-frontend] support rvalue references C++11 #1595
Conversation
02519b8
to
bfb73db
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.
I just have questions about the C++ OMs: As they don't appear to contain ESBMC-specific parts, could they be removed?
src/cpp/library/type_traits
Outdated
@@ -0,0 +1,36 @@ | |||
#ifndef STL_TYPE_TRAITS | |||
#define STL_TYPE_TRAITS |
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.
- Do we need this new header? What happens if we use the one from the C++ library installed on the system?
- Please consider using
#pragma once
(our Clang frontend supports this) or to rename the include guard to have an__ESBMC_
prefix.
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.
What happens if we use the one from the C++ library installed on the system?
I tried it and our frontend complained about it. It's not just this method in the standard library, there are a lot of other methods that our frontend doesn't support yet. I thought maybe we could handle it this way for now to avoid more changes.
Please consider using #pragma once (our Clang frontend supports this) or to rename the include guard to have an _ESBMC prefix.
Yes, I'll change it.
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.
Thanks for submitting this PR, @XLiZHI.
This PR adds new node support in the clang C++ frontend
RValuereference
A new OM was established:
std::move
The example code is as follows:
esbmc main.cpp --cppstd 11
Goto functions: