Skip to content
Merged
Changes from all commits
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
6 changes: 4 additions & 2 deletions clang/lib/AST/ByteCode/Context.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,22 @@ class Context final {
return classify(E->getType());
}

bool canClassify(QualType T) {
bool canClassify(QualType T) const {
if (const auto *BT = dyn_cast<BuiltinType>(T)) {
if (BT->isInteger() || BT->isFloatingPoint())
return true;
if (BT->getKind() == BuiltinType::Bool)
return true;
}
if (T->isPointerOrReferenceType())
return true;

if (T->isArrayType() || T->isRecordType() || T->isAnyComplexType() ||
T->isVectorType())
return false;
return classify(T) != std::nullopt;
}
bool canClassify(const Expr *E) {
bool canClassify(const Expr *E) const {
if (E->isGLValue())
return true;
return canClassify(E->getType());
Expand Down
Loading