<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/57038>57038</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Crash on ill-formed code with preprocessed sources
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          JohelEGP
      </td>
    </tr>
</table>

<pre>
    [waarudo-51b326.zip](https://github.com/llvm/llvm-project/files/9296033/waarudo-51b326.zip)
```terminal
/home/johel/Documents/C++/Repos/Waarudo/sources/quantities/waarudo.quantities.bigint.cpp:219:103: error: non-constant-expression cannot be narrowed from type 'int' to 'char' in initializer list [-Wc++11-narrowing]
  constexpr auto digits = [](const char front, const char back) { return std::views::iota(front, char{back + 1}); };
                                                                                                      ^~~~~~~~
/home/johel/Documents/C++/Repos/Waarudo/sources/quantities/waarudo.quantities.bigint.cpp:219:103: note: insert an explicit cast to silence this issue
  constexpr auto digits = [](const char front, const char back) { return std::views::iota(front, char{back + 1}); };
                                                                                                      ^~~~~~~~
                                                                                                      static_cast<char>( )
/home/johel/Documents/C++/Repos/Waarudo/sources/quantities/waarudo.quantities.bigint.cpp:221:57: error: redefinition of 'digits' with a different type: 'const std::vector<std::ranges::iota_view<char, char>>' vs 'const (lambda at /home/johel/Documents/C++/Repos/Waarudo/sources/quantities/waarudo.quantities.bigint.cpp:219:27)'
  const std::vector<std::ranges::iota_view<char, char>> digits =
                                                        ^
/home/johel/Documents/C++/Repos/Waarudo/sources/quantities/waarudo.quantities.bigint.cpp:219:18: note: previous definition is here
  constexpr auto digits = [](const char front, const char back) { return std::views::iota(front, char{back + 1}); };
                 ^
/home/johel/Documents/C++/Repos/Waarudo/sources/quantities/waarudo.quantities.bigint.cpp:222:18: error: no matching constructor for initialization of 'decltype(digits)' (aka 'const (lambda at /home/johel/Documents/C++/Repos/Waarudo/sources/quantities/waarudo.quantities.bigint.cpp:219:27)')
    base <= 10 ? decltype(digits){std::views::iota('0', char{'9' + 1})}
                 ^               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/johel/Documents/C++/Repos/Waarudo/sources/quantities/waarudo.quantities.bigint.cpp:219:27: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'decltype(ranges::iota_view<char, char>(std::forward<char>(__start), std::forward<char>(__bound_sentinel)))' (aka 'iota_view<char, char>') to 'const (lambda at /home/johel/Documents/C++/Repos/Waarudo/sources/quantities/waarudo.quantities.bigint.cpp:219:27)' for 1st argument
  constexpr auto digits = [](const char front, const char back) { return std::views::iota(front, char{back + 1}); };
                          ^
/home/johel/Documents/C++/Repos/Waarudo/sources/quantities/waarudo.quantities.bigint.cpp:219:27: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'decltype(ranges::iota_view<char, char>(std::forward<char>(__start), std::forward<char>(__bound_sentinel)))' (aka 'iota_view<char, char>') to '(lambda at /home/johel/Documents/C++/Repos/Waarudo/sources/quantities/waarudo.quantities.bigint.cpp:219:27)' for 1st argument
  constexpr auto digits = [](const char front, const char back) { return std::views::iota(front, char{back + 1}); };
                          ^
/home/johel/Documents/C++/Repos/Waarudo/sources/quantities/waarudo.quantities.bigint.cpp:219:27: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 1 was provided
/home/johel/root/clang/bin/../include/c++/v1/__ranges/view_interface.h:67:22: note: candidate template ignored: could not match 'bool' against '(lambda at /home/johel/Documents/C++/Repos/Waarudo/sources/quantities/waarudo.quantities.bigint.cpp:219:27)'
  constexpr explicit operator bool()
                     ^
/home/johel/root/clang/bin/../include/c++/v1/__ranges/view_interface.h:75:22: note: candidate template ignored: could not match 'bool' against '(lambda at /home/johel/Documents/C++/Repos/Waarudo/sources/quantities/waarudo.quantities.bigint.cpp:219:27)'
  constexpr explicit operator bool() const
                     ^
/home/johel/Documents/C++/Repos/Waarudo/sources/quantities/waarudo.quantities.bigint.cpp:223:18: error: no matching constructor for initialization of 'decltype(digits)' (aka 'const (lambda at /home/johel/Documents/C++/Repos/Waarudo/sources/quantities/waarudo.quantities.bigint.cpp:219:27)')
               : decltype(digits){
                 ^               ~
/home/johel/Documents/C++/Repos/Waarudo/sources/quantities/waarudo.quantities.bigint.cpp:219:27: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 3 were provided
  constexpr auto digits = [](const char front, const char back) { return std::views::iota(front, char{back + 1}); };
                          ^
/home/johel/Documents/C++/Repos/Waarudo/sources/quantities/waarudo.quantities.bigint.cpp:219:27: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 3 were provided
/home/johel/Documents/C++/Repos/Waarudo/sources/quantities/waarudo.quantities.bigint.cpp:219:27: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 3 were provided
```
...
```terminal
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /home/johel/root/clang/bin/clang++ -isystem /home/johel/Documents/C++/Repos/Waarudo/sources/details/std -stdlib=libc++ -D_LIBCPP_ENABLE_EXPERIMENTAL=1 -pedantic -Wall -Wextra -Wconversion -Werror=missing-field-initializers -O3 -DNDEBUG -fmodules -fbuiltin-module-map -fprebuilt-module-path=/home/johel/tmp/Waarudo_builds/ClangRelease/JEGPModules -std=c++2b -MD -MT quantities/CMakeFiles/waarudo.quantities.bigint.dir/waarudo.quantities.bigint.cpp.o -MF CMakeFiles/waarudo.quantities.bigint.dir/waarudo.quantities.bigint.cpp.o.d -o CMakeFiles/waarudo.quantities.bigint.dir/waarudo.quantities.bigint.cpp.o -c /home/johel/Documents/C++/Repos/Waarudo/sources/quantities/waarudo.quantities.bigint.cpp
1.      /home/johel/Documents/C++/Repos/Waarudo/sources/quantities/waarudo.quantities.bigint.cpp:268:1: current parser token 'constexpr'
2.      /home/johel/Documents/C++/Repos/Waarudo/sources/quantities/waarudo.quantities.bigint.cpp:6:1: parsing namespace 'waarudo'
3.      /home/johel/Documents/C++/Repos/Waarudo/sources/quantities/waarudo.quantities.bigint.cpp:216:120: parsing function body 'waarudo::from_chars'
 #0 0x00005587eb3e833a (/home/johel/root/clang/bin/clang+++0x1a1a33a)
 #1 0x00005587eb3e5c1f (/home/johel/root/clang/bin/clang+++0x1a17c1f)
 #2 0x00005587eb34d949 (/home/johel/root/clang/bin/clang+++0x197f949)
 #3 0x00007f234cc3e8e0 (/usr/lib/libc.so.6+0x3e8e0)
 #4 0x00005587eddba460 (/home/johel/root/clang/bin/clang+++0x43ec460)
 #5 0x00005587eddd30d8 (/home/johel/root/clang/bin/clang+++0x44050d8)
 #6 0x00005587eddd3177 (/home/johel/root/clang/bin/clang+++0x4405177)
 #7 0x00005587eddf2081 (/home/johel/root/clang/bin/clang+++0x4424081)
 #8 0x00005587eddf1f57 (/home/johel/root/clang/bin/clang+++0x4423f57)
 #9 0x00005587eddf911e (/home/johel/root/clang/bin/clang+++0x442b11e)
#10 0x00005587ede2d870 (/home/johel/root/clang/bin/clang+++0x445f870)
#11 0x00005587ed3e775c (/home/johel/root/clang/bin/clang+++0x3a1975c)
#12 0x00005587ed35f40b (/home/johel/root/clang/bin/clang+++0x399140b)
#13 0x00005587ed14d844 (/home/johel/root/clang/bin/clang+++0x377f844)
#14 0x00005587ed07a20b (/home/johel/root/clang/bin/clang+++0x36ac20b)
#15 0x00005587ed0a6103 (/home/johel/root/clang/bin/clang+++0x36d8103)
#16 0x00005587ed076464 (/home/johel/root/clang/bin/clang+++0x36a8464)
#17 0x00005587ed07d4bb (/home/johel/root/clang/bin/clang+++0x36af4bb)
#18 0x00005587ed0bf9f3 (/home/johel/root/clang/bin/clang+++0x36f19f3)
#19 0x00005587ed0c4c3a (/home/johel/root/clang/bin/clang+++0x36f6c3a)
#20 0x00005587ed0a9bf3 (/home/johel/root/clang/bin/clang+++0x36dbbf3)
#21 0x00005587ed07cfa9 (/home/johel/root/clang/bin/clang+++0x36aefa9)
#22 0x00005587ed07e5e3 (/home/johel/root/clang/bin/clang+++0x36b05e3)
#23 0x00005587ed06f9bb (/home/johel/root/clang/bin/clang+++0x36a19bb)
#24 0x00005587ebebf699 (/home/johel/root/clang/bin/clang+++0x24f1699)
#25 0x00005587ebe48d7c (/home/johel/root/clang/bin/clang+++0x247ad7c)
#26 0x00005587ebf7391f (/home/johel/root/clang/bin/clang+++0x25a591f)
#27 0x00005587ea0ff958 (/home/johel/root/clang/bin/clang+++0x731958)
#28 0x00005587ea0f91b7 (/home/johel/root/clang/bin/clang+++0x72b1b7)
#29 0x00005587ebcb6969 (/home/johel/root/clang/bin/clang+++0x22e8969)
#30 0x00005587eb34df4b (/home/johel/root/clang/bin/clang+++0x197ff4b)
#31 0x00005587ebcb6daf (/home/johel/root/clang/bin/clang+++0x22e8daf)
#32 0x00005587ebc82168 (/home/johel/root/clang/bin/clang+++0x22b4168)
#33 0x00005587ebc82b9d (/home/johel/root/clang/bin/clang+++0x22b4b9d)
#34 0x00005587ebc904bd (/home/johel/root/clang/bin/clang+++0x22c24bd)
#35 0x00005587ea0fdb3b (/home/johel/root/clang/bin/clang+++0x72fb3b)
#36 0x00007f234cc29290 (/usr/lib/libc.so.6+0x29290)
#37 0x00007f234cc2934a __libc_start_main (/usr/lib/libc.so.6+0x2934a)
#38 0x00005587ea0f8325 (/home/johel/root/clang/bin/clang+++0x72a325)
clang-16: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 16.0.0 (https://github.com/llvm/llvm-project.git 1d1f5a5251f7570615f0669a56af0ac5b8b302bc)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /home/johel/root/clang/bin
clang-16: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-16: note: diagnostic msg: /tmp/waarudo-51b326.cpp
clang-16: note: diagnostic msg: /tmp/waarudo-51b326.cache
clang-16: note: diagnostic msg: /tmp/waarudo-51b326.sh
clang-16: note: diagnostic msg: 

********************
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJztW11T2zgX_jXhRuOMLX9fcAEkdLtDW4byTt-7jL6caGtbWdkGur9-j-R8WCltoWYLnYExji3L55HOOc_RkZRQxb8cT-LTW0J0x5UXBzTEyfQfuZ7EswnOVm27bibhyQSfw7GU7aqjU6YquCnLm-2Ht9bqL8FauC1kKRr4zHGe-GEIV_eIxvnEn038k0ni90crdCVrUm6K8flKVQI-_lIrUcLnTLGuEnVrJJ9N8Kk9zq_EWpmSTz0CXDWq08zi_92RupWttDebJkz3hVMql7Jup2y9ht7hIIdz4IdwRkJrpc1FrWqPqbpp4SVP3K21aBqpasRIXasWUYFqAnVvBUeFVhVqv6wFmuAU5MIZtcrcsBXR5k7WcAA0KeU_QqNSNi0CvXufWN-dIPB6abJeGtVbRSBk8Q02Ih0I5NDqtkGTcGZe7k1kqyCDY5phsM_QoIwS9hkUjibpKdKi7XSNmpYbk4YnN1LcNv2lVC0BYXsJpt3pqXkbunGKgkk6M3YLT5G5Ck-3LfwVf5N4PknvO16Au4ArCPMp60boFpEagblKySTon4ARwGoNcKJmArUr2SDZNJ14Ne_Dzftr2gAsbyVbGJNNwjOrnnAOGkP7YPXL3QwHcI5TJyhpwUVhIwlEIlWYENN7jQkytxCfEQE3KgqhoWE2JJm3TCCyPrP3DQjXRuLZrkSTeikG7rIw7rPVxdZlQCdGLSm6afZCQU0lqSgniJibZ2EjTo2h4Dxk1tN0d0DLcR5p_PxZI1Y2DFgwnt1I1TVo4FAQn1bgOb9teHpGDWO80_Agg0AVadkKxvReKbozbogK-N9lA2RIZcFKy1mcbVltnNowjHwmL5Rx2wBpDEBJAzlQeGZ8JPDh6hzd26f09DtuAEJ9K3jnCHC30cPeF9JvsRGc4LDk3tHlPz2ek-c4HfIc0lUuOWmF44Kg5nYlkKy2uYpafxlWMKQ1We6NJLQUG2f-XKvb2tS6Edqmwjbvdf32oXEVZzsPADrcEs2dcXexg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