Allow standards-based attributes to have leading and trailing underscores.
authorAaron Ballman <aaron@aaronballman.com>
Thu, 15 Aug 2019 18:35:44 +0000 (18:35 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Thu, 15 Aug 2019 18:35:44 +0000 (18:35 +0000)
commit2ed4573e8f8619dc67647256ac070bf91f461392
tree4ebec17cb673b7f46a82af3d2c0af5a72885a1ec
parent00782a4b68c71b9fb80b403b13f9ec67f07a87a4
Allow standards-based attributes to have leading and trailing underscores.

This gives library implementers a way to use standards-based attributes that do not conflict with user-defined macros of the same name. Attributes in C2x require this behavior normatively (C2x 6.7.11p4), but there's no reason to not have the same behavior in C++, especially given that such attributes may be used by a C library consumed by a C++ compilation.

llvm-svn: 369033
clang/lib/Sema/ParsedAttr.cpp
clang/test/Preprocessor/has_attribute.cpp
clang/test/Preprocessor/has_c_attribute.c
clang/test/Sema/attr-cx2.c
clang/test/SemaCXX/attr-cxx0x.cpp