mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 22:02:52 +01:00
Support import Cpp; to import Cpp namespace for using C++ builtins (#6320)
This allows writing ``` import Cpp; ``` Instead of writing ``` import Cpp inline ""; ``` Part of #6330.
This commit is contained in:
@@ -102,7 +102,7 @@ static auto GenerateCppIncludesHeaderCode(
|
||||
<< "\n";
|
||||
// TODO: Inject a clang pragma here to produce an error if there are
|
||||
// unclosed scopes at the end of this inline C++ fragment.
|
||||
} else {
|
||||
} else if (import.library_id.has_value()) {
|
||||
// Translate `import Cpp library "foo.h";` into `#include "foo.h"`.
|
||||
GenerateLineMarker(context, code_stream,
|
||||
context.tokens().GetLineNumber(
|
||||
|
||||
Reference in New Issue
Block a user