diff options
author | Ismail Pazarbasi <ismail.pazarbasi@gmail.com> | 2015-05-14 16:14:57 +0000 |
---|---|---|
committer | Ismail Pazarbasi <ismail.pazarbasi@gmail.com> | 2015-05-14 16:14:57 +0000 |
commit | 538ef53c139d9915327960217e922b2be7e8b3fd (patch) | |
tree | 3d6a10da310f704215fff7d5b0b3cbec701f3545 /clang/lib/Sema/MultiplexExternalSemaSource.cpp | |
parent | 9d08232e28f6bbdfeb080d2d9f138a6dc55d7e93 (diff) | |
download | llvm-538ef53c139d9915327960217e922b2be7e8b3fd.zip llvm-538ef53c139d9915327960217e922b2be7e8b3fd.tar.gz llvm-538ef53c139d9915327960217e922b2be7e8b3fd.tar.bz2 |
Detect uses of mismatching forms of 'new' and 'delete'
Emit warning when operand to `delete` is allocated with `new[]` or
operand to `delete[]` is allocated with `new`.
Reviewers: rtrieu, jordan_rose, rsmith
Subscribers: majnemer, cfe-commits
Differential Revision: http://reviews.llvm.org/D4661
llvm-svn: 237368
Diffstat (limited to 'clang/lib/Sema/MultiplexExternalSemaSource.cpp')
-rw-r--r-- | clang/lib/Sema/MultiplexExternalSemaSource.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/clang/lib/Sema/MultiplexExternalSemaSource.cpp b/clang/lib/Sema/MultiplexExternalSemaSource.cpp index 51a1274..9ecb5a7 100644 --- a/clang/lib/Sema/MultiplexExternalSemaSource.cpp +++ b/clang/lib/Sema/MultiplexExternalSemaSource.cpp @@ -212,7 +212,15 @@ void MultiplexExternalSemaSource::ReadUndefinedButUsed( for(size_t i = 0; i < Sources.size(); ++i) Sources[i]->ReadUndefinedButUsed(Undefined); } - + +void MultiplexExternalSemaSource::ReadMismatchingDeleteExpressions( + llvm::MapVector<FieldDecl *, + llvm::SmallVector<std::pair<SourceLocation, bool>, 4>> & + Exprs) { + for (auto &Source : Sources) + Source->ReadMismatchingDeleteExpressions(Exprs); +} + bool MultiplexExternalSemaSource::LookupUnqualified(LookupResult &R, Scope *S){ for(size_t i = 0; i < Sources.size(); ++i) Sources[i]->LookupUnqualified(R, S); |