Skip to content
Commit 1285a495 authored by Anders Waldenborg's avatar Anders Waldenborg
Browse files

[clang][pp] Handle attributes defined by plugin in __has_attribute

When using attributes by plugins (both in clang and clang-tidy) the
preprocessor functions `__has_attribute`, `__has_c_attribute`,
`__has_cpp_attribute` still returned 0.

That problem is fixed by having the "hasAttribute" function also check
if any of the plugins provide that attribute.

This also adds C2x spelling to the example plugin for attributes so that
`__has_c_attribute` can be tested.

Differential Revision: https://reviews.llvm.org/D144405
parent 8629343a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment