Skip to content

Commit 03d5b71

Browse files
committed
AsmParser: Don't use locationOverride as current location when location from comments is selected
1 parent ca5b379 commit 03d5b71

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

libyul/AsmParser.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,10 @@ class Parser: public langutil::ParserBase
9797
protected:
9898
langutil::SourceLocation currentLocation() const override
9999
{
100-
if (m_useSourceLocationFrom == UseSourceLocationFrom::Scanner)
101-
return ParserBase::currentLocation();
102-
return m_locationOverride;
100+
if (m_useSourceLocationFrom == UseSourceLocationFrom::LocationOverride)
101+
return m_locationOverride;
102+
103+
return ParserBase::currentLocation();
103104
}
104105

105106
langutil::Token advance() override;

test/libyul/yulSyntaxTests/invalid/literals_on_stack_disallowed_with_debug_info.yul

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ object "C" {
55
}
66
}
77
// ----
8-
// ParserError 6913: Call or assignment expected.
8+
// ParserError 6913: (65-66): Call or assignment expected.
99
// ParserError 2314: (67-68): Expected end of source but got '}'

0 commit comments

Comments
 (0)