Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[NFC][Clang] Adopt simplified getTrailingObjects in Expr.cpp/h #140102

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

Merged
merged 2 commits into from
May 19, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Address review comments
  • Loading branch information
jurahul committed May 16, 2025
commit 9ecf3a77e8ad8335aff72d2c6f0bb10fc634d563
18 changes: 9 additions & 9 deletions 18 clang/lib/AST/Expr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5039,17 +5039,17 @@ PseudoObjectExpr::PseudoObjectExpr(QualType type, ExprValueKind VK,
PseudoObjectExprBits.ResultIndex = resultIndex + 1;
MutableArrayRef<Expr *> Trail = getTrailingObjects(semantics.size() + 1);
Trail[0] = syntax;
llvm::copy(semantics, Trail.drop_front().begin());

#ifndef NDEBUG
llvm::for_each(semantics, [](const Expr *E) {
if (auto *OE = dyn_cast<OpaqueValueExpr>(E))
assert(OE->getSourceExpr() != nullptr &&
"opaque-value semantic expressions for pseudo-object "
"operations must have sources");
});
#endif
assert(llvm::all_of(semantics,
[](const Expr *E) {
return !isa<OpaqueValueExpr>(E) ||
cast<OpaqueValueExpr>(E)->getSourceExpr() !=
nullptr;
}) &&
"opaque-value semantic expressions for pseudo-object "
"operations must have sources");

llvm::copy(semantics, Trail.drop_front().begin());
setDependence(computeDependence(this));
}

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.