An availability attribute parsing test is failing on XCore. Is this the right fix?
Test file clang/test/Parser/attr-availability.c, function f8, tests that
gives error “expected string literal for optional message in ‘availability’ attribute”, because “a” L"b" should be concatenated into a wide string.
The check is made in clang/lib/Parse/ParseDecl.cpp, Parser::ParseAvailabilityAttribute, comment “Also reject wide string literals”. But the code checks (1) that the first token in the string concatenation is a (non-wide) string literal, and then (2) that the resulting string consists of 1-byte characters.
On XCore, wchar_t is unsigned char, so “a” L"b" passes both checks, and the expected diagnostic is not issued. But plain L"b" would be rejected. This is inconsistent.
Can I fix:
if (MessageStringLiteral->getCharByteWidth() != 1)
or is there a reason for the width test specifically?