-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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] Fix behavior of __is_trivially_relocatable(volatile int)
#77092
Changes from 4 commits
ed94371
0c60ad2
67e69ad
8d6601d
d8f6fd4
23d517a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2682,6 +2682,8 @@ bool QualType::isTriviallyRelocatableType(const ASTContext &Context) const { | |
return false; | ||
} else if (const auto *RD = BaseElementType->getAsRecordDecl()) { | ||
return RD->canPassInRegisters(); | ||
} else if (BaseElementType.isTriviallyCopyableType(Context)) { | ||
return true; | ||
} else { | ||
switch (isNonTrivialToPrimitiveDestructiveMove()) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure why these are different functions, other than maybe having different preconditions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You mean why is |
||
case PCK_Trivial: | ||
|
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.
That should be moved after the next line (and you can use the same
#GHXXXX
syntax )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.
That's right! I've fixed it.