================
@@ -6343,11 +6343,17 @@ namespace {
};
} // end anonymous namespace
-static void
-fillDependentAddressSpaceTypeLoc(DependentAddressSpaceTypeLoc DASTL,
- const ParsedAttributesView &Attrs) {
- for (const ParsedAttr &AL : Attrs) {
- if (AL.getKind() == ParsedAttr::AT_AddressSpace) {
+static void fillDependentAddressSpaceTypeLoc(
+ DependentAddressSpaceTypeLoc DASTL,
+ ArrayRef<const ParsedAttributesView *> AttrLists) {
+ for (const ParsedAttributesView *Attrs : AttrLists) {
+ for (const ParsedAttr &AL : *Attrs) {
+ if (AL.getKind() != ParsedAttr::AT_AddressSpace)
+ continue;
+ // Skip an attribute that did not produce a type: one diagnosed as
+ // invalid, or one whose argument is missing or is not an expression.
+ if (AL.isInvalid() || AL.getNumArgs() != 1 || !AL.isArgExpr(0))
+ continue;
----------------
TPPPP72 wrote:
So why we need these? Before, we assert when `AL.getKind() ==
ParserAttr::AT_AddressSpace` we can certainly get a valid one, right?
https://github.com/llvm/llvm-project/pull/216348
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits