[cfe-dev] help -- how can i know whether a variable has user-defined attributes or not in Clang?
Shen Liu
liushenster at gmail.com
Fri Oct 3 10:12:55 PDT 2014
Dear Clang Developers,
I am Shen, a beginner in Clang and LLVM. I hope to add some attributes to
some variables, and check which variables include which attributes in my
program. For example, I can write a statement as:
int x __attribute_(foo); (here "foo" is an attribute defined by myself)
and then how can i check whether x has attribute "foo"? In Clang manual,
the macro "__has_attribute" is just used for adding attribute for clang,
not for a concrete variable. Can you give me some help?
This is the first time for me to use this way to ask questions about LLVM,
if anything wrong please let me know so i can use a better way to get your
help.
Thank you very much and have a nice day!
Shen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20141003/ba54d295/attachment.html>
More information about the cfe-dev
mailing list