]> granicus.if.org Git - clang/commit
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)
commitbfde26cc85da884428736ad0a415d39c2b699eff
treec9bc7892f4256c86cd93a12a893e98c3012953a8
parentb6d08c254852c0c96595e991fbac30f09281bb5b
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369033 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/ParsedAttr.cpp
test/Preprocessor/has_attribute.cpp
test/Preprocessor/has_c_attribute.c
test/Sema/attr-cx2.c
test/SemaCXX/attr-cxx0x.cpp