aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorMichael Han <fragmentshaders@gmail.com>2013-01-24 16:46:58 +0000
committerMichael Han <fragmentshaders@gmail.com>2013-01-24 16:46:58 +0000
commit51d8c52ad36129760eaa586f85176037e2cd0d0e (patch)
tree0e8a5b0a948cffc4b8a68349b6dac688a466ce53 /lib/Lex/Preprocessor.cpp
parent68bb7a6b1febbb96a60eef4e541a657c414bfda8 (diff)
PR14922: when printing an attribute, use the real syntax of the attribute (GNU, C++11, MS Declspec) instead of hardcoded GNU syntax.
Introduce a spelling index to Attr class, which is an index into the attribute spelling list of an attribute defined in Attr.td. This index will determine the actual spelling used by an attribute, as it incorporates both the syntax and naming of the attribute. When constructing an attribute AST node, the spelling index is computed based on attribute kind, scope (if it's a C++11 attribute), and name, then passed to Attr that will use the index to print itself. Thanks to Richard Smith for the idea and review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173358 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
0 files changed, 0 insertions, 0 deletions