Changes

Summary

  1. Reapply "[cmake][msvc] Enable standards-conforming preprocessor" (details)
  2. Revert "[LSAN] Fix pthread_create interceptor to ignore leaks in real pthread_create." (details)
  3. [mlir][sparse] Implement hybrid quick sort for sparse_tensor.sort. (details)
  4. [-Wunsafe-buffer-usage] Add unsafe buffer checking opt-out pragmas (details)
Commit 401dee445196a4a97b2ad2ca7cfc125b776be7f3 by Jan Svoboda
Reapply "[cmake][msvc] Enable standards-conforming preprocessor"

This reverts commit 16e1a49441c51817697138437d8db2c15bc19cb4, essentially reapplying 12d8e7c6ade55bba241259312e3e4bdcf6aeab81. The build bot where this caused issues is supposed to be updated now: https://reviews.llvm.org/D135128#4108588
The file was modifiedllvm/cmake/modules/HandleLLVMOptions.cmake (diff)
Commit 550cb763dac4234b5d76bcafdda0471e38be05fa by kstoimenov
Revert "[LSAN] Fix pthread_create interceptor to ignore leaks in real pthread_create."

This reverts commit a7db3cb257ff6396481f44427bccd0ca5abf4d63.
The file was modifiedcompiler-rt/test/lsan/TestCases/leak_check_before_thread_started.cpp (diff)
The file was modifiedcompiler-rt/test/lsan/TestCases/high_allocator_contention.cpp (diff)
The file was modifiedcompiler-rt/lib/hwasan/hwasan_interceptors.cpp (diff)
The file was modifiedcompiler-rt/test/lsan/TestCases/Linux/disabler_in_tsd_destructor.c (diff)
Commit a1507668807e6108c12ffecf3740cb339b15018d by bixia1
[mlir][sparse] Implement hybrid quick sort for sparse_tensor.sort.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D143227
The file was modifiedmlir/test/Dialect/SparseTensor/buffer_rewriting.mlir (diff)
The file was modifiedmlir/test/Integration/Dialect/SparseTensor/CPU/sparse_rewrite_sort_coo.mlir (diff)
The file was modifiedmlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.h (diff)
The file was modifiedmlir/test/Integration/Dialect/SparseTensor/CPU/sparse_rewrite_sort.mlir (diff)
The file was modifiedmlir/lib/Dialect/SparseTensor/Transforms/SparseBufferRewriting.cpp (diff)
Commit 829bcb06ec43ab4b56b95ff040ec9d36feeaf06a by ziqing
[-Wunsafe-buffer-usage] Add unsafe buffer checking opt-out pragmas

Add a pair of clang pragmas:
- `#pragma clang unsafe_buffer_usage begin` and
- `#pragma clang unsafe_buffer_usage end`,
which specify the start and end of an (unsafe buffer checking) opt-out
region, respectively.

Behaviors of opt-out regions conform to the following rules:

- No nested nor overlapped opt-out regions are allowed. One cannot
  start an opt-out region with `... unsafe_buffer_usage begin` but never
  close it with `... unsafe_buffer_usage end`. Mis-use of the pragmas
  will be warned.
- Warnings raised from unsafe buffer operations inside such an opt-out
  region will always be suppressed. This behavior CANNOT be changed by
  `clang diagnostic` pragmas or command-line flags.
- Warnings raised from unsafe operations outside of such opt-out
  regions may be reported on declarations inside opt-out
  regions. These warnings are NOT suppressed.
- An un-suppressed unsafe operation warning may be attached with
  notes. These notes are NOT suppressed as well regardless of whether
  they are in opt-out regions.

The implementation maintains a separate sequence of location pairs
representing opt-out regions in `Preprocessor`.  The `UnsafeBufferUsage`
analyzer reads the region sequence to check if an unsafe operation is
in an opt-out region. If it is, discard the warning raised from the
operation immediately.

This is a re-land after I reverting it at 9aa00c8a306561c4e3ddb09058e66bae322a0769.
The compilation error should be resolved.

Reviewed by: NoQ

Differential revision: https://reviews.llvm.org/D140179
The file was modifiedclang/lib/Analysis/UnsafeBufferUsage.cpp (diff)
The file was addedclang/test/SemaCXX/warn-unsafe-buffer-usage-pragma.h
The file was addedclang/test/SemaCXX/warn-unsafe-buffer-usage-pragma.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticLexKinds.td (diff)
The file was modifiedclang/include/clang/Lex/Preprocessor.h (diff)
The file was addedclang/test/SemaCXX/warn-unsafe-buffer-usage-pragma-fixit.cpp
The file was modifiedclang/lib/Sema/AnalysisBasedWarnings.cpp (diff)
The file was modifiedclang/lib/Lex/PPLexerChange.cpp (diff)
The file was addedclang/test/SemaCXX/warn-unsafe-buffer-usage-pragma-misuse.cpp
The file was modifiedclang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h (diff)
The file was modifiedclang/lib/Lex/Pragma.cpp (diff)
The file was modifiedclang/lib/Lex/Preprocessor.cpp (diff)