Merge pull request #8224 from a3d4/refactor-sourcelocation

Replaced SourceLocation::isEmpty() with isValid() and hasText().
This commit is contained in:
chriseth
2020-02-04 22:23:51 +01:00
committed by GitHub
11 changed files with 35 additions and 30 deletions
+4 -2
View File
@@ -54,9 +54,11 @@ T AsmJsonImporter::createAsmNode(Json::Value const& _node)
{
T r;
r.location = createSourceLocation(_node);
astAssert(!r.location.isEmpty() || !r.location.source, "Invalid source location in Asm AST");
astAssert(
r.location.source && 0 <= r.location.start && r.location.start <= r.location.end,
"Invalid source location in Asm AST"
);
return r;
}
Json::Value AsmJsonImporter::member(Json::Value const& _node, string const& _name)