Commit Graph

179 Commits

Author SHA1 Message Date
Djordje Mijovic
547590b972 Fixing additional signedness errors after adding -Wsign-conversion flag
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
2020-07-09 17:22:45 +02:00
chriseth
2d64f53a39
Merge pull request #9265 from a3d4/improve-fixerrorids-script
Add --examine-coverage to fix_error_ids.py
2020-07-02 11:18:46 +02:00
a3d4
919572d6ec Add --examine-coverage to fix_error_ids.py 2020-07-01 21:41:31 +02:00
Bhargava Shastry
1a0391bceb Fuzzer: Add a specialized StackTooDeepError Exception that is caught in the fuzzing harness 2020-07-01 11:08:20 +02:00
Mathias Baumann
02328f3bbb Add unit denomination `gwei` 2020-06-24 18:24:56 +02:00
a3d4
1d2ae7d82a Added error codes to SyntaxTest expectations (changed code) 2020-06-22 16:53:03 +02:00
a3d4
5d63fa09e9 Fix false ////- and /***-natspec 2020-06-16 11:15:04 +02:00
Djordje Mijovic
731b2efc97 Fixing liblangutil conversion warnings 2020-06-11 08:26:57 +02:00
a3d4
51e64fe0b1 Add error IDs to console output 2020-06-10 13:27:25 +02:00
Djordje Mijovic
5b1426b55e Adding fixes for signedness warnings in liblangutil 2020-06-03 11:22:46 +02:00
chriseth
de5e283574
Merge pull request #9085 from a3d4/refactor-error-ids-script
Refactor error ID checker script
2020-06-03 11:12:42 +02:00
a3d4
3bf236cf81 Refactor error ID checker script 2020-06-03 02:43:20 +02:00
a3d4
41d8420718 Fix tabs in SolcReferenceFormatterHuman 2020-06-02 21:43:51 +02:00
chriseth
65d8b6cf75
Merge pull request #9033 from a3d4/partfix-5819-add-errorid-to-error-class
Add unique ID to Error class
2020-05-28 16:24:47 +02:00
a3d4
c959341720 Add errorId to Error class 2020-05-28 15:00:33 +02:00
chriseth
eb923af09c Do not set source locations for small internal assembly routines. 2020-05-27 18:26:46 +02:00
Mathias Baumann
7f3d437ffe Fix caret position for errors with utf source 2020-05-25 14:27:03 +02:00
hrkrshnn
37257548d0 Fixed bug when two empty NatSpec comments led to scanning past EOL 2020-05-20 20:26:02 +05:30
a3d4
9f8d5753ce Introduce ErrorWatcher and remove a dedicated error flag from AsmAnalyzer 2020-05-18 16:06:23 +02:00
chriseth
3872a1f000 Add support for SPDX license identifiers. 2020-05-13 18:16:59 +02:00
a3d4
02d1f8c41a Remove a dedicated error flag from DeclarationTypeChecker 2020-05-12 18:13:17 +02:00
a3d4
c3e519a151 Add unique IDs to error reporting calls 2020-05-09 01:28:55 +02:00
a3d4
6965f199fd Groundwork. Prepare for automatic tagging of errors in parser-based classes
[Not compilable until the next commit]
2020-05-09 01:03:02 +02:00
a3d4
2d984b77a1 Add a script to correct IDs 2020-05-06 14:25:13 +02:00
a3d4
8f68c04358 Add unique IDs to error reporting calls 2020-05-06 13:53:46 +02:00
a3d4
e3641b88ec Groundwork. Prepare for automatic tagging
[Not compilable until the next commit]
2020-05-06 13:52:28 +02:00
a3d4
523460da07 Prevent coloring irrelevant whitespaces 2020-04-24 00:51:15 +02:00
a3d4
8717c073a6 Fix leftpad in SourceReferenceFormatterHuman 2020-04-24 00:34:24 +02:00
Alexander Arlt
aac7a1e434 Apply modernize-pass-by-value. 2020-04-14 10:32:13 -05:00
chriseth
f10c6500b2 Immutable is not reserved anymore. 2020-03-02 14:20:17 +01:00
Djordje Mijovic
ec083c4878 Adding source location support to AssemblyStack and thus debugging Yul sources 2020-02-25 22:19:03 +01:00
Erik Kundt
cfc70ede5c Corrects comment literal that span too long. 2020-02-14 15:53:35 +01:00
Erik Kundt
b43751d65e Reports source location for structured documentation errors. 2020-02-14 15:21:39 +01:00
chriseth
64bb0d55e0
Merge pull request #8268 from a3d4/lineatposition-crlf
Avoided trailing '\r' in CharStream::lineAtPosition().
2020-02-10 15:58:52 +01:00
a3d4
be1d92c836 Avoided trailing \r in CharStream::lineAtPosition(). 2020-02-10 01:16:55 +01:00
a3d4
b3b8441aa4 Fix printing source for missing pragma. 2020-02-09 02:28:47 +01:00
a3d4
4ec4d23886 Replaced ParserBase::position() and ParserBase::endPosition() with ParserBase::currentLocation().
It might be simpler to pass `SourceLocation` object instead of splitting it into `start` and `end`, and creating another SourceLocation object using the same `start` and `end` later.
2020-02-06 03:34:49 +01:00
alex
3416c029cf Relaxed assert in AsmJsonImporter::createAsmNode. 2020-02-04 20:37:51 +01:00
alex
211227f50b Modified SourceLocation::hasText() to allow empty source. 2020-02-04 04:19:28 +01:00
alex
76cfe4e2ce Replaced SourceLocation::isEmpty() with isValid() and hasText().
The function SourceLocation::isEmpty() had somewhat dual role.
Sometimes it indicates that the SourceLocation is invalid.
Sometimes it means that there is no corresponding source text.

