diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-09-19 02:14:12 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-09-19 02:14:12 +0000 |
commit | 664798c034fb0ceb6ac1e5aba8138cce8dd701db (patch) | |
tree | e485b417a8949117248e580f93fbc23504bc9385 | |
parent | f4d05d7a806989d739292e8bf969f3b2ae74fa08 (diff) | |
download | bcm5719-llvm-664798c034fb0ceb6ac1e5aba8138cce8dd701db.tar.gz bcm5719-llvm-664798c034fb0ceb6ac1e5aba8138cce8dd701db.zip |
Add test that we correctly allow some non-letter unicode characters in
identifiers, and extend existing test to also cover C++.
llvm-svn: 248079
-rw-r--r-- | clang/test/Lexer/unicode.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/clang/test/Lexer/unicode.c b/clang/test/Lexer/unicode.c index de758f179a4..30805d1acb2 100644 --- a/clang/test/Lexer/unicode.c +++ b/clang/test/Lexer/unicode.c @@ -1,4 +1,5 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -x c -std=c11 %s +// RUN: %clang_cc1 -fsyntax-only -verify -x c++ -std=c++11 %s // RUN: %clang_cc1 -E -DPP_ONLY=1 %s -o %t // RUN: FileCheck --strict-whitespace --input-file=%t %s @@ -24,3 +25,11 @@ COPYRIGHT // CHECK: Copyright © {{2012}} CHECK: The preprocessor should not complain about Unicode characters like ©. #endif + +// A 🌹 by any other name.... +extern int 🌹; +int 🌵(int 🌻) { return 🌻+ 1; } +int main () { + int 🌷 = 🌵(🌹); + return 🌷; +} |