Generate AST when importing a cpp file (#4790)

Ignore the AST and support a single Cpp import, for now.
Report cpp compilation errors and warnings.
Part of #4666
This commit is contained in:
Boaz Brickner
2025-01-14 20:45:50 +00:00
committed by GitHub
parent f5f6ae214d
commit 5b70a3ea91
16 changed files with 481 additions and 25 deletions
+4 -1
View File
@@ -24,6 +24,9 @@ constexpr DiagnosticKind UntestedDiagnosticKinds[] = {
DiagnosticKind::TestDiagnostic,
DiagnosticKind::TestDiagnosticNote,
// Driver specific.
DiagnosticKind::CppInteropFuzzing,
// These diagnose filesystem issues that are hard to unit test.
DiagnosticKind::ErrorReadingFile,
DiagnosticKind::ErrorStattingFile,
@@ -42,7 +45,7 @@ constexpr DiagnosticKind UntestedDiagnosticKinds[] = {
// Looks for diagnostic kinds that aren't covered by a file_test.
TEST(Coverage, DiagnosticKind) {
Testing::TestKindCoverage(absl::GetFlag(FLAGS_testdata_manifest),
R"(^ *// CHECK:STDERR: .*\.carbon:.* \[(\w+)\]$)",
R"(^ *// CHECK:STDERR: .* \[(\w+)\]$)",
llvm::ArrayRef(DiagnosticKinds),
llvm::ArrayRef(UntestedDiagnosticKinds));
}