Bug Summary:
An option exists on clang (there is an equivalent on msvc with /Zc:char8_t-) removing the char8_t type from the language in C++20. It is controlled in clang by the -fno-char8_t argument.
When using compile commands, with this argument and --std=c++20 present in the command, the parsing seems to ignore the -fno-char8_t, leading to Intellisense errors.
When looking for duplicates, I found #12106, but given the explanation, it seems that every argument is parsed, even if not needed so it doesn't related to this issue.
Steps to reproduce:
create a file containing the code below:
#include <stdio.h>
int main(int argc, char** argv)
{
printf(u8"Hello UTF-8");
return 0;
}
2. create a compile commands containing the source with both `-fno-char8_t` and `--std=c++20` in the command, as below:
```json
[
{
"directory": "src",
"command": "clang++ -g -Wall -fno-char8_t --std=c++20",
"file": "test.cc"
}
]
Notice the errors displaying on u8, indicating that argument const char8_t* is incompatible with const char*
Expected behavior:
The parsing should take account of the -fno-char8_t to give it correctly to the parser. On a side note, the argument is not given either to clang-tidy, leading to other errors related to it.
Environment
Bug Summary and Steps to Reproduce
Bug Summary: An option exists on clang (there is an equivalent on msvc with
/Zc:char8_t-
) removing thechar8_t
type from the language in C++20. It is controlled in clang by the-fno-char8_t
argument. When using compile commands, with this argument and--std=c++20
present in the command, the parsing seems to ignore the-fno-char8_t
, leading to Intellisense errors.When looking for duplicates, I found #12106, but given the explanation, it seems that every argument is parsed, even if not needed so it doesn't related to this issue.
Steps to reproduce:
int main(int argc, char** argv) { printf(u8"Hello UTF-8");
}
u8
, indicating that argumentconst char8_t*
is incompatible withconst char*
Expected behavior: The parsing should take account of the
-fno-char8_t
to give it correctly to the parser. On a side note, the argument is not given either to clang-tidy, leading to other errors related to it.Configuration and Logs
Other Extensions
No response
Additional context
No response