aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Serialization/ASTWriterDecl.cpp2
-rw-r--r--test/PCH/cxx_exprs.cpp6
-rw-r--r--test/PCH/cxx_exprs.h5
3 files changed, 12 insertions, 1 deletions
diff --git a/lib/Serialization/ASTWriterDecl.cpp b/lib/Serialization/ASTWriterDecl.cpp
index baa8a0e4cd..76a2332143 100644
--- a/lib/Serialization/ASTWriterDecl.cpp
+++ b/lib/Serialization/ASTWriterDecl.cpp
@@ -1619,7 +1619,7 @@ void ASTWriter::WriteDeclsBlockAbbrevs() {
//Character Literal
Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // getValue
Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Location
- Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); //IsWide
+ Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 2)); // getKind
CharacterLiteralAbbrev = Stream.EmitAbbrev(Abv);
Abv = new BitCodeAbbrev();
diff --git a/test/PCH/cxx_exprs.cpp b/test/PCH/cxx_exprs.cpp
index 4cd9bae1fa..01fc33a9a8 100644
--- a/test/PCH/cxx_exprs.cpp
+++ b/test/PCH/cxx_exprs.cpp
@@ -37,3 +37,9 @@ cxx_null_ptr_result null_ptr = nullptr;
// CXXTypeidExpr
typeid_result1 typeid_1 = 0;
typeid_result2 typeid_2 = 0;
+
+// CharacterLiteral variants
+static_assert(char_value == 97, "char_value is correct");
+static_assert(wchar_t_value == 305, "wchar_t_value is correct");
+static_assert(char16_t_value == 231, "char16_t_value is correct");
+static_assert(char32_t_value == 8706, "char32_t_value is correct");
diff --git a/test/PCH/cxx_exprs.h b/test/PCH/cxx_exprs.h
index 67ab4a6d34..35db82efae 100644
--- a/test/PCH/cxx_exprs.h
+++ b/test/PCH/cxx_exprs.h
@@ -81,3 +81,8 @@ CtorStruct create_CtorStruct() {
return CtorStruct(1, 3.14f); // CXXTemporaryObjectExpr
};
+// CharacterLiteral variants
+const char char_value = 'a';
+const wchar_t wchar_t_value = L'ı';
+const char16_t char16_t_value = u'ç';
+const char32_t char32_t_value = U'∂';