AsmParser: Don't use locationOverride as current location when location from comments is selected

This commit is contained in:
Kamil Śliwak 2021-09-21 14:33:43 +02:00
parent ce4420f857
commit d23754eafd
2 changed files with 5 additions and 4 deletions

View File

@ -97,9 +97,10 @@ public:
protected: protected:
langutil::SourceLocation currentLocation() const override langutil::SourceLocation currentLocation() const override
{ {
if (m_useSourceLocationFrom == UseSourceLocationFrom::Scanner) if (m_useSourceLocationFrom == UseSourceLocationFrom::LocationOverride)
return ParserBase::currentLocation();
return m_locationOverride; return m_locationOverride;
return ParserBase::currentLocation();
} }
langutil::Token advance() override; langutil::Token advance() override;

View File

@ -5,5 +5,5 @@ object "C" {
} }
} }
// ---- // ----
// ParserError 6913: Call or assignment expected. // ParserError 6913: (65-66): Call or assignment expected.
// ParserError 2314: (67-68): Expected end of source but got '}' // ParserError 2314: (67-68): Expected end of source but got '}'