[mlir] Apply ClangTidy fix (NFC)

Prefer to use .empty() instead of checking size().
This commit is contained in:
Adrian Kuegel 2023-09-27 07:15:03 +00:00
parent 2153eb37c0
commit a8919c413b

View File

@ -43,7 +43,7 @@ MLIRContext *Attribute::getContext() const { return getDialect().getContext(); }
NamedAttribute::NamedAttribute(StringAttr name, Attribute value)
: name(name), value(value) {
assert(name && value && "expected valid attribute name and value");
assert(name.size() != 0 && "expected valid attribute name");
assert(!name.empty() && "expected valid attribute name");
}
StringAttr NamedAttribute::getName() const {