C++ Interop: Make CppVoidType always-incomplete (#6302)

Part of https://github.com/carbon-language/carbon-lang/issues/6280.
This commit is contained in:
Boaz Brickner
2025-11-03 09:43:39 +00:00
committed by GitHub
parent ca3f95faa6
commit 94bb6be185
3 changed files with 20 additions and 4 deletions
@@ -84,13 +84,18 @@ fn F() {
//@dump-sem-ir-end
}
// --- todo_fail_void.carbon
// --- fail_void.carbon
library "[[@TEST_NAME]]";
import Cpp inline "";
fn F(x: Cpp.void);
// CHECK:STDERR: fail_void.carbon:[[@LINE+5]]:6: error: parameter has incomplete type `Cpp.void` in function definition [IncompleteTypeInFunctionParam]
// CHECK:STDERR: fn F(x: Cpp.void) {}
// CHECK:STDERR: ^~~~~~~~~~~
// CHECK:STDERR: fail_void.carbon: note: `Cpp.void` is always-incomplete [CppVoidIncomplete]
// CHECK:STDERR:
fn F(x: Cpp.void) {}
// --- non_nullable_pointer.carbon