Hence the proposal is to replace it with two functions, isValid() and hasText().

I also removed Scanner::sourceAt(). (Do we have a rule of thumb to remove unused code?)

Since hasText() checks that start and end are valid indices for source, I adjusted a couple of tests to avoid empty source strings.
2020-02-03 12:44:26 +01:00
Erik Kundt
ec27c2e507 Introduce AST node for structured documentation. 2020-01-30 18:25:56 +01:00
Mathias Baumann
dd035f8f48 Increase scanner lookahead to two. 2020-01-23 13:25:03 +01:00
chriseth
b3fe84a6ea
Merge pull request #7153 from djudjuu/newImportAST
import ast from JSON
2020-01-14 17:56:53 +01:00
djudjuu
e8556fa1b2 Ast-Import from standard-json 2020-01-14 17:15:53 +01:00
Christian Parpart
abb9f1eed7 CMake: Renaming devcore static library to solutil (to match source code paths) 2020-01-13 15:52:46 +01:00
Daniel Kirchner
03c70f45d6 Handle empty source strings in SourceReferenceExtractor 2020-01-09 14:18:54 +01:00
Christian Parpart
345f9928ab Library libdevcore renamed to libsolutil. 2020-01-07 15:51:50 +01:00
Christian Parpart
6b23412fae C++ namespace cleanup (except tests). 2020-01-07 15:51:50 +01:00
chriseth
f6916a637e Merge remote-tracking branch 'origin/develop' into develop_060 2019-12-09 17:16:58 +01:00
chriseth
9c3503834d Fix semver matcher differently. 2019-12-09 15:45:01 +01:00
Mathias Baumann
be615d4f2b Fix wrong construction of ElementaryTypeNameToken
And add an assert to prevent it in the future
2019-12-09 13:24:33 +00:00
chriseth
e061f1e743 Merge remote-tracking branch 'origin/develop' into HEAD 2019-12-05 16:44:26 +01:00
Henry Lee
628d219c94 Version Checker: 0.5.x-prerelease will match pragma solidity ^0.5
Basically, the pre-release rule is only applied when all remaining
version numbers equal to 0.
2019-12-05 09:07:20 +11:00
chriseth
42d9a8e962 Merge remote-tracking branch 'origin/develop' into develop_060 2019-12-04 17:01:44 +01:00
chriseth
dc79274871 Set default EVM version to Istanbul. 2019-12-04 10:42:14 +01:00
chriseth
b0db64ff5b Merge remote-tracking branch 'origin/develop' into develop_060 2019-11-26 16:19:35 +01:00
Gaith Hallak
4a1e85436b Allow splitting string literals into multiple parts 2019-11-26 14:41:30 +03:00
Mathias Baumann
caa127e2a8 Make `abstract` keyword instead of reserved 2019-11-14 11:49:39 +01:00
Mathias Baumann
7d4e4b6088 Parse "virtual" keyword 2019-11-13 13:28:01 +01:00
Daniel Kirchner
8148619d5b Merge branch 'develop' into develop_060 2019-11-12 10:32:41 +01:00
Mathias Baumann
e35a23bbcc Add `switch (..) to style checker 2019-11-11 17:44:21 +01:00
Daniel Kirchner
3321fc56ea Split fallback function and introduce "fallback()" and "receive()" syntax. 2019-11-04 17:17:58 +01:00
chriseth
edf1e83fda Merge remote-tracking branch 'origin/develop' into develop_060 2019-10-28 15:21:49 +01:00
Christian Parpart
df729b3084 Make use of C++17 std::optional<> instead of boost::optional<>. 2019-10-28 11:39:30 +01:00
chriseth
f884373142 Merge branch 'origin/develop' into develop_060 2019-10-02 16:29:36 +02:00
Christian Parpart
f85f6ba7e0 Fixes doxygen style multiline comment parsing for files with CRLF as line terminators. 2019-09-25 12:59:46 +02:00
chriseth
acf10ef60f
Merge pull request #7393 from ethereum/develop
Merge develop into 0.6.0
2019-09-10 12:27:02 +02:00
Dimitry
fd3ae0b24a add chainid and selfbalance to lllc 2019-09-09 23:35:36 +03:00
Christian Parpart
59955bed5d Adds reserved keyword virtual, and adjusting affected tests/docs respectively. 2019-09-09 13:41:43 +02:00
Daniel Kirchner
6f3341a204 Allow underscores in hex strings. 2019-09-06 17:58:35 +02:00
chriseth
fd687f50ff
Merge pull request #7353 from ethereum/develop
Update 0.6.0 from develop
2019-09-04 20:21:37 +02:00
Mathias Baumann
24716404f8 Parse override keyword 2019-08-26 17:34:21 +02:00
Alex Beregszaszi
5749a5d7c9 Introduce istanbul and berlin versions 2019-08-26 13:15:01 +01:00
Leonardo Alt
4214cd1354 [SMTChecker] Fix ICE when reporting cex concerning state vars from different source files 2019-08-10 20:56:52 +02:00
Mathias Baumann
bcc73a5225 New Error Reporter: Fix trailing whitespace 2019-08-07 14:12:31 +02:00
rocky
8b461be2b0 Add missing space in error recovery message.
Also add a space in the Test Title
2019-06-24 06:28:18 -04:00
Christian Parpart
0b65cf8af5 Fixes stack-too-deep errors (soltest) on Windows by reducing recursion depth accordingly. (Caused by introducing try/catch blocks increased stack frame size) 2019-06-17 14:47:07 +02:00
rocky
ca3afea1d7 Add Steve Johnson-style parser recovery rules:
SourceUnit = Error $
    Block = '{' Error '}'
    ContractDefinition = '{' Error '}'
    Statement = Error ';'

Co-Authored-By: chriseth <chris@ethereum.org>
2019-06-17 14:47:07 +02:00
chriseth
4ee703e6e5 Revert "Add Steve Johnson-style parser recovery rules:"
This reverts commit 97f8ee0d1b.
2019-05-28 18:09:24 +02:00
rocky
97f8ee0d1b Add Steve Johnson-style parser recovery rules:
SourceUnit = Error $
    Block = '{' Error '}'
    ContractDefinition = '{' Error '}'
    Statement = Error ';'

Co-Authored-By: chriseth <chris@ethereum.org>
2019-05-28 15:06:34 +02:00
chriseth
003c170989 Add EVM instructions as builtin functions. 2019-05-20 16:46:31 +02:00
chriseth
f9ec1231b6 Support period as part of identifiers for Yul and Inline Assembly. 2019-04-25 16:48:16 +02:00
chriseth
2c991acff0 Style cleanup. 2019-04-18 13:17:24 +02:00
rocky
b424446c5f Move SemVerHandler to analysis to parsing to increase modularity...
If ever you want to separate building analysis from scanning/parsing/ast, this will help.
2019-04-17 10:13:42 -04:00
mingchuan
f1374066af
Add shortcuts for formatting error information 2019-04-10 18:44:45 +08:00
Leonardo Alt
3296fb3764 Add callstack to model report 2019-03-20 10:35:29 +01:00
Mathias Baumann
dce8469534 Fix wrong error concatenation 2019-03-11 13:36:40 +01:00
Mathias Baumann
a2fe19cac5 Fix wrong formatting in ErrorReporter 2019-03-06 11:16:54 +01:00
Mathias Baumann
8d747ad47b Add ErrorReporter::fatalTypeError() with secondary location 2019-03-06 11:13:01 +01:00
Mathias Baumann
ca9cced4b2 Add ErrorReporter::typeErrorConcatenateDescriptions 2019-03-05 10:44:36 +01:00
chriseth
9a949c1bda Set default EVM version to Petersburg. 2019-03-04 14:53:00 +01:00
Alex Beregszaszi
ecd246aeb6 Support petersburg in evmVersion 2019-03-04 14:10:41 +01:00
Alex Beregszaszi
cb7b053a4a Consider extcodehash as part of Constantinople 2019-02-26 12:40:31 +00:00
Leonardo Alt
2405b2151a EVMVersion in langutil namespace instead of solidity 2019-02-25 15:29:57 +01:00
chriseth
15d275ed37
Merge pull request #6023 from ethereum/assignment-whitespace-op
Add extra token for assembly assignment
2019-02-21 14:43:29 +01:00
Mathias Baumann
f395d5bab4 Add extra token for assembly assignment
Adding an extra token for := prevents whitespace between : = being valid
2019-02-21 13:58:21 +01:00
Erik Kundt
6c7ad42e2d Shares langutil code with soltest. 2019-02-21 01:04:34 +01:00
Daniel Kirchner
809b9a95f9 Even more style checks. 2019-02-14 11:53:00 +01:00
Daniel Kirchner
8ca6715e18 More style checks. 2019-02-14 11:41:20 +01:00
chriseth
1a823f0bf8 Fix tabs/spaces. 2019-02-13 17:05:48 +01:00