Require commas between double square bracket attributes.
authorAaron Ballman <aaron@aaronballman.com>
Tue, 13 Apr 2021 10:40:42 +0000 (06:40 -0400)
committerAaron Ballman <aaron@aaronballman.com>
Tue, 13 Apr 2021 10:43:01 +0000 (06:43 -0400)
commit5ad15f4d1c6f56d25904265023d123a7d0b9d59d
tree9a81fe7637fa00cb2d8fb402ebed4581f40848de
parenteb31540066736658a71d7fc1154be8432e553a11
Require commas between double square bracket attributes.

Clang currently has a bug where it allows you to write [[foo bar]] and
both attributes are silently accepted. This patch corrects the comma
parsing rules for such attributes and handles the test case fallout, as
a few tests were accidentally doing this.
clang/lib/Parse/ParseDeclCXX.cpp
clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p1.cpp
clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.unused/p1.cpp
clang/test/Parser/c2x-attributes.c
clang/test/Parser/cxx-attributes.cpp
clang/test/Parser/pragma-attribute.cpp
clang/test/Sema/c2x-maybe_unused-errors.c
clang/test/Sema/c2x-nodiscard.c