r202901 - TokenKinds: _Atomic isn't a keyword in MS mode
David Majnemer
david.majnemer at gmail.com
Tue Mar 4 14:07:10 PST 2014
Author: majnemer
Date: Tue Mar 4 16:07:09 2014
New Revision: 202901
URL: http://llvm.org/viewvc/llvm-project?rev=202901&view=rev
Log:
TokenKinds: _Atomic isn't a keyword in MS mode
Summary:
This is needed to allow MSVC's <atomic> header to properly parse.
It uses _Atomic as a class-id.
Reviewers: rnk
Reviewed By: rnk
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2948
Modified:
cfe/trunk/include/clang/Basic/TokenKinds.def
cfe/trunk/test/SemaCXX/MicrosoftCompatibility.cpp
Modified: cfe/trunk/include/clang/Basic/TokenKinds.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/TokenKinds.def?rev=202901&r1=202900&r2=202901&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/TokenKinds.def (original)
+++ cfe/trunk/include/clang/Basic/TokenKinds.def Tue Mar 4 16:07:09 2014
@@ -267,7 +267,7 @@ KEYWORD(volatile , KE
KEYWORD(while , KEYALL)
KEYWORD(_Alignas , KEYALL)
KEYWORD(_Alignof , KEYALL)
-KEYWORD(_Atomic , KEYALL)
+KEYWORD(_Atomic , KEYALL|KEYNOMS)
KEYWORD(_Bool , KEYNOCXX)
KEYWORD(_Complex , KEYALL)
KEYWORD(_Generic , KEYALL)
Modified: cfe/trunk/test/SemaCXX/MicrosoftCompatibility.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/MicrosoftCompatibility.cpp?rev=202901&r1=202900&r2=202901&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/MicrosoftCompatibility.cpp (original)
+++ cfe/trunk/test/SemaCXX/MicrosoftCompatibility.cpp Tue Mar 4 16:07:09 2014
@@ -3,6 +3,7 @@
typedef unsigned short char16_t;
typedef unsigned int char32_t;
+struct _Atomic {};
typename decltype(3) a; // expected-warning {{expected a qualified name after 'typename'}}
More information about the cfe-commits
mailing list