[cfe-commits] r113813 - in /cfe/trunk: include/clang/Basic/TokenKinds.def test/Lexer/clang-keywords.cpp test/Lexer/cxx0x_keyword_as_cxx98.cpp
Douglas Gregor
dgregor at apple.com
Mon Sep 13 16:21:45 PDT 2010
Author: dgregor
Date: Mon Sep 13 18:21:44 2010
New Revision: 113813
URL: http://llvm.org/viewvc/llvm-project?rev=113813&view=rev
Log:
Add __char16_t and __char32_t as aliases for the C++0x char16_t and
char32_t, respectively, but which can also be used in C++98/03
mode. Fixes <rdar://problem/8418510>.
Added:
cfe/trunk/test/Lexer/clang-keywords.cpp
Modified:
cfe/trunk/include/clang/Basic/TokenKinds.def
cfe/trunk/test/Lexer/cxx0x_keyword_as_cxx98.cpp
Modified: cfe/trunk/include/clang/Basic/TokenKinds.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/TokenKinds.def?rev=113813&r1=113812&r2=113813&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/TokenKinds.def (original)
+++ cfe/trunk/include/clang/Basic/TokenKinds.def Mon Sep 13 18:21:44 2010
@@ -381,6 +381,11 @@
// Borland Extensions which should be disabled in strict conformance mode.
ALIAS("_pascal" , __pascal , KEYBORLAND)
+// Clang Extensions.
+ALIAS("__char16_t" , char16_t , KEYCXX)
+ALIAS("__char32_t" , char32_t , KEYCXX)
+
+
//===----------------------------------------------------------------------===//
// Objective-C @-preceeded keywords.
//===----------------------------------------------------------------------===//
Added: cfe/trunk/test/Lexer/clang-keywords.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/clang-keywords.cpp?rev=113813&view=auto
==============================================================================
--- cfe/trunk/test/Lexer/clang-keywords.cpp (added)
+++ cfe/trunk/test/Lexer/clang-keywords.cpp Mon Sep 13 18:21:44 2010
@@ -0,0 +1,3 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+__char16_t c16;
+void f(__char32_t) { }
Modified: cfe/trunk/test/Lexer/cxx0x_keyword_as_cxx98.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/cxx0x_keyword_as_cxx98.cpp?rev=113813&r1=113812&r2=113813&view=diff
==============================================================================
--- cfe/trunk/test/Lexer/cxx0x_keyword_as_cxx98.cpp (original)
+++ cfe/trunk/test/Lexer/cxx0x_keyword_as_cxx98.cpp Mon Sep 13 18:21:44 2010
@@ -1,2 +1,3 @@
-// RUN: %clang_cc1 %s -fsyntax-only
+// RUN: %clang_cc1 %s -verify -fsyntax-only
int static_assert;
+int char16_t;
More information about the cfe-commits
mailing list