]> granicus.if.org Git - clang/commitdiff
TokenKinds: _Atomic isn't a keyword in MS mode
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 4 Mar 2014 22:07:09 +0000 (22:07 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 4 Mar 2014 22:07:09 +0000 (22:07 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202901 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/TokenKinds.def
test/SemaCXX/MicrosoftCompatibility.cpp

index b64ad05cd091cc8a692c85904beabd587422ebbc..2ffd0001318d65e7f9257974b5660c9c1ba0cf96 100644 (file)
@@ -267,7 +267,7 @@ KEYWORD(volatile                    , KEYALL)
 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)
index a3b96da448cbfba29d2022027b10d5df9957643e..fb7d9751d1a5a4ea58d037aaf64a9a9e548a0bb2 100644 (file)
@@ -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'}}