Wrongly report '_Atomic(int) *' as not trivially-copyable type
Answered
Hi, just have a look of my following code (gcc as compiler)
int main() {
_Atomic int a = 1;
_Atomic int b = 2;
__atomic_load (&a, &b, __ATOMIC_RELAXED);
int c = 3;
int d = 4;
__atomic_load (&c, &d, __ATOMIC_RELAXED);
}
Clion inspection gives me an error message that Address argument to atomic operation must be a pointer to a trivially-copyable type ('_Atomic(int) *' invalid) for the first __atomic_load call, I thought it may be a wrong report since the second call looks well in clion editor.
How can I get rid of this problem?
Please sign in to leave a comment.
Hello!
What CLion version do you use? Is clangd enabled for you project (
Settings/Preferences | Languages & Frameworks | C/C++ | Clangd)?The latest version of CLion,
CLion 2019.3.4
Build #CL-193.6494.38, built on February 11, 2020
with clangd enabled(all configuration is of the initial status)
Thanks for the reply! Please comment or upvote https://youtrack.jetbrains.com/issue/CPP-15688 in order to get updates. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications if you are not familiar with YouTrack.