diff options
author | Nicolas Lesser <blitzrakete@gmail.com> | 2019-05-19 15:07:58 +0000 |
---|---|---|
committer | Nicolas Lesser <blitzrakete@gmail.com> | 2019-05-19 15:07:58 +0000 |
commit | f53d1727107ed84a1153b7db193cfb9c18c5e2a9 (patch) | |
tree | cb7c33ae9192c96d41ae85b9767209410e0b06f7 /llvm/lib/DebugInfo/CodeView/DebugFrameDataSubsection.cpp | |
parent | 9ef99b4b118bf6b2b94684c1241450a639c9203f (diff) | |
download | llvm-f53d1727107ed84a1153b7db193cfb9c18c5e2a9.zip llvm-f53d1727107ed84a1153b7db193cfb9c18c5e2a9.tar.gz llvm-f53d1727107ed84a1153b7db193cfb9c18c5e2a9.tar.bz2 |
Added a better diagnostic when using the delete operator with lambdas
Summary:
This adds a new error for missing parentheses around lambdas in delete operators.
```
int main() {
delete []() { return new int(); }();
}
```
This will result in:
```
test.cpp:2:3: error: '[]' after delete interpreted as 'delete[]'
delete []() { return new int(); }();
^~~~~~~~~
test.cpp:2:9: note: add parentheses around the lambda
delete []() { return new int(); }();
^
( )
```
Reviewers: rsmith
Reviewed By: rsmith
Subscribers: riccibruno, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D36357
llvm-svn: 361119
Diffstat (limited to 'llvm/lib/DebugInfo/CodeView/DebugFrameDataSubsection.cpp')
0 files changed, 0 insertions, 0 deletions