aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-12-01 06:45:31 +0800
committerGitHub <noreply@github.com>2018-12-01 06:45:31 +0800
commitaaeb74f59283486ee95d71f896cf2dd6cbe503f7 (patch)
tree062fbcc8d84ce2bfa5bb0bb2ef200ba402bb3e8b /libsolidity/ast
parentcc00d8172b6cd7f9fc032e4a21857455ace2f290 (diff)
parent757623e381aba24b81a2365cf19037d3d96bf945 (diff)
downloaddexon-solidity-aaeb74f59283486ee95d71f896cf2dd6cbe503f7.tar.gz
dexon-solidity-aaeb74f59283486ee95d71f896cf2dd6cbe503f7.tar.zst
dexon-solidity-aaeb74f59283486ee95d71f896cf2dd6cbe503f7.zip
Merge pull request #5537 from ethereum/cp-SourceLocation-related-refactoring
[1/3] SourceLocation related refactoring.
Diffstat (limited to 'libsolidity/ast')
-rw-r--r--libsolidity/ast/ASTJsonConverter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libsolidity/ast/ASTJsonConverter.cpp b/libsolidity/ast/ASTJsonConverter.cpp
index b9054692..cfb13271 100644
--- a/libsolidity/ast/ASTJsonConverter.cpp
+++ b/libsolidity/ast/ASTJsonConverter.cpp
@@ -122,8 +122,8 @@ void ASTJsonConverter::setJsonNode(
string ASTJsonConverter::sourceLocationToString(SourceLocation const& _location) const
{
int sourceIndex{-1};
- if (_location.sourceName && m_sourceIndices.count(*_location.sourceName))
- sourceIndex = m_sourceIndices.at(*_location.sourceName);
+ if (_location.source && m_sourceIndices.count(_location.source->name()))
+ sourceIndex = m_sourceIndices.at(_location.source->name());
int length = -1;
if (_location.start >= 0 && _location.end >= 0)
length = _location.end - _location.start;