integration/primitives.toml: Add char8_t test

This commit is contained in:
Alastair Robertson 2023-01-05 10:58:50 -08:00 committed by Alastair Robertson
parent e458ca99eb
commit 9fd96ec3a4
2 changed files with 5 additions and 0 deletions

View File

@ -471,6 +471,7 @@ bool OICompiler::compile(const std::string &code, const fs::path &sourcePath,
compInv->getLangOpts()->GNUCVersion = 11 * 100 * 100; // 11.0.0 compInv->getLangOpts()->GNUCVersion = 11 * 100 * 100; // 11.0.0
compInv->getLangOpts()->Bool = true; compInv->getLangOpts()->Bool = true;
compInv->getLangOpts()->WChar = true; compInv->getLangOpts()->WChar = true;
compInv->getLangOpts()->Char8 = true;
compInv->getLangOpts()->CXXOperatorNames = true; compInv->getLangOpts()->CXXOperatorNames = true;
compInv->getLangOpts()->DoubleSquareBracketAttributes = true; compInv->getLangOpts()->DoubleSquareBracketAttributes = true;
compInv->getLangOpts()->ImplicitInt = false; compInv->getLangOpts()->ImplicitInt = false;

View File

@ -51,6 +51,10 @@
param_types = ["wchar_t"] param_types = ["wchar_t"]
setup = "return 'a';" setup = "return 'a';"
expect_json = '[{"staticSize":4, "dynamicSize":0}]' expect_json = '[{"staticSize":4, "dynamicSize":0}]'
[cases.char8_t]
param_types = ["char8_t"]
setup = "return 'a';"
expect_json = '[{"staticSize":1, "dynamicSize":0}]'
[cases.char16_t] [cases.char16_t]
param_types = ["char16_t"] param_types = ["char16_t"]
setup = "return 'a';" setup = "return 'a';"