]> granicus.if.org Git - clang/commit
support operator keywords used in Windows SDK
authorErich Keane <erich.keane@intel.com>
Fri, 9 Jun 2017 16:29:35 +0000 (16:29 +0000)
committerErich Keane <erich.keane@intel.com>
Fri, 9 Jun 2017 16:29:35 +0000 (16:29 +0000)
commit3148514e3baca9b32f9da60915df952cc8b227b9
treed059827c61b344c5b4d349d9d98509268834b08c
parent52709f3610567494b4a764660f01d29053fc37d8
support operator keywords used in Windows SDK

to support operator keywords used in Windows SDK, alter token type when
seen in system headers

Hello, I submitted D33505 to address this problem, but the
proposal was rejected as too big a hammer.
This change will allow clang to parse the WindowsSDK header <query.h>
which uses the operator name "or" as a field name. Treat cpp operator
keywords as ordinary identifiers inside the Microsoft headers, but
treat them as usual in the user's program.

Original Submitter: Melanie Blower (mibintc)

Differential Revision: https://reviews.llvm.org/D33782

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305087 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Lex/Preprocessor.cpp
test/Headers/ms-cppoperkey.cpp [new file with mode: 0644]
test/Headers/ms-cppoperkey1.cpp [new file with mode: 0644]
test/Headers/ms-cppoperkey2.cpp [new file with mode: 0644]