summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclAttr.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-02-11 07:31:47 +0000
committerTed Kremenek <kremenek@apple.com>2010-02-11 07:31:47 +0000
commit510ee2594ec2626df14aa57b4d1a38c7d8bc2420 (patch)
treecd299313674bcea5d4b1a4f4f9c2cd71cb10be8d /clang/lib/Sema/SemaDeclAttr.cpp
parent00ea4a36d6fdf2953da7d41af1edf65548caa9f3 (diff)
downloadbcm5719-llvm-510ee2594ec2626df14aa57b4d1a38c7d8bc2420.tar.gz
bcm5719-llvm-510ee2594ec2626df14aa57b4d1a38c7d8bc2420.zip
Use the allocator associated with ASTContext to allocate the args
array associated with NonNullAttr. This fixes yet another leak when ASTContext uses a BumpPtrAllocator. Fixes: <rdar://problem/7637150> llvm-svn: 95863
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclAttr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index e592fd2f556..cba1e9e1cd5 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -307,7 +307,7 @@ static void HandleNonNullAttr(Decl *d, const AttributeList &Attr, Sema &S) {
unsigned* start = &NonNullArgs[0];
unsigned size = NonNullArgs.size();
std::sort(start, start + size);
- d->addAttr(::new (S.Context) NonNullAttr(start, size));
+ d->addAttr(::new (S.Context) NonNullAttr(S.Context, start, size));
}
static void HandleAliasAttr(Decl *d, const AttributeList &Attr, Sema &S) {
OpenPOWER on IntegriCloud