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

    <tr>
        <th>Summary</th>
        <td>
            [Clang-CL] source_location is not available in clang-cl tool with /std:c++20
        </td>
    </tr>

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

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

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

<pre>
    A clang tool on Windows uses clang-cl, which uses the MSVC library, and the `<source_location>` header contains this:

```cpp
#pragma once
#ifndef _SOURCE_LOCATION_
#define _SOURCE_LOCATION_
#include <yvals_core.h>
#if _STL_COMPILER_PREPROCESSOR
#ifndef __cpp_consteval
_EMIT_STL_WARNING(STL4038, "The contents of <source_location> are available only with C++20 consteval support.");
#else // ^^^ !defined(__cpp_consteval) / defined(__cpp_consteval) vvv
```

If I pass `/D__cpp_consteval` then source_location is there. As consteval is supported in Clang with C++20, should clang-cl tooling automatically set this define?

This is possibly related to https://github.com/llvm/llvm-project/issues/59689 where `_CRT_USE_BUILTIN_OFFSETOF` is not defined in a clang-cl tool.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyclE-P4jgQxT-Ncyk1CnYI5JADhGSFRDctSO8cI8cuiGfddhQ7IL79KmGg_-xoDitFIFU55fq99xTunDoZxJTMVmS2DnjvG9ulkhv-z8-gtvKaLkFobk7grdVgDfxQRtqLg96hu7WehCY0g0ujRHMr-wbh-fB3BlrVHe-uQ5sbOdZJHBKWOdt3AittBffKGsJyEofQIJfYgbDGc2WGOcoRtiThmoT33zi8PaJtf1Uoazt-eudgjcBHTR2NxCNUh93bPsur7S5blpvdS_U4IPGoDP7hgDJC9xKBsOx65tpVwnY4aYZdPy6B6lBuq2z3_LrZ5vvqdZ-_7ndZfjjs9v9ZpRJtWwlrnMcz17d2lT9vynHGj-X-ZfPyF6GLQ7mNQrYYVCOUlg2OiqDxDuwRfqse8A6Bn7nSvNYI1ugrXJRvICN0ReiKhvC4GFzftrbzE0IpoQlhq8emqB0CoQWhBZBZfnuA0OlNLEno4jsFTYYX4I8HzufzN_c-W7o5wgZa7tyYDVqsv0-IwyE5Br5hgxqT1uEElu4TnnJ3QpSgDGRjfr-qMWjrGttr-cjwmHBlTsB7b9-5V4JrfQWHfszhL0LCis-7l0NHOWitc6rWV-hQ8-Feb6Hxvh3jO-p5Ur7p64mw74QWWp_vf09tZ3-i8IQWyrkeHaHFLIkXCVwGtkGTKtuX1dshr1Zvm225eal2RXHIy10xKKMcGOvv-g-8_CvSJJApkwlLeIDpNJ5Hi3g-X0yDJk3EUaKcU5wLSjE5zuezeHqMoiSKEyZFHKiUhpSFU7oIpyELp5NYyIixhIl6Mat5IkgU4jtXejKQTGx3CkaGNA5ZNA80r1G78dtCqcELjM0hdbN10KUjfd2fHIlCrZx3H1O88nr8KI3ePWVbMlv_zv6B_CP1ynwlv3lOaOG8JGwp7uYHfafT_-_OCPdvAAAA__9tO6gP">