Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt Box<str> for some AST size shrinking #3

Merged
merged 1 commit into from
Apr 28, 2021
Merged

Adopt Box<str> for some AST size shrinking #3

merged 1 commit into from
Apr 28, 2021

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Apr 28, 2021

No description provided.

@dtolnay dtolnay merged commit 82139e7 into master Apr 28, 2021
@dtolnay dtolnay deleted the boxstr branch April 28, 2021 07:26
dtolnay added a commit that referenced this pull request Feb 4, 2022
    In file included from D:\a\clang-ast\clang-ast\target\release\build\clang-ast-test-suite-f29c2b576455028c\out\cxx\src\cxx.cc:1:
    In file included from D:\a\clang-ast\clang-ast\target\release\build\clang-ast-test-suite-f29c2b576455028c\out\cxx\src/../include/cxx.h:2:
    In file included from C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.30.30705\include\algorithm:9:
    In file included from C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.30.30705\include\yvals_core.h:370:
    C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.30.30705\include\vcruntime.h:253:83: error: cannot mangle this dependent-length array yet
            char (*__countof_helper(_UNALIGNED _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray];
                                                                                     ~^~~~~~~~~~~~~
    C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.30.30705\include\vcruntime.h:253:67: error: cannot mangle this dependent-length array yet
            char (*__countof_helper(_UNALIGNED _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray];
                                                                     ~^~~~~~~~~~~~~
    C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.30.30705\include\vcruntime.h:253:67: error: cannot mangle this dependent-length array yet
            char (*__countof_helper(_UNALIGNED _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray];
                                                                     ~^~~~~~~~~~~~~
    In file included from D:\a\clang-ast\clang-ast\target\release\build\clang-ast-test-suite-f29c2b576455028c\out\cxx\src\cxx.cc:1:
    In file included from D:\a\clang-ast\clang-ast\target\release\build\clang-ast-test-suite-f29c2b576455028c\out\cxx\src/../include/cxx.h:2:
    In file included from C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.30.30705\include\algorithm:11:
    In file included from C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.30.30705\include\xmemory:12:
    In file included from C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.30.30705\include\cstdlib:12:
    In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\math.h:11:
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt_math.h:395:20: error: cannot mangle this template type parameter type yet
        _Check_return_ inline int _fpcomp(_In_ _T1 _X, _In_ _T2 _Y) throw()
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt_math.h:395:20: error: cannot mangle this template type parameter type yet
        _Check_return_ inline int _fpcomp(_In_ _T1 _X, _In_ _T2 _Y) throw()
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt_math.h:395:44: error: cannot mangle this template type parameter type yet
        _Check_return_ inline int _fpcomp(_In_ _T1 _X, _In_ _T2 _Y) throw()
                                               ^~~~~~
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt_math.h:395:20: error: cannot mangle this template type parameter type yet
        _Check_return_ inline int _fpcomp(_In_ _T1 _X, _In_ _T2 _Y) throw()
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt_math.h:395:20: error: cannot mangle this template type parameter type yet
        _Check_return_ inline int _fpcomp(_In_ _T1 _X, _In_ _T2 _Y) throw()
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt_math.h:395:57: error: cannot mangle this template type parameter type yet
        _Check_return_ inline int _fpcomp(_In_ _T1 _X, _In_ _T2 _Y) throw()
                                                            ^~~~~~
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt_math.h:405:20: error: cannot mangle this template type parameter type yet
        _Check_return_ inline bool isfinite(_In_ _Ty _X) throw()
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt_math.h:405:46: error: cannot mangle this template type parameter type yet
        _Check_return_ inline bool isfinite(_In_ _Ty _X) throw()
                                                 ^~~~~~
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt_math.h:411:20: error: cannot mangle this template type parameter type yet
        _Check_return_ inline bool isinf(_In_ _Ty _X) throw()
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt_math.h:411:43: error: cannot mangle this template type parameter type yet
        _Check_return_ inline bool isinf(_In_ _Ty _X) throw()
                                              ^~~~~~
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt_math.h:417:20: error: cannot mangle this template type parameter type yet
        _Check_return_ inline bool isnan(_In_ _Ty _X) throw()
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt_math.h:417:43: error: cannot mangle this template type parameter type yet
        _Check_return_ inline bool isnan(_In_ _Ty _X) throw()
                                              ^~~~~~
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt_math.h:423:20: error: cannot mangle this template type parameter type yet
        _Check_return_ inline bool isnormal(_In_ _Ty _X) throw()
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt_math.h:423:46: error: cannot mangle this template type parameter type yet
        _Check_return_ inline bool isnormal(_In_ _Ty _X) throw()
                                                 ^~~~~~
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt_math.h:429:20: error: cannot mangle this template type parameter type yet
        _Check_return_ inline bool isgreater(_In_ _Ty1 _X, _In_ _Ty2 _Y) throw()
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt_math.h:429:20: error: cannot mangle this template type parameter type yet
        _Check_return_ inline bool isgreater(_In_ _Ty1 _X, _In_ _Ty2 _Y) throw()
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
    Stack dump:
    0.	Program arguments: "C:\\Program Files\\LLVM\\bin\\clang++.exe" -Xclang -ast-dump=json -Xclang -std=c++17 -fsyntax-only D:\\a\\clang-ast\\clang-ast\\target\\release\\build\\clang-ast-test-suite-f29c2b576455028c\\out\\cxx\\src\\cxx.cc
    1.	<eof> parser at end of file
    2.	C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.30.30705\include\type_traits:447:27: Mangling declaration 'std::_Is_member_object_pointer<type-parameter-0-0 type-parameter-0-1::*>::value'
     #0 0x00007ff741dbe0b3 C:\Program Files\LLVM\bin\clang++.exe 0x3abe0b3 C:\Program Files\LLVM\bin\clang++.exe 0x3ac8331
     #1 0x00007ff741dbe0b3 C:\Program Files\LLVM\bin\clang++.exe 0x3ac2ce1 C:\Program Files\LLVM\bin\clang++.exe 0x3abff39
     #2 0x00007ff741dbe0b3 C:\Program Files\LLVM\bin\clang++.exe 0x3abf966 C:\Program Files\LLVM\bin\clang++.exe 0x3abd9b0
     #3 0x00007ff741dbe0b3 C:\Program Files\LLVM\bin\clang++.exe 0x3abca12 C:\Program Files\LLVM\bin\clang++.exe 0x3ab8365
     #4 0x00007ff741dbe0b3 C:\Program Files\LLVM\bin\clang++.exe 0x3897f80 C:\Program Files\LLVM\bin\clang++.exe 0x3899f4b
     #5 0x00007ff741dbe0b3 C:\Program Files\LLVM\bin\clang++.exe 0x3899493 C:\Program Files\LLVM\bin\clang++.exe 0x38995e2
     #6 0x00007ff741dbe0b3 C:\Program Files\LLVM\bin\clang++.exe 0x3b0054e C:\Program Files\LLVM\bin\clang++.exe 0x3b00f43
     #7 0x00007ff741dbe0b3 C:\Program Files\LLVM\bin\clang++.exe 0x3af6c8c C:\Program Files\LLVM\bin\clang++.exe 0x39eb062
     #8 0x00007ff741dbe0b3 C:\Program Files\LLVM\bin\clang++.exe 0x39f8426 C:\Program Files\LLVM\bin\clang++.exe 0x39eaf3d
     #9 0x00007ff741dbe0b3 C:\Program Files\LLVM\bin\clang++.exe 0x39eb236 C:\Program Files\LLVM\bin\clang++.exe 0x39f8426
    #10 0x00007ff741dbe0b3 C:\Program Files\LLVM\bin\clang++.exe 0x39eaf3d C:\Program Files\LLVM\bin\clang++.exe 0x39eb236
    #11 0x00007ff741dbe0b3 C:\Program Files\LLVM\bin\clang++.exe 0x39f8426 C:\Program Files\LLVM\bin\clang++.exe 0x39eaf3d
    #12 0x00007ff741dbe0b3 C:\Program Files\LLVM\bin\clang++.exe 0x39eb236 C:\Program Files\LLVM\bin\clang++.exe 0x39ead10
    #13 0x00007ff741dbe0b3 C:\Program Files\LLVM\bin\clang++.exe 0x39df32c C:\Program Files\LLVM\bin\clang++.exe 0x23c265d
    #14 0x00007ff741dbe0b3 C:\Program Files\LLVM\bin\clang++.exe 0x23c2406 C:\Program Files\LLVM\bin\clang++.exe 0x2fa8023
    #15 0x00007ff741dbe0b3 C:\Program Files\LLVM\bin\clang++.exe 0x238a9c2 C:\Program Files\LLVM\bin\clang++.exe 0x23521bd
    #16 0x00007ff741dbe0b3 C:\Program Files\LLVM\bin\clang++.exe 0x23f8c26 C:\Program Files\LLVM\bin\clang++.exe 0x75c3
    #17 0x00007ff741dbe0b3 C:\Program Files\LLVM\bin\clang++.exe 0x47ff C:\Program Files\LLVM\bin\clang++.exe 0x22658c6
    #18 0x00007ff741dbe0b3 C:\Program Files\LLVM\bin\clang++.exe 0x1b3d39f C:\Program Files\LLVM\bin\clang++.exe 0x22655b7
    #19 0x00007ff741dbe0b3 C:\Program Files\LLVM\bin\clang++.exe 0x21a9462 C:\Program Files\LLVM\bin\clang++.exe 0x21a9a09
    #20 0x00007ff741dbe0b3 C:\Program Files\LLVM\bin\clang++.exe 0x218bf26 C:\Program Files\LLVM\bin\clang++.exe 0x411d
    #21 0x00007ff741dbe0b3 C:\Program Files\LLVM\bin\clang++.exe 0x3e367b8 (C:\Program Files\LLVM\bin\clang++.exe+0x3abe0b3)
    #22 0x00007ff741dbe0b3
    #23 0x00007ff741dbe0b3 (C:\Program Files\LLVM\bin\clang++.exe+0x3abe0b3)
    0x00007FF741DBE0B3 (0x000000FE74D8AE98 0x00007FF741AFF499 0x0000001030000000 0x4D00000000000000)
    0x00007FF741DC8331 (0x0000000000000000 0x00007FF741DC16AA 0x000002959F0B0590 0x000000000000000B)
    0x00007FF741DC2CE1 (0x000002959ED347F0 0x000000000000000B 0x000000FE74D8B9B8 0x00007FF73FE35FDD)
    0x00007FF741DBFF39 (0x000000FE74D8BAE8 0x00007FF73FE35E20 0x0000000000000000 0x0000000000000000)
    0x00007FF741DBF966 (0x0000000000000028 0x0000000000000000 0x00000295A11304F0 0x0000000000000000)
    0x00007FF741DBD9B0 (0x0000000000000036 0x0000000000000000 0x000000FE74D8BD48 0x00007FF7421360E3)
    0x00007FF741DBCA12 (0x000002959F1ADBDC 0x000002959E9C00A0 0x00000000FFFFFFFF 0x00007FF741AEED8B)
    0x00007FF741DB8365 (0x0000000000000016 0xFFFFFFFFFFFFFFFF 0x0000000000000000 0xFFFFFFFFFFFFFFFF)
    0x00007FF741B97F80 (0x0010000000000200 0x000001003FEC54D4 0x0000000000000000 0x0000000074D40000)
    0x00007FF741B99F4B (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000)
    0x00007FF741B99493 (0x000000FE74D8BF90 0x00007FF73FE4471B 0x000002959EE8BC08 0x0000000000000000)
    0x00007FF741B995E2 (0x0000000000000006 0x00007FF73FEC5803 0x0000000000000001 0x00007FF73FEC54D5)
    0x00007FF741E0054E (0x000002959F1ADEE8 0x00007FF7401387E9 0x0000C31243696134 0x00007FF73FE35F05)
    0x00007FF741E00F43 (0x000000FE74D8D1E0 0x00007FFB60E0D46D 0x0000000000EC00D9 0x0000000000000050)
    0x00007FF741DF6C8C (0x0000000000000003 0x000002959FAD87B8 0x000000FE74D8D1E0 0x00007FF742139D00)
    0x00007FF741CEB062 (0x000002959FAD8440 0x00007FFB60E0B3E1 0x000000000000000F 0x000002959CF80000)
    0x00007FF741CF8426 (0x0000000000000002 0x00007FF700000000 0x0000029500000000 0x0031B9250000A80B)
    0x00007FF741CEAF3D (0x0000000000000002 0x000002959FAD8BC8 0x000000FE74D8D1E0 0x00007FF742139D00)
    0x00007FF741CEB236 (0x000002959FAD8B20 0x00007FFB60E0B3E1 0x000000000000000F 0x000002959CF80000)
    0x00007FF741CF8426 (0x0000000000000002 0x00007FF700000000 0x0000029500000000 0x000002959CF50303)
    0x00007FF741CEAF3D (0x0000000000000001 0x000002959FADA4C8 0x000000FE74D8D1E0 0x00007FF742139D00)
    0x00007FF741CEB236 (0x000002959FAD8B20 0x00007FFB60E0B3E1 0x000000000000000F 0x000002959CF80000)
    0x00007FF741CF8426 (0x0000000000000002 0x00007FF700000000 0x0000000000050001 0x0000000800000303)
    0x00007FF741CEAF3D (0x000002959E9C4778 0x000000FE74D8C9A0 0x000000FE74D8D1E0 0x000002959D009DD0)
    0x00007FF741CEB236 (0x00000295A0BB3842 0x0000000000000000 0x0000000800000000 0x0000C31243691684)
    0x00007FF741CEAD10 (0x00007FF743FBCBB2 0x000002959E9FE8D0 0x0000000000000001 0x000002959E9FE8D0)
    0x00007FF741CDF32C (0x2D646E756F72522D 0x3163632D70697274 0x00000295A0C0CFB0 0x000002959D05C6B0)
    0x00007FF7406C265D (0x0000000200000000 0x000002959D05C6B0 0x000000FE74D8D460 0x000002959D009DD0)
    0x00007FF7406C2406 (0x000000FE74D8D588 0x000000FE74D8D578 0x000000FE74D8D578 0x00007FF74065031A)
    0x00007FF7412A8023 (0x0000000000000000 0x0000C31243690FB4 0x2D646E756F72522D 0x3163632D70697274)
    0x00007FF74068A9C2 (0x0000000000000070 0x000002959CF97A60 0x000000FE74D8D718 0x0000C31243690DF4)
    0x00007FF7406521BD (0x0000000000000000 0x0000000000000030 0x000000FE74D8DFA8 0x000002959CFD0000)
    0x00007FF7406F8C26 (0x00007FF7424EB703 0x0000000000000005 0x000000FE74D8D768 0x0000000000000000)
    0x00007FF73E3075C3 (0x0000000000000040 0x00007FFB60E58DAC 0x0000000000000005 0x000000000000003F)
    0x00007FF73E3047FF (0x00007FF73FE3D640 0x000002959D059E20 0x000002959CF97EA0 0x000000FE74D8E148)
    0x00007FF7405658C6 (0x000002959CF97EA0 0x000000FE74D8E130 0x000000FE74D8E148 0x00007FF73FE3D04B)
    0x00007FF73FE3D39F (0x000000000000040A 0x00007FFB60E05FCD 0x000002959CF80000 0x000000FE13081209)
    0x00007FF7405655B7 (0x0000000000000000 0x0000000000000050 0x0000000000000000 0x0000000000000060)
    0x00007FF7404A9462 (0x000000000000001F 0x000002959D011100 0x000002959D007250 0x0000000000000025)
    0x00007FF7404A9A09 (0x0000000000000050 0x00007FFB5E53BEA5 0x0000000000000006 0x0000000000000000)
    0x00007FF74048BF26 (0x000000000000020C 0x0000029500000000 0x000000FE74D8EAF9 0x00007FFB60E05B05)
    0x00007FF73E30411D (0x0000000000000000 0x00007FF742136831 0x0000000000000000 0x0000000000000000)
    0x00007FF7421367B8 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000)
    0x00007FFB5FEA4ED0 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), BaseThreadInitThunk() + 0x10 bytes(s)
    0x00007FFB60E6E39B (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), RtlUserThreadStart() + 0x2B bytes(s)
    clang++: error: clang frontend command failed due to signal (use -v to see invocation)
    clang version 13.0.0
    Target: x86_64-pc-windows-msvc
    Thread model: posix
    InstalledDir: C:\Program Files\LLVM\bin
    clang++: note: diagnostic msg: Error generating preprocessed source(s).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant