[all-commits] [llvm/llvm-project] 6c3a29: Headers: further refine the `stdatomic.h` MSVC inc...

Saleem Abdulrasool via All-commits all-commits at lists.llvm.org
Wed Dec 21 11:09:36 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6c3a2902f1f8d102aa5b3cd37def4f1420ac0c80
      https://github.com/llvm/llvm-project/commit/6c3a2902f1f8d102aa5b3cd37def4f1420ac0c80
  Author: Saleem Abdulrasool <compnerd at compnerd.org>
  Date:   2022-12-21 (Wed, 21 Dec 2022)

  Changed paths:
    M clang/lib/Headers/stdatomic.h

  Log Message:
  -----------
  Headers: further refine the `stdatomic.h` MSVC inclusion

The `stdatomic.h` header cannot be included under MSVC when in C++ mode
as the toolsets prior to 17.5.0 Preview 2 do not support the C11
atomics.  However, some toolsets prior to the aforementioned version
support the atomics under the C++ mode.  In these versions the MSVC
toolset protects against the contamination by entirely eliding the
declarations, resulting in build failures in some cases.  Unfortunately,
e0c3142af075e2ef89395dbed5939071345eb622 accidentally regressed the C
case when fixing the C++ support.

Unfortunately, we cannot test this reliably as we need to inject a
header after the resource path as a system header path, which we do not
have a reliable means of doing.

Fixes: #59640




More information about the All-commits mailing list