|
|
@@ -17,21 +17,18 @@
|
|
|
|
|
|
// --- one_error.h
|
|
|
|
|
|
-// CHECK:STDERR: ./one_error.h:[[@LINE+6]]: error: C++:
|
|
|
-// CHECK:STDERR: In file included from fail_import_cpp_file_with_one_error.carbon.generated.cpp_imports.h:1:
|
|
|
-// CHECK:STDERR: ./one_error.h:[[@LINE+4]]:2: error: "error1"
|
|
|
-// CHECK:STDERR: 8 | #error "error1"
|
|
|
-// CHECK:STDERR: | ^
|
|
|
-// CHECK:STDERR: [CppInteropParseError]
|
|
|
#error "error1"
|
|
|
|
|
|
// --- fail_import_cpp_file_with_one_error.carbon
|
|
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
|
|
-// CHECK:STDERR: fail_import_cpp_file_with_one_error.carbon:[[@LINE+4]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "one_error.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
+// CHECK:STDERR: fail_import_cpp_file_with_one_error.carbon:[[@LINE+7]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./one_error.h:2: error: In file included from fail_import_cpp_file_with_one_error.carbon.generated.cpp_imports.h:1:
|
|
|
+// CHECK:STDERR: ./one_error.h:2:2: error: "error1"
|
|
|
+// CHECK:STDERR: 2 | #error "error1"
|
|
|
+// CHECK:STDERR: | ^
|
|
|
+// CHECK:STDERR: [CppInteropParseError]
|
|
|
// CHECK:STDERR:
|
|
|
import Cpp library "one_error.h";
|
|
|
|
|
|
@@ -41,12 +38,6 @@ import Cpp library "one_error.h";
|
|
|
|
|
|
// --- multiple_errors.h
|
|
|
|
|
|
-// CHECK:STDERR: ./multiple_errors.h:[[@LINE+6]]: error: C++:
|
|
|
-// CHECK:STDERR: In file included from fail_import_cpp_file_with_multiple_errors.carbon.generated.cpp_imports.h:1:
|
|
|
-// CHECK:STDERR: ./multiple_errors.h:[[@LINE+4]]:2: error: "error1"
|
|
|
-// CHECK:STDERR: 8 | #error "error1"
|
|
|
-// CHECK:STDERR: | ^
|
|
|
-// CHECK:STDERR: [CppInteropParseError]
|
|
|
#error "error1"
|
|
|
#error "error2"
|
|
|
|
|
|
@@ -54,19 +45,19 @@ import Cpp library "one_error.h";
|
|
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
|
|
-// CHECK:STDERR: fail_import_cpp_file_with_multiple_errors.carbon:[[@LINE+14]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "multiple_errors.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
+// CHECK:STDERR: fail_import_cpp_file_with_multiple_errors.carbon:[[@LINE+14]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./multiple_errors.h:2: error: In file included from fail_import_cpp_file_with_multiple_errors.carbon.generated.cpp_imports.h:1:
|
|
|
+// CHECK:STDERR: ./multiple_errors.h:2:2: error: "error1"
|
|
|
+// CHECK:STDERR: 2 | #error "error1"
|
|
|
+// CHECK:STDERR: | ^
|
|
|
+// CHECK:STDERR: [CppInteropParseError]
|
|
|
// CHECK:STDERR:
|
|
|
-// CHECK:STDERR: ./multiple_errors.h:9: error: C++:
|
|
|
-// CHECK:STDERR: In file included from fail_import_cpp_file_with_multiple_errors.carbon.generated.cpp_imports.h:1:
|
|
|
-// CHECK:STDERR: ./multiple_errors.h:9:2: error: "error2"
|
|
|
-// CHECK:STDERR: 9 | #error "error2"
|
|
|
+// CHECK:STDERR: fail_import_cpp_file_with_multiple_errors.carbon:[[@LINE+7]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./multiple_errors.h:3: error: In file included from fail_import_cpp_file_with_multiple_errors.carbon.generated.cpp_imports.h:1:
|
|
|
+// CHECK:STDERR: ./multiple_errors.h:3:2: error: "error2"
|
|
|
+// CHECK:STDERR: 3 | #error "error2"
|
|
|
// CHECK:STDERR: | ^
|
|
|
// CHECK:STDERR: [CppInteropParseError]
|
|
|
-// CHECK:STDERR: fail_import_cpp_file_with_multiple_errors.carbon:[[@LINE+4]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "multiple_errors.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
// CHECK:STDERR:
|
|
|
import Cpp library "multiple_errors.h";
|
|
|
|
|
|
@@ -76,21 +67,18 @@ import Cpp library "multiple_errors.h";
|
|
|
|
|
|
// --- one_warning.h
|
|
|
|
|
|
-// CHECK:STDERR: ./one_warning.h:[[@LINE+6]]: warning: C++:
|
|
|
-// CHECK:STDERR: In file included from import_cpp_file_with_one_warning.carbon.generated.cpp_imports.h:1:
|
|
|
-// CHECK:STDERR: ./one_warning.h:[[@LINE+4]]:2: warning: "warning1"
|
|
|
-// CHECK:STDERR: 8 | #warning "warning1"
|
|
|
-// CHECK:STDERR: | ^
|
|
|
-// CHECK:STDERR: [CppInteropParseWarning]
|
|
|
#warning "warning1"
|
|
|
|
|
|
// --- import_cpp_file_with_one_warning.carbon
|
|
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
|
|
-// CHECK:STDERR: import_cpp_file_with_one_warning.carbon:[[@LINE+4]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "one_warning.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
+// CHECK:STDERR: import_cpp_file_with_one_warning.carbon:[[@LINE+7]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./one_warning.h:2: warning: In file included from import_cpp_file_with_one_warning.carbon.generated.cpp_imports.h:1:
|
|
|
+// CHECK:STDERR: ./one_warning.h:2:2: warning: "warning1"
|
|
|
+// CHECK:STDERR: 2 | #warning "warning1"
|
|
|
+// CHECK:STDERR: | ^
|
|
|
+// CHECK:STDERR: [CppInteropParseWarning]
|
|
|
// CHECK:STDERR:
|
|
|
import Cpp library "one_warning.h";
|
|
|
|
|
|
@@ -100,12 +88,6 @@ import Cpp library "one_warning.h";
|
|
|
|
|
|
// --- multiple_warnings.h
|
|
|
|
|
|
-// CHECK:STDERR: ./multiple_warnings.h:[[@LINE+6]]: warning: C++:
|
|
|
-// CHECK:STDERR: In file included from import_cpp_file_with_multiple_warnings.carbon.generated.cpp_imports.h:1:
|
|
|
-// CHECK:STDERR: ./multiple_warnings.h:[[@LINE+4]]:2: warning: "warning1"
|
|
|
-// CHECK:STDERR: 8 | #warning "warning1"
|
|
|
-// CHECK:STDERR: | ^
|
|
|
-// CHECK:STDERR: [CppInteropParseWarning]
|
|
|
#warning "warning1"
|
|
|
#warning "warning2"
|
|
|
#warning "warning3"
|
|
|
@@ -114,29 +96,26 @@ import Cpp library "one_warning.h";
|
|
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
|
|
-// CHECK:STDERR: import_cpp_file_with_multiple_warnings.carbon:[[@LINE+24]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "multiple_warnings.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
+// CHECK:STDERR: import_cpp_file_with_multiple_warnings.carbon:[[@LINE+21]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./multiple_warnings.h:2: warning: In file included from import_cpp_file_with_multiple_warnings.carbon.generated.cpp_imports.h:1:
|
|
|
+// CHECK:STDERR: ./multiple_warnings.h:2:2: warning: "warning1"
|
|
|
+// CHECK:STDERR: 2 | #warning "warning1"
|
|
|
+// CHECK:STDERR: | ^
|
|
|
+// CHECK:STDERR: [CppInteropParseWarning]
|
|
|
// CHECK:STDERR:
|
|
|
-// CHECK:STDERR: ./multiple_warnings.h:9: warning: C++:
|
|
|
-// CHECK:STDERR: In file included from import_cpp_file_with_multiple_warnings.carbon.generated.cpp_imports.h:1:
|
|
|
-// CHECK:STDERR: ./multiple_warnings.h:9:2: warning: "warning2"
|
|
|
-// CHECK:STDERR: 9 | #warning "warning2"
|
|
|
+// CHECK:STDERR: import_cpp_file_with_multiple_warnings.carbon:[[@LINE+14]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./multiple_warnings.h:3: warning: In file included from import_cpp_file_with_multiple_warnings.carbon.generated.cpp_imports.h:1:
|
|
|
+// CHECK:STDERR: ./multiple_warnings.h:3:2: warning: "warning2"
|
|
|
+// CHECK:STDERR: 3 | #warning "warning2"
|
|
|
// CHECK:STDERR: | ^
|
|
|
// CHECK:STDERR: [CppInteropParseWarning]
|
|
|
-// CHECK:STDERR: import_cpp_file_with_multiple_warnings.carbon:[[@LINE+14]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "multiple_warnings.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
// CHECK:STDERR:
|
|
|
-// CHECK:STDERR: ./multiple_warnings.h:10: warning: C++:
|
|
|
-// CHECK:STDERR: In file included from import_cpp_file_with_multiple_warnings.carbon.generated.cpp_imports.h:1:
|
|
|
-// CHECK:STDERR: ./multiple_warnings.h:10:2: warning: "warning3"
|
|
|
-// CHECK:STDERR: 10 | #warning "warning3"
|
|
|
+// CHECK:STDERR: import_cpp_file_with_multiple_warnings.carbon:[[@LINE+7]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./multiple_warnings.h:4: warning: In file included from import_cpp_file_with_multiple_warnings.carbon.generated.cpp_imports.h:1:
|
|
|
+// CHECK:STDERR: ./multiple_warnings.h:4:2: warning: "warning3"
|
|
|
+// CHECK:STDERR: 4 | #warning "warning3"
|
|
|
// CHECK:STDERR: | ^
|
|
|
// CHECK:STDERR: [CppInteropParseWarning]
|
|
|
-// CHECK:STDERR: import_cpp_file_with_multiple_warnings.carbon:[[@LINE+4]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "multiple_warnings.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
// CHECK:STDERR:
|
|
|
import Cpp library "multiple_warnings.h";
|
|
|
|
|
|
@@ -146,12 +125,6 @@ import Cpp library "multiple_warnings.h";
|
|
|
|
|
|
// --- one_error_and_one_warning.h
|
|
|
|
|
|
-// CHECK:STDERR: ./one_error_and_one_warning.h:[[@LINE+6]]: error: C++:
|
|
|
-// CHECK:STDERR: In file included from fail_import_cpp_file_with_one_error_and_one_warning.carbon.generated.cpp_imports.h:1:
|
|
|
-// CHECK:STDERR: ./one_error_and_one_warning.h:[[@LINE+4]]:2: error: "error1"
|
|
|
-// CHECK:STDERR: 8 | #error "error1"
|
|
|
-// CHECK:STDERR: | ^
|
|
|
-// CHECK:STDERR: [CppInteropParseError]
|
|
|
#error "error1"
|
|
|
#warning "warning1"
|
|
|
|
|
|
@@ -159,19 +132,19 @@ import Cpp library "multiple_warnings.h";
|
|
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
|
|
-// CHECK:STDERR: fail_import_cpp_file_with_one_error_and_one_warning.carbon:[[@LINE+14]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "one_error_and_one_warning.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
+// CHECK:STDERR: fail_import_cpp_file_with_one_error_and_one_warning.carbon:[[@LINE+14]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./one_error_and_one_warning.h:2: error: In file included from fail_import_cpp_file_with_one_error_and_one_warning.carbon.generated.cpp_imports.h:1:
|
|
|
+// CHECK:STDERR: ./one_error_and_one_warning.h:2:2: error: "error1"
|
|
|
+// CHECK:STDERR: 2 | #error "error1"
|
|
|
+// CHECK:STDERR: | ^
|
|
|
+// CHECK:STDERR: [CppInteropParseError]
|
|
|
// CHECK:STDERR:
|
|
|
-// CHECK:STDERR: ./one_error_and_one_warning.h:9: warning: C++:
|
|
|
-// CHECK:STDERR: In file included from fail_import_cpp_file_with_one_error_and_one_warning.carbon.generated.cpp_imports.h:1:
|
|
|
-// CHECK:STDERR: ./one_error_and_one_warning.h:9:2: warning: "warning1"
|
|
|
-// CHECK:STDERR: 9 | #warning "warning1"
|
|
|
+// CHECK:STDERR: fail_import_cpp_file_with_one_error_and_one_warning.carbon:[[@LINE+7]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./one_error_and_one_warning.h:3: warning: In file included from fail_import_cpp_file_with_one_error_and_one_warning.carbon.generated.cpp_imports.h:1:
|
|
|
+// CHECK:STDERR: ./one_error_and_one_warning.h:3:2: warning: "warning1"
|
|
|
+// CHECK:STDERR: 3 | #warning "warning1"
|
|
|
// CHECK:STDERR: | ^
|
|
|
// CHECK:STDERR: [CppInteropParseWarning]
|
|
|
-// CHECK:STDERR: fail_import_cpp_file_with_one_error_and_one_warning.carbon:[[@LINE+4]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "one_error_and_one_warning.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
// CHECK:STDERR:
|
|
|
import Cpp library "one_error_and_one_warning.h";
|
|
|
|
|
|
@@ -181,12 +154,6 @@ import Cpp library "one_error_and_one_warning.h";
|
|
|
|
|
|
// --- multiple_errors_and_multiple_warnings.h
|
|
|
|
|
|
-// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:[[@LINE+6]]: error: C++:
|
|
|
-// CHECK:STDERR: In file included from fail_import_cpp_file_with_multiple_errors_and_multiple_warnings.carbon.generated.cpp_imports.h:1:
|
|
|
-// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:[[@LINE+4]]:2: error: "error1"
|
|
|
-// CHECK:STDERR: 8 | #error "error1"
|
|
|
-// CHECK:STDERR: | ^
|
|
|
-// CHECK:STDERR: [CppInteropParseError]
|
|
|
#error "error1"
|
|
|
#error "error2"
|
|
|
#warning "warning1"
|
|
|
@@ -197,56 +164,41 @@ import Cpp library "one_error_and_one_warning.h";
|
|
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
|
|
-// CHECK:STDERR: fail_import_cpp_file_with_multiple_errors_and_multiple_warnings.carbon:[[@LINE+50]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "multiple_errors_and_multiple_warnings.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
-// CHECK:STDERR:
|
|
|
-// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:9: error: C++:
|
|
|
-// CHECK:STDERR: In file included from fail_import_cpp_file_with_multiple_errors_and_multiple_warnings.carbon.generated.cpp_imports.h:1:
|
|
|
-// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:9:2: error: "error2"
|
|
|
-// CHECK:STDERR: 9 | #error "error2"
|
|
|
+// CHECK:STDERR: fail_import_cpp_file_with_multiple_errors_and_multiple_warnings.carbon:[[@LINE+35]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:2: error: In file included from fail_import_cpp_file_with_multiple_errors_and_multiple_warnings.carbon.generated.cpp_imports.h:1:
|
|
|
+// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:2:2: error: "error1"
|
|
|
+// CHECK:STDERR: 2 | #error "error1"
|
|
|
// CHECK:STDERR: | ^
|
|
|
// CHECK:STDERR: [CppInteropParseError]
|
|
|
-// CHECK:STDERR: fail_import_cpp_file_with_multiple_errors_and_multiple_warnings.carbon:[[@LINE+40]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "multiple_errors_and_multiple_warnings.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
// CHECK:STDERR:
|
|
|
-// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:10: warning: C++:
|
|
|
-// CHECK:STDERR: In file included from fail_import_cpp_file_with_multiple_errors_and_multiple_warnings.carbon.generated.cpp_imports.h:1:
|
|
|
-// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:10:2: warning: "warning1"
|
|
|
-// CHECK:STDERR: 10 | #warning "warning1"
|
|
|
+// CHECK:STDERR: fail_import_cpp_file_with_multiple_errors_and_multiple_warnings.carbon:[[@LINE+28]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:3: error: In file included from fail_import_cpp_file_with_multiple_errors_and_multiple_warnings.carbon.generated.cpp_imports.h:1:
|
|
|
+// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:3:2: error: "error2"
|
|
|
+// CHECK:STDERR: 3 | #error "error2"
|
|
|
// CHECK:STDERR: | ^
|
|
|
-// CHECK:STDERR: [CppInteropParseWarning]
|
|
|
-// CHECK:STDERR: fail_import_cpp_file_with_multiple_errors_and_multiple_warnings.carbon:[[@LINE+30]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "multiple_errors_and_multiple_warnings.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
+// CHECK:STDERR: [CppInteropParseError]
|
|
|
// CHECK:STDERR:
|
|
|
-// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:11: warning: C++:
|
|
|
-// CHECK:STDERR: In file included from fail_import_cpp_file_with_multiple_errors_and_multiple_warnings.carbon.generated.cpp_imports.h:1:
|
|
|
-// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:11:2: warning: "warning2"
|
|
|
-// CHECK:STDERR: 11 | #warning "warning2"
|
|
|
+// CHECK:STDERR: fail_import_cpp_file_with_multiple_errors_and_multiple_warnings.carbon:[[@LINE+21]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:4: warning: In file included from fail_import_cpp_file_with_multiple_errors_and_multiple_warnings.carbon.generated.cpp_imports.h:1:
|
|
|
+// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:4:2: warning: "warning1"
|
|
|
+// CHECK:STDERR: 4 | #warning "warning1"
|
|
|
// CHECK:STDERR: | ^
|
|
|
// CHECK:STDERR: [CppInteropParseWarning]
|
|
|
-// CHECK:STDERR: fail_import_cpp_file_with_multiple_errors_and_multiple_warnings.carbon:[[@LINE+20]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "multiple_errors_and_multiple_warnings.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
// CHECK:STDERR:
|
|
|
-// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:12: warning: C++:
|
|
|
-// CHECK:STDERR: In file included from fail_import_cpp_file_with_multiple_errors_and_multiple_warnings.carbon.generated.cpp_imports.h:1:
|
|
|
-// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:12:2: warning: "warning3"
|
|
|
-// CHECK:STDERR: 12 | #warning "warning3"
|
|
|
+// CHECK:STDERR: fail_import_cpp_file_with_multiple_errors_and_multiple_warnings.carbon:[[@LINE+14]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:5: warning: In file included from fail_import_cpp_file_with_multiple_errors_and_multiple_warnings.carbon.generated.cpp_imports.h:1:
|
|
|
+// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:5:2: warning: "warning2"
|
|
|
+// CHECK:STDERR: 5 | #warning "warning2"
|
|
|
// CHECK:STDERR: | ^
|
|
|
// CHECK:STDERR: [CppInteropParseWarning]
|
|
|
-// CHECK:STDERR: fail_import_cpp_file_with_multiple_errors_and_multiple_warnings.carbon:[[@LINE+10]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "multiple_errors_and_multiple_warnings.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
// CHECK:STDERR:
|
|
|
-// CHECK:STDERR: ./one_warning.h:8: warning: C++:
|
|
|
-// CHECK:STDERR: In file included from import_multiple_cpp_files_with_warnings.carbon.generated.cpp_imports.h:1:
|
|
|
-// CHECK:STDERR: ./one_warning.h:8:2: warning: "warning1"
|
|
|
-// CHECK:STDERR: 8 | #warning "warning1"
|
|
|
+// CHECK:STDERR: fail_import_cpp_file_with_multiple_errors_and_multiple_warnings.carbon:[[@LINE+7]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:6: warning: In file included from fail_import_cpp_file_with_multiple_errors_and_multiple_warnings.carbon.generated.cpp_imports.h:1:
|
|
|
+// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:6:2: warning: "warning3"
|
|
|
+// CHECK:STDERR: 6 | #warning "warning3"
|
|
|
// CHECK:STDERR: | ^
|
|
|
// CHECK:STDERR: [CppInteropParseWarning]
|
|
|
+// CHECK:STDERR:
|
|
|
import Cpp library "multiple_errors_and_multiple_warnings.h";
|
|
|
|
|
|
// ============================================================================
|
|
|
@@ -257,47 +209,35 @@ import Cpp library "multiple_errors_and_multiple_warnings.h";
|
|
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
|
|
-import Cpp library "one_warning.h";
|
|
|
-// CHECK:STDERR: import_multiple_cpp_files_with_warnings.carbon:[[@LINE+40]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "multiple_warnings.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
-// CHECK:STDERR:
|
|
|
-// CHECK:STDERR: ./multiple_warnings.h:8: warning: C++:
|
|
|
-// CHECK:STDERR: In file included from import_multiple_cpp_files_with_warnings.carbon.generated.cpp_imports.h:2:
|
|
|
-// CHECK:STDERR: ./multiple_warnings.h:8:2: warning: "warning1"
|
|
|
-// CHECK:STDERR: 8 | #warning "warning1"
|
|
|
+// CHECK:STDERR: import_multiple_cpp_files_with_warnings.carbon:[[@LINE+28]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./one_warning.h:2: warning: In file included from import_multiple_cpp_files_with_warnings.carbon.generated.cpp_imports.h:1:
|
|
|
+// CHECK:STDERR: ./one_warning.h:2:2: warning: "warning1"
|
|
|
+// CHECK:STDERR: 2 | #warning "warning1"
|
|
|
// CHECK:STDERR: | ^
|
|
|
// CHECK:STDERR: [CppInteropParseWarning]
|
|
|
-// CHECK:STDERR: import_multiple_cpp_files_with_warnings.carbon:[[@LINE+30]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "multiple_warnings.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
// CHECK:STDERR:
|
|
|
-// CHECK:STDERR: ./multiple_warnings.h:9: warning: C++:
|
|
|
-// CHECK:STDERR: In file included from import_multiple_cpp_files_with_warnings.carbon.generated.cpp_imports.h:2:
|
|
|
-// CHECK:STDERR: ./multiple_warnings.h:9:2: warning: "warning2"
|
|
|
-// CHECK:STDERR: 9 | #warning "warning2"
|
|
|
+// CHECK:STDERR: import_multiple_cpp_files_with_warnings.carbon:[[@LINE+21]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./multiple_warnings.h:2: warning: In file included from import_multiple_cpp_files_with_warnings.carbon.generated.cpp_imports.h:2:
|
|
|
+// CHECK:STDERR: ./multiple_warnings.h:2:2: warning: "warning1"
|
|
|
+// CHECK:STDERR: 2 | #warning "warning1"
|
|
|
// CHECK:STDERR: | ^
|
|
|
// CHECK:STDERR: [CppInteropParseWarning]
|
|
|
-// CHECK:STDERR: import_multiple_cpp_files_with_warnings.carbon:[[@LINE+20]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "multiple_warnings.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
// CHECK:STDERR:
|
|
|
-// CHECK:STDERR: ./multiple_warnings.h:10: warning: C++:
|
|
|
-// CHECK:STDERR: In file included from import_multiple_cpp_files_with_warnings.carbon.generated.cpp_imports.h:2:
|
|
|
-// CHECK:STDERR: ./multiple_warnings.h:10:2: warning: "warning3"
|
|
|
-// CHECK:STDERR: 10 | #warning "warning3"
|
|
|
+// CHECK:STDERR: import_multiple_cpp_files_with_warnings.carbon:[[@LINE+14]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./multiple_warnings.h:3: warning: In file included from import_multiple_cpp_files_with_warnings.carbon.generated.cpp_imports.h:2:
|
|
|
+// CHECK:STDERR: ./multiple_warnings.h:3:2: warning: "warning2"
|
|
|
+// CHECK:STDERR: 3 | #warning "warning2"
|
|
|
// CHECK:STDERR: | ^
|
|
|
// CHECK:STDERR: [CppInteropParseWarning]
|
|
|
-// CHECK:STDERR: import_multiple_cpp_files_with_warnings.carbon:[[@LINE+10]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "multiple_warnings.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
// CHECK:STDERR:
|
|
|
-// CHECK:STDERR: ./one_error_and_one_warning.h:8: error: C++:
|
|
|
-// CHECK:STDERR: In file included from fail_import_multiple_cpp_files_with_errors_and_warnings.carbon.generated.cpp_imports.h:1:
|
|
|
-// CHECK:STDERR: ./one_error_and_one_warning.h:8:2: error: "error1"
|
|
|
-// CHECK:STDERR: 8 | #error "error1"
|
|
|
+// CHECK:STDERR: import_multiple_cpp_files_with_warnings.carbon:[[@LINE+7]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./multiple_warnings.h:4: warning: In file included from import_multiple_cpp_files_with_warnings.carbon.generated.cpp_imports.h:2:
|
|
|
+// CHECK:STDERR: ./multiple_warnings.h:4:2: warning: "warning3"
|
|
|
+// CHECK:STDERR: 4 | #warning "warning3"
|
|
|
// CHECK:STDERR: | ^
|
|
|
-// CHECK:STDERR: [CppInteropParseError]
|
|
|
+// CHECK:STDERR: [CppInteropParseWarning]
|
|
|
+// CHECK:STDERR:
|
|
|
+import Cpp library "one_warning.h";
|
|
|
import Cpp library "multiple_warnings.h";
|
|
|
|
|
|
// ============================================================================
|
|
|
@@ -308,73 +248,56 @@ import Cpp library "multiple_warnings.h";
|
|
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
|
|
-import Cpp library "one_error_and_one_warning.h";
|
|
|
-// CHECK:STDERR: fail_import_multiple_cpp_files_with_errors_and_warnings.carbon:[[@LINE+66]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "multiple_errors_and_multiple_warnings.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
+// CHECK:STDERR: fail_import_multiple_cpp_files_with_errors_and_warnings.carbon:[[@LINE+49]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./one_error_and_one_warning.h:2: error: In file included from fail_import_multiple_cpp_files_with_errors_and_warnings.carbon.generated.cpp_imports.h:1:
|
|
|
+// CHECK:STDERR: ./one_error_and_one_warning.h:2:2: error: "error1"
|
|
|
+// CHECK:STDERR: 2 | #error "error1"
|
|
|
+// CHECK:STDERR: | ^
|
|
|
+// CHECK:STDERR: [CppInteropParseError]
|
|
|
// CHECK:STDERR:
|
|
|
-// CHECK:STDERR: ./one_error_and_one_warning.h:9: warning: C++:
|
|
|
-// CHECK:STDERR: In file included from fail_import_multiple_cpp_files_with_errors_and_warnings.carbon.generated.cpp_imports.h:1:
|
|
|
-// CHECK:STDERR: ./one_error_and_one_warning.h:9:2: warning: "warning1"
|
|
|
-// CHECK:STDERR: 9 | #warning "warning1"
|
|
|
+// CHECK:STDERR: fail_import_multiple_cpp_files_with_errors_and_warnings.carbon:[[@LINE+42]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./one_error_and_one_warning.h:3: warning: In file included from fail_import_multiple_cpp_files_with_errors_and_warnings.carbon.generated.cpp_imports.h:1:
|
|
|
+// CHECK:STDERR: ./one_error_and_one_warning.h:3:2: warning: "warning1"
|
|
|
+// CHECK:STDERR: 3 | #warning "warning1"
|
|
|
// CHECK:STDERR: | ^
|
|
|
// CHECK:STDERR: [CppInteropParseWarning]
|
|
|
-// CHECK:STDERR: fail_import_multiple_cpp_files_with_errors_and_warnings.carbon:[[@LINE+56]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "multiple_errors_and_multiple_warnings.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
// CHECK:STDERR:
|
|
|
-// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:8: error: C++:
|
|
|
-// CHECK:STDERR: In file included from fail_import_multiple_cpp_files_with_errors_and_warnings.carbon.generated.cpp_imports.h:2:
|
|
|
-// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:8:2: error: "error1"
|
|
|
-// CHECK:STDERR: 8 | #error "error1"
|
|
|
+// CHECK:STDERR: fail_import_multiple_cpp_files_with_errors_and_warnings.carbon:[[@LINE+35]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:2: error: In file included from fail_import_multiple_cpp_files_with_errors_and_warnings.carbon.generated.cpp_imports.h:2:
|
|
|
+// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:2:2: error: "error1"
|
|
|
+// CHECK:STDERR: 2 | #error "error1"
|
|
|
// CHECK:STDERR: | ^
|
|
|
// CHECK:STDERR: [CppInteropParseError]
|
|
|
-// CHECK:STDERR: fail_import_multiple_cpp_files_with_errors_and_warnings.carbon:[[@LINE+46]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "multiple_errors_and_multiple_warnings.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
// CHECK:STDERR:
|
|
|
-// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:9: error: C++:
|
|
|
-// CHECK:STDERR: In file included from fail_import_multiple_cpp_files_with_errors_and_warnings.carbon.generated.cpp_imports.h:2:
|
|
|
-// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:9:2: error: "error2"
|
|
|
-// CHECK:STDERR: 9 | #error "error2"
|
|
|
+// CHECK:STDERR: fail_import_multiple_cpp_files_with_errors_and_warnings.carbon:[[@LINE+28]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:3: error: In file included from fail_import_multiple_cpp_files_with_errors_and_warnings.carbon.generated.cpp_imports.h:2:
|
|
|
+// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:3:2: error: "error2"
|
|
|
+// CHECK:STDERR: 3 | #error "error2"
|
|
|
// CHECK:STDERR: | ^
|
|
|
// CHECK:STDERR: [CppInteropParseError]
|
|
|
-// CHECK:STDERR: fail_import_multiple_cpp_files_with_errors_and_warnings.carbon:[[@LINE+36]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "multiple_errors_and_multiple_warnings.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
// CHECK:STDERR:
|
|
|
-// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:10: warning: C++:
|
|
|
-// CHECK:STDERR: In file included from fail_import_multiple_cpp_files_with_errors_and_warnings.carbon.generated.cpp_imports.h:2:
|
|
|
-// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:10:2: warning: "warning1"
|
|
|
-// CHECK:STDERR: 10 | #warning "warning1"
|
|
|
+// CHECK:STDERR: fail_import_multiple_cpp_files_with_errors_and_warnings.carbon:[[@LINE+21]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:4: warning: In file included from fail_import_multiple_cpp_files_with_errors_and_warnings.carbon.generated.cpp_imports.h:2:
|
|
|
+// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:4:2: warning: "warning1"
|
|
|
+// CHECK:STDERR: 4 | #warning "warning1"
|
|
|
// CHECK:STDERR: | ^
|
|
|
// CHECK:STDERR: [CppInteropParseWarning]
|
|
|
-// CHECK:STDERR: fail_import_multiple_cpp_files_with_errors_and_warnings.carbon:[[@LINE+26]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "multiple_errors_and_multiple_warnings.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
// CHECK:STDERR:
|
|
|
-// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:11: warning: C++:
|
|
|
-// CHECK:STDERR: In file included from fail_import_multiple_cpp_files_with_errors_and_warnings.carbon.generated.cpp_imports.h:2:
|
|
|
-// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:11:2: warning: "warning2"
|
|
|
-// CHECK:STDERR: 11 | #warning "warning2"
|
|
|
+// CHECK:STDERR: fail_import_multiple_cpp_files_with_errors_and_warnings.carbon:[[@LINE+14]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:5: warning: In file included from fail_import_multiple_cpp_files_with_errors_and_warnings.carbon.generated.cpp_imports.h:2:
|
|
|
+// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:5:2: warning: "warning2"
|
|
|
+// CHECK:STDERR: 5 | #warning "warning2"
|
|
|
// CHECK:STDERR: | ^
|
|
|
// CHECK:STDERR: [CppInteropParseWarning]
|
|
|
-// CHECK:STDERR: fail_import_multiple_cpp_files_with_errors_and_warnings.carbon:[[@LINE+16]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "multiple_errors_and_multiple_warnings.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
// CHECK:STDERR:
|
|
|
-// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:12: warning: C++:
|
|
|
-// CHECK:STDERR: In file included from fail_import_multiple_cpp_files_with_errors_and_warnings.carbon.generated.cpp_imports.h:2:
|
|
|
-// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:12:2: warning: "warning3"
|
|
|
-// CHECK:STDERR: 12 | #warning "warning3"
|
|
|
+// CHECK:STDERR: fail_import_multiple_cpp_files_with_errors_and_warnings.carbon:[[@LINE+7]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:6: warning: In file included from fail_import_multiple_cpp_files_with_errors_and_warnings.carbon.generated.cpp_imports.h:2:
|
|
|
+// CHECK:STDERR: ./multiple_errors_and_multiple_warnings.h:6:2: warning: "warning3"
|
|
|
+// CHECK:STDERR: 6 | #warning "warning3"
|
|
|
// CHECK:STDERR: | ^
|
|
|
// CHECK:STDERR: [CppInteropParseWarning]
|
|
|
-// CHECK:STDERR: fail_import_multiple_cpp_files_with_errors_and_warnings.carbon:[[@LINE+6]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "multiple_errors_and_multiple_warnings.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
// CHECK:STDERR:
|
|
|
-// CHECK:STDERR: ./one_error.h:8: error: C++:
|
|
|
-// CHECK:STDERR: In file included from fail_import_indirect_error.carbon.generated.cpp_imports.h:1:
|
|
|
+import Cpp library "one_error_and_one_warning.h";
|
|
|
import Cpp library "multiple_errors_and_multiple_warnings.h";
|
|
|
|
|
|
// ============================================================================
|
|
|
@@ -383,23 +306,22 @@ import Cpp library "multiple_errors_and_multiple_warnings.h";
|
|
|
|
|
|
// --- indirect_error.h
|
|
|
|
|
|
-// CHECK:STDERR: In file included from ./indirect_error.h:[[@LINE+5]]:
|
|
|
-// CHECK:STDERR: ./one_error.h:8:2: error: "error1"
|
|
|
-// CHECK:STDERR: 8 | #error "error1"
|
|
|
-// CHECK:STDERR: | ^
|
|
|
-// CHECK:STDERR: [CppInteropParseError]
|
|
|
#include "one_error.h"
|
|
|
|
|
|
-// --- fail_import_indirect_error.carbon
|
|
|
+// --- fail_todo_import_indirect_error.carbon
|
|
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
|
|
-// CHECK:STDERR: fail_import_indirect_error.carbon:[[@LINE+6]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "indirect_error.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
+// TODO: The `In file included from` line should not be prefixed. See
|
|
|
+// https://github.com/carbon-language/carbon-lang/pull/5614#pullrequestreview-2900939411
|
|
|
+// CHECK:STDERR: fail_todo_import_indirect_error.carbon:[[@LINE+8]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./one_error.h:2: error: In file included from fail_todo_import_indirect_error.carbon.generated.cpp_imports.h:1:
|
|
|
+// CHECK:STDERR: In file included from ./indirect_error.h:2:
|
|
|
+// CHECK:STDERR: ./one_error.h:2:2: error: "error1"
|
|
|
+// CHECK:STDERR: 2 | #error "error1"
|
|
|
+// CHECK:STDERR: | ^
|
|
|
+// CHECK:STDERR: [CppInteropParseError]
|
|
|
// CHECK:STDERR:
|
|
|
-// CHECK:STDERR: ./one_warning.h:8: warning: C++:
|
|
|
-// CHECK:STDERR: In file included from import_indirect_warning.carbon.generated.cpp_imports.h:1:
|
|
|
import Cpp library "indirect_error.h";
|
|
|
|
|
|
// ============================================================================
|
|
|
@@ -408,27 +330,22 @@ import Cpp library "indirect_error.h";
|
|
|
|
|
|
// --- indirect_warning.h
|
|
|
|
|
|
-// CHECK:STDERR: In file included from ./indirect_warning.h:[[@LINE+5]]:
|
|
|
-// CHECK:STDERR: ./one_warning.h:8:2: warning: "warning1"
|
|
|
-// CHECK:STDERR: 8 | #warning "warning1"
|
|
|
-// CHECK:STDERR: | ^
|
|
|
-// CHECK:STDERR: [CppInteropParseWarning]
|
|
|
#include "one_warning.h"
|
|
|
|
|
|
-// --- import_indirect_warning.carbon
|
|
|
+// --- todo_import_indirect_warning.carbon
|
|
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
|
|
-// CHECK:STDERR: import_indirect_warning.carbon:[[@LINE+10]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "indirect_warning.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
-// CHECK:STDERR:
|
|
|
-// CHECK:STDERR: ./one_warning.h:8: warning: C++:
|
|
|
-// CHECK:STDERR: In file included from fail_import_cpp_library_lexer_error.carbon.generated.cpp_imports.h:1:
|
|
|
-// CHECK:STDERR: ./one_warning.h:8:2: warning: "warning1"
|
|
|
-// CHECK:STDERR: 8 | #warning "warning1"
|
|
|
+// TODO: The `In file included from` line should not be prefixed. See
|
|
|
+// https://github.com/carbon-language/carbon-lang/pull/5614#pullrequestreview-2900939411
|
|
|
+// CHECK:STDERR: todo_import_indirect_warning.carbon:[[@LINE+8]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./one_warning.h:2: warning: In file included from todo_import_indirect_warning.carbon.generated.cpp_imports.h:1:
|
|
|
+// CHECK:STDERR: In file included from ./indirect_warning.h:2:
|
|
|
+// CHECK:STDERR: ./one_warning.h:2:2: warning: "warning1"
|
|
|
+// CHECK:STDERR: 2 | #warning "warning1"
|
|
|
// CHECK:STDERR: | ^
|
|
|
// CHECK:STDERR: [CppInteropParseWarning]
|
|
|
+// CHECK:STDERR:
|
|
|
import Cpp library "indirect_warning.h";
|
|
|
|
|
|
// ============================================================================
|
|
|
@@ -440,11 +357,14 @@ import Cpp library "indirect_warning.h";
|
|
|
library "[[@TEST_NAME]]"; // Trailing comment
|
|
|
|
|
|
// TODO: Move this warning to be after the lexer trailing comment error.
|
|
|
-// CHECK:STDERR: fail_import_cpp_library_lexer_error.carbon:[[@LINE+8]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "one_warning.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
+// CHECK:STDERR: fail_import_cpp_library_lexer_error.carbon:[[@LINE+11]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./one_warning.h:2: warning: In file included from fail_import_cpp_library_lexer_error.carbon.generated.cpp_imports.h:1:
|
|
|
+// CHECK:STDERR: ./one_warning.h:2:2: warning: "warning1"
|
|
|
+// CHECK:STDERR: 2 | #warning "warning1"
|
|
|
+// CHECK:STDERR: | ^
|
|
|
+// CHECK:STDERR: [CppInteropParseWarning]
|
|
|
// CHECK:STDERR:
|
|
|
-// CHECK:STDERR: fail_import_cpp_library_lexer_error.carbon:[[@LINE-7]]:44: error: trailing comments are not permitted [TrailingComment]
|
|
|
+// CHECK:STDERR: fail_import_cpp_library_lexer_error.carbon:[[@LINE-10]]:44: error: trailing comments are not permitted [TrailingComment]
|
|
|
// CHECK:STDERR: library "import_cpp_library_lexer_error"; // Trailing comment
|
|
|
// CHECK:STDERR: ^
|
|
|
// CHECK:STDERR:
|
|
|
@@ -456,22 +376,19 @@ import Cpp library "one_warning.h";
|
|
|
|
|
|
// --- fix_it_hints.h
|
|
|
|
|
|
-// CHECK:STDERR: ./fix_it_hints.h:[[@LINE+7]]: error: C++:
|
|
|
-// CHECK:STDERR: In file included from fail_import_fix_it_hints.carbon.generated.cpp_imports.h:1:
|
|
|
-// CHECK:STDERR: ./fix_it_hints.h:[[@LINE+5]]:19: error: expected ';' after top level declarator
|
|
|
-// CHECK:STDERR: 9 | double score = 0.1
|
|
|
-// CHECK:STDERR: | ^
|
|
|
-// CHECK:STDERR: | ;
|
|
|
-// CHECK:STDERR: [CppInteropParseError]
|
|
|
double score = 0.1
|
|
|
|
|
|
// --- fail_import_fix_it_hints.carbon
|
|
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
|
|
-// CHECK:STDERR: fail_import_fix_it_hints.carbon:[[@LINE+4]]:1: note: in `Cpp` import [InCppImport]
|
|
|
-// CHECK:STDERR: import Cpp library "fix_it_hints.h";
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
+// CHECK:STDERR: fail_import_fix_it_hints.carbon:[[@LINE+8]]:1: in import [InImport]
|
|
|
+// CHECK:STDERR: ./fix_it_hints.h:2: error: In file included from fail_import_fix_it_hints.carbon.generated.cpp_imports.h:1:
|
|
|
+// CHECK:STDERR: ./fix_it_hints.h:2:19: error: expected ';' after top level declarator
|
|
|
+// CHECK:STDERR: 2 | double score = 0.1
|
|
|
+// CHECK:STDERR: | ^
|
|
|
+// CHECK:STDERR: | ;
|
|
|
+// CHECK:STDERR: [CppInteropParseError]
|
|
|
// CHECK:STDERR:
|
|
|
import Cpp library "fix_it_hints.h";
|
|
|
|
|
|
@@ -623,7 +540,7 @@ fn F() {
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: --- fail_import_indirect_error.carbon
|
|
|
+// CHECK:STDOUT: --- fail_todo_import_indirect_error.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: imports {
|
|
|
// CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
|
|
|
@@ -641,7 +558,7 @@ fn F() {
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: --- import_indirect_warning.carbon
|
|
|
+// CHECK:STDOUT: --- todo_import_indirect_warning.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: imports {
|
|
|
// CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
|