mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix handling of carriage return.
This commit is contained in:
parent
1d95f95635
commit
eb85a4414c
@ -7,6 +7,7 @@ Compiler Features:
|
||||
|
||||
|
||||
Bugfixes:
|
||||
* Error Reporter: Fix handling of carriage return.
|
||||
* SMTChecker: Fix internal error on ``FixedBytes`` constant initialized with string literal.
|
||||
* SMTChecker: Fix internal error on calling public getter on a state variable of type array (possibly nested) of structs.
|
||||
* SMTChecker: Fix internal error on pushing to ``string`` casted to ``bytes``.
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <liblangutil/CharStream.h>
|
||||
#include <liblangutil/Exceptions.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <iomanip>
|
||||
|
||||
@ -87,7 +88,7 @@ SourceReference SourceReferenceExtractor::extract(SourceLocation const* _locatio
|
||||
line = line.substr(
|
||||
static_cast<size_t>(max(0, start.column - 35)),
|
||||
static_cast<size_t>(min(start.column, 35)) + static_cast<size_t>(
|
||||
min(locationLength + 35,len - start.column)
|
||||
min(locationLength + 35, len - start.column)
|
||||
)
|
||||
);
|
||||
if (start.column + locationLength + 35 < len)
|
||||
@ -106,7 +107,7 @@ SourceReference SourceReferenceExtractor::extract(SourceLocation const* _locatio
|
||||
interest,
|
||||
isMultiline,
|
||||
line,
|
||||
start.column,
|
||||
end.column,
|
||||
min(start.column, static_cast<int>(line.length())),
|
||||
min(end.column, static_cast<int>(line.length()))
|
||||
};
|
||||
}
|
||||
|
@ -6,6 +6,8 @@ ERROR_LOG="$(mktemp -t check_style_XXXXXX.log)"
|
||||
|
||||
EXCLUDE_FILES=(
|
||||
"libsolutil/picosha2.h"
|
||||
"test/cmdlineTests/strict_asm_only_cr/input.yul"
|
||||
"test/cmdlineTests/strict_asm_only_cr/err"
|
||||
"test/libsolutil/UTF8.cpp"
|
||||
"test/libsolidity/syntaxTests/license/license_cr_endings.sol"
|
||||
"test/libsolidity/syntaxTests/license/license_crlf_endings.sol"
|
||||
|
1
test/cmdlineTests/strict_asm_only_cr/args
Normal file
1
test/cmdlineTests/strict_asm_only_cr/args
Normal file
@ -0,0 +1 @@
|
||||
--strict-assembly
|
6
test/cmdlineTests/strict_asm_only_cr/err
Normal file
6
test/cmdlineTests/strict_asm_only_cr/err
Normal file
@ -0,0 +1,6 @@
|
||||
Warning: Yul is still experimental. Please use the output with care.
|
||||
Error: Expected keyword "object".
|
||||
--> strict_asm_only_cr/input.yul:1:2:
|
||||
|
|
||||
1 |
|
||||
| ^
|
1
test/cmdlineTests/strict_asm_only_cr/exit
Normal file
1
test/cmdlineTests/strict_asm_only_cr/exit
Normal file
@ -0,0 +1 @@
|
||||
1
|
1
test/cmdlineTests/strict_asm_only_cr/input.yul
Normal file
1
test/cmdlineTests/strict_asm_only_cr/input.yul
Normal file
@ -0,0 +1 @@
|
||||
|
Loading…
Reference in New Issue
Block a user