llvm-project/clang/test
Hans Wennborg 8f62c5ca22 Better diagnostics for string initialization.
This commit improves Clang's diagnostics for string initialization.
Where it would previously say:

  /tmp/a.c:3:9: error: array initializer must be an initializer list
  wchar_t s[] = "Hi";
          ^
  /tmp/a.c:4:6: error: array initializer must be an initializer list or string literal
  char t[] = L"Hi";
       ^

It will now say

  /tmp/a.c:3:9: error: initializing wide char array with non-wide string literal
  wchar_t s[] = "Hi";
          ^
  /tmp/a.c:4:6: error: initializing char array with wide string literal
  char t[] = L"Hi";
       ^

As a bonus, it also fixes the fact that Clang would previously reject
this valid C11 code:

  char16_t s[] = u"hi";
  char32_t t[] = U"hi";

because it would only recognize the built-in types for char16_t and
char32_t, which do not exist in C.

llvm-svn: 181880
2013-05-15 11:03:04 +00:00
..
ARCMT Point diagnostics that complain about a use of a selector in an objc message, to the selector location. 2013-05-01 00:24:09 +00:00
ASTMerge Extended VerifyDiagnosticConsumer to also verify source file for diagnostic. 2013-04-17 08:06:46 +00:00
Analysis Objective-C [diagnostics] [QOI], when method is not 2013-05-14 23:24:17 +00:00
CXX C++1y: provide full 'auto' return type deduction for lambda expressions. This 2013-05-12 03:09:35 +00:00
CodeCompletion PR14381: Never skip constexpr function bodies when code-completing. We may need 2012-11-19 21:13:18 +00:00
CodeGen ARM: Improve codegen for vget_low_* and vget_high_ intrinsics. 2013-05-15 02:40:04 +00:00
CodeGenCUDA Use kernel metadata to differentiate between kernel and device 2013-03-30 14:38:24 +00:00
CodeGenCXX [ms-cxxabi] Mangle in an implicit 'E' for certain types on win64 2013-05-14 20:30:42 +00:00
CodeGenObjC ObjC debug info: Substitute the class type for methods that return 2013-05-10 21:08:31 +00:00
CodeGenObjCXX Correctly emit certain implicit references to 'self' even within 2013-05-03 07:33:41 +00:00
CodeGenOpenCL Use kernel metadata to differentiate between kernel and device 2013-03-30 14:38:24 +00:00
Coverage Objective-C: When using super.prop, property should be 2013-03-11 22:26:33 +00:00
Driver [Mips] Add -mldc1-sdc1 / -mno-ldc1-sdc1 command line options. 2013-05-11 06:33:44 +00:00
FixIt The 'constexpr implies const' rule for non-static member functions is gone in 2013-04-21 01:08:50 +00:00
Format Remove diagnostics from clang-format. 2013-05-15 08:14:19 +00:00
Frontend Extended VerifyDiagnosticConsumer to also verify source file for diagnostic. 2013-04-17 08:06:46 +00:00
Headers Remove dependence on system headers from this test, to try to make the Windows bots happier. 2013-05-09 22:45:27 +00:00
Index [libclang] When parsing with CXTranslationUnit_ForSerialization, make sure to install the ASTWriter that we create as an ASTMutationListener. 2013-05-10 01:28:51 +00:00
Lexer Better diagnostics for string initialization. 2013-05-15 11:03:04 +00:00
Misc Provide operator<< for stream output of DeclarationNames 2013-05-14 21:04:00 +00:00
Modules Objective-C [diagnostics] [QOI], when method is not 2013-05-14 23:24:17 +00:00
OpenMP OpenMP threadprivate with qualified names. 2013-05-13 04:18:18 +00:00
PCH Objective-C [diagnostics] [QOI], when method is not 2013-05-14 23:24:17 +00:00
Parser C++1y n3648: parse and reject init-captures for now. 2013-05-09 21:36:41 +00:00
Preprocessor Use correct types for SPARC v9. 2013-05-15 03:22:33 +00:00
Rewriter Objective-C: Correctly encode 'retain' and 'copy' for readonly properties. 2013-05-08 23:47:40 +00:00
Sema Better diagnostics for string initialization. 2013-05-15 11:03:04 +00:00
SemaCUDA
SemaCXX Better diagnostics for string initialization. 2013-05-15 11:03:04 +00:00
SemaObjC Objective-C [diagnostics] [QOI], when method is not 2013-05-14 23:24:17 +00:00
SemaObjCXX Objective-C [diagnostics] [QOI], when method is not 2013-05-14 23:24:17 +00:00
SemaOpenCL Add an error to check that all program scope variables are in the constant address space in OpenCL. 2013-04-05 20:14:50 +00:00
SemaTemplate <rdar://problem/13806270> A template argument list is a constant-evaluated context. 2013-05-03 23:44:54 +00:00
TableGen Revert "tg-fixits.td: fixup for Linux" 2013-01-11 02:37:47 +00:00
Tooling Use 'env' in tests that set environment variables. 2013-05-15 01:45:37 +00:00
Unit Propagate path to ASan/MSan symbolizer into test environment to produce useful reports on errors. 2013-04-04 07:41:20 +00:00
CMakeLists.txt Re-add clang-format tests to clang/test. 2013-03-25 09:14:25 +00:00
Makefile
TestRunner.sh
cxx-sections.data
lit.cfg Revert r179671 and just pass a triple to the test for a platform with known 2013-04-17 17:27:51 +00:00
lit.site.cfg.in Add asan/msan to the list of available features in LIT test runner. Mark ASan-unfriendly test as XFAIL. 2013-03-26 08:28:18 +00:00
make_test_dirs.pl