r200909 - check-clang: Introduce the feature "utf8-capable-terminal".

NAKAMURA Takumi geek4civic at gmail.com
Wed Feb 5 23:15:59 PST 2014


Author: chapuni
Date: Thu Feb  6 01:15:59 2014
New Revision: 200909

URL: http://llvm.org/viewvc/llvm-project?rev=200909&view=rev
Log:
check-clang: Introduce the feature "utf8-capable-terminal".

clang/test/FixIt/fixit-unicode-with-utf8-output.c has begun complained since LLVM r200885.
Although it is changes for StringRef, it brought LLVM_ON_WIN32 to Support/Locale.cpp.

Before r200885, LLVM_ON_WIN32 was undefined in Locale.cpp!

FIXME: We should consider i18n on win32.

Modified:
    cfe/trunk/test/FixIt/fixit-unicode-with-utf8-output.c
    cfe/trunk/test/lit.cfg

Modified: cfe/trunk/test/FixIt/fixit-unicode-with-utf8-output.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/FixIt/fixit-unicode-with-utf8-output.c?rev=200909&r1=200908&r2=200909&view=diff
==============================================================================
--- cfe/trunk/test/FixIt/fixit-unicode-with-utf8-output.c (original)
+++ cfe/trunk/test/FixIt/fixit-unicode-with-utf8-output.c Thu Feb  6 01:15:59 2014
@@ -2,6 +2,7 @@
 // systems capable of outputting Unicode characters to the standard output in
 // the UTF-8 encoding.
 // RUN: not %clang_cc1 -fsyntax-only %S/fixit-unicode.c 2>&1 | FileCheck -strict-whitespace %s
+// REQUIRES: utf8-capable-terminal
 
 // CHECK: warning: format specifies type 'int' but the argument has type 'long'
 // CHECK: {{^  printf\("∆: %d", 1L\);}}

Modified: cfe/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.cfg?rev=200909&r1=200908&r2=200909&view=diff
==============================================================================
--- cfe/trunk/test/lit.cfg (original)
+++ cfe/trunk/test/lit.cfg Thu Feb  6 01:15:59 2014
@@ -308,6 +308,11 @@ if not platform.system() in ['Windows']
 if platform.system() not in ['Windows']:
     config.available_features.add('ansi-escape-sequences')
 
+# Capability to print utf8 to the terminal.
+# Windows expects codepage, unless Wide API.
+if platform.system() not in ['Windows']:
+    config.available_features.add('utf8-capable-terminal')
+
 # Native compilation: host arch == target arch
 if config.host_arch in config.target_triple:
     config.available_features.add("native")





More information about the cfe-commits mailing list