Skip to content

Commit

Permalink
Add new command: infer-attributes
Browse files Browse the repository at this point in the history
This command will print out all functions which has attributes that
can be inferred.
  • Loading branch information
jacob-carlborg committed Apr 25, 2019
1 parent 767c508 commit d41f717
Show file tree
Hide file tree
Showing 6 changed files with 1,009 additions and 16 deletions.
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# DLP Changelog

## Unreleased

### New/Changed Features

* Add new command, `infer-attributes`, which will infer the attributes of all
regular functions.

## 0.1.0
### New/Changed Features

Expand Down
20 changes: 18 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,24 @@ $ cat test.d
void main()
{
}
$ dlp leaf-functions test
test.d(1): test.d.main
$ dlp leaf-functions test.d
test.d:1:6: test.d.main
```

* **infer-attributes** - Prints the inferred attributes of all functions that
are normally not inferred. These are regular functions and methods. Templates,
nested functions and lambdas are inferred by the compiler and will not be
included by this command

### Usage

```
$ cat test.d
void main()
{
}
$ dlp infer-attributes test.d
test.d:1:6: main: pure nothrow @nogc @safe
```

## Building
Expand Down
Loading

0 comments on commit d41f717

Please sign in to comment.