[cfe-commits] r118482 - in /cfe/trunk: include/clang/Basic/TokenKinds.def test/SemaCXX/nullptr-98.cpp
Douglas Gregor
dgregor at apple.com
Mon Nov 8 19:43:05 PST 2010
Author: dgregor
Date: Mon Nov 8 21:43:04 2010
New Revision: 118482
URL: http://llvm.org/viewvc/llvm-project?rev=118482&view=rev
Log:
Add __nullptr as a C++0x nullptr literal, available in C++98
Added:
cfe/trunk/test/SemaCXX/nullptr-98.cpp (with props)
Modified:
cfe/trunk/include/clang/Basic/TokenKinds.def
Modified: cfe/trunk/include/clang/Basic/TokenKinds.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/TokenKinds.def?rev=118482&r1=118481&r2=118482&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/TokenKinds.def (original)
+++ cfe/trunk/include/clang/Basic/TokenKinds.def Mon Nov 8 21:43:04 2010
@@ -358,6 +358,7 @@
ALIAS("__imag__" , __imag , KEYALL)
ALIAS("__inline" , inline , KEYALL)
ALIAS("__inline__" , inline , KEYALL)
+ALIAS("__nullptr" , nullptr , KEYCXX)
ALIAS("__real__" , __real , KEYALL)
ALIAS("__restrict" , restrict , KEYALL)
ALIAS("__restrict__" , restrict , KEYALL)
Added: cfe/trunk/test/SemaCXX/nullptr-98.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/nullptr-98.cpp?rev=118482&view=auto
==============================================================================
--- cfe/trunk/test/SemaCXX/nullptr-98.cpp (added)
+++ cfe/trunk/test/SemaCXX/nullptr-98.cpp Mon Nov 8 21:43:04 2010
@@ -0,0 +1,3 @@
+// RUN: %clang_cc1 -std=c++98 -fsyntax-only -verify %s
+void f(void *);
+void g() { f(__nullptr); }
Propchange: cfe/trunk/test/SemaCXX/nullptr-98.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cfe/trunk/test/SemaCXX/nullptr-98.cpp
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cfe/trunk/test/SemaCXX/nullptr-98.cpp
------------------------------------------------------------------------------
svn:mime-type = text/plain
More information about the cfe-commits
mailing list