]> granicus.if.org Git - clang/commitdiff
check-clang: Introduce the feature "utf8-capable-terminal".
authorNAKAMURA Takumi <geek4civic@gmail.com>
Thu, 6 Feb 2014 07:15:59 +0000 (07:15 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Thu, 6 Feb 2014 07:15:59 +0000 (07:15 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200909 91177308-0d34-0410-b5e6-96231b3b80d8

test/FixIt/fixit-unicode-with-utf8-output.c
test/lit.cfg

index aff8542743245625610b3acf9c19b22d4e32626c..a1a7bb7338095c5e5163d29382a1d58e3f858b25 100644 (file)
@@ -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\);}}
index 3978946e9a91c1652e142c31a378eaf5cc6b5436..15becd511a2b0d02639e96b7bb151d9607b44f15 100644 (file)
@@ -308,6 +308,11 @@ if not platform.system() in ['Windows'] or not execute_external:
 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")