mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 18:56:06 +00:00

Move the logic for determining the `wchar_t` type information into the driver. Rather than passing the single bit of information of `-fshort-wchar` indicate to the frontend the desired type of `wchar_t` through a new `-cc1` option of `-fwchar-type` and indicate the signedness through `-f{,no-}signed-wchar`. This replicates the current logic which was spread throughout Basic into the `RenderCharacterOptions`. Most of the changes to the tests are to ensure that the frontend uses the correct type. Add a new test set under `test/Driver/wchar_t.c` to ensure that we calculate the proper types for the various cases. llvm-svn: 315126
9 lines
335 B
C++
9 lines
335 B
C++
// RUN: c-index-test -write-pch %t.pch -fwchar-type=short -fno-signed-wchar %s
|
|
// RUN: env LIBCLANG_NOTHREADS=1 c-index-test -index-tu %t.pch | FileCheck %s
|
|
|
|
// CHECK: [indexDeclaration]: kind: variable | name: wideStr
|
|
const wchar_t *wideStr = L"123";
|
|
|
|
// CHECK: [indexDeclaration]: kind: struct | name: __is_void
|
|
struct __is_void {};
|