diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt --- a/clang/CMakeLists.txt +++ b/clang/CMakeLists.txt @@ -251,7 +251,7 @@ set(CLANG_ENABLE_OPAQUE_POINTERS "DEFAULT" CACHE STRING "Enable opaque pointers by default") if(CLANG_ENABLE_OPAQUE_POINTERS STREQUAL "DEFAULT") - set(CLANG_ENABLE_OPAQUE_POINTERS_INTERNAL OFF) + set(CLANG_ENABLE_OPAQUE_POINTERS_INTERNAL ON) elseif(CLANG_ENABLE_OPAQUE_POINTERS) set(CLANG_ENABLE_OPAQUE_POINTERS_INTERNAL ON) else() diff --git a/llvm/docs/OpaquePointers.rst b/llvm/docs/OpaquePointers.rst --- a/llvm/docs/OpaquePointers.rst +++ b/llvm/docs/OpaquePointers.rst @@ -195,8 +195,10 @@ ================ As of April 2022 both LLVM and Clang have complete support for opaque pointers, -but typed pointers are still the default. Opaque pointers will be enabled by -default in Clang soon. +and opaque pointers are enabled by default in Clang. It is possible to +temporarily restore the old default using the +``-DCLANG_ENABLE_OPAQUE_POINTERS=OFF`` cmake option. Opaque pointers can be +disabled for a single Clang invocation using ``-Xclang -no-opaque-pointers``. The MLIR and Polly monorepo projects are not fully compatible with opaque pointers yet.