diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-11-21 17:31:32 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-11-21 17:31:32 +0000 |
| commit | c5b966f893639cb78f2a686a92596e43669fbda6 (patch) | |
| tree | 74e9bc0ad839d20e7556f9ec5f342df79be5cf0e /clang | |
| parent | 5b9f4891d73b8773d2610db3cedf2a22273d3bb3 (diff) | |
| download | bcm5719-llvm-c5b966f893639cb78f2a686a92596e43669fbda6.tar.gz bcm5719-llvm-c5b966f893639cb78f2a686a92596e43669fbda6.zip | |
check minutia of the standard.
llvm-svn: 39215
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/test/Preprocessor/cxx_oper_keyword.cpp | 6 | ||||
| -rw-r--r-- | clang/test/Preprocessor/cxx_oper_spelling.cpp | 11 |
2 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/cxx_oper_keyword.cpp b/clang/test/Preprocessor/cxx_oper_keyword.cpp new file mode 100644 index 00000000000..f2eaec40110 --- /dev/null +++ b/clang/test/Preprocessor/cxx_oper_keyword.cpp @@ -0,0 +1,6 @@ +// RUN: not clang %s -E + +// Not valid in C++. +#define and foo + + diff --git a/clang/test/Preprocessor/cxx_oper_spelling.cpp b/clang/test/Preprocessor/cxx_oper_spelling.cpp new file mode 100644 index 00000000000..fc8bc70e519 --- /dev/null +++ b/clang/test/Preprocessor/cxx_oper_spelling.cpp @@ -0,0 +1,11 @@ +// RUN: clang -E %s | grep 'a: "and"' + +#define X(A) #A + +// C++'03 2.5p2: "In all respects of the language, each alternative +// token behaves the same, respectively, as its primary token, +// except for its spelling" +// +// This should be spelled as 'and', not '&&' +a: X(and) + |

