libSyntax: create a basic infrastructure for generating libSyntax entities by using Parser.

This commit is contained in:
Xi Ge
2017-10-18 17:02:00 -07:00
committed by GitHub
parent b1bbe48b44
commit ee7a06276d
16 changed files with 473 additions and 39 deletions

View File

@@ -49,10 +49,6 @@ class OwnedString {
assert(Length >= 0 && "expected length to be non-negative");
if (Ownership == StringOwnership::Copied && Data) {
assert(
Length <= strlen(Data) &&
"expected length to be a valid index, within the length of the string");
char *substring = static_cast<char *>(malloc(Length + 1));
assert(substring && "expected successful malloc of copy");