diff options
author | Anna Zaks <ganna@apple.com> | 2013-06-06 22:32:11 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2013-06-06 22:32:11 +0000 |
commit | de2ae19cf6048efc38d47af09831e1786db4ee0a (patch) | |
tree | e9935bedd6a5b3dc6fb3a8d36a3221e369eea5eb | |
parent | b272a753280b107c612a29b3b21a10c18a5fd520 (diff) | |
download | bcm5719-llvm-de2ae19cf6048efc38d47af09831e1786db4ee0a.tar.gz bcm5719-llvm-de2ae19cf6048efc38d47af09831e1786db4ee0a.zip |
[analyzer] Address Jordan’s code review for r183451
llvm-svn: 183455
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/BugReporter.cpp | 6 | ||||
-rw-r--r-- | clang/test/Analysis/unix-fns.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp index e3f43854d63..e93bb3fce5e 100644 --- a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp +++ b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp @@ -248,7 +248,7 @@ static void adjustCallLocations(PathPieces &Pieces, /// We might have pieces with invalid locations as a result of inlining Body /// Farm generated functions. static void removePiecesWithInvalidLocations(PathPieces &Pieces) { - for (PathPieces::iterator I = Pieces.begin(), E = Pieces.end(); I != E; ++I) { + for (PathPieces::iterator I = Pieces.begin(), E = Pieces.end(); I != E;) { if (PathDiagnosticCallPiece *C = dyn_cast<PathDiagnosticCallPiece>(*I)) removePiecesWithInvalidLocations(C->path); @@ -257,10 +257,10 @@ static void removePiecesWithInvalidLocations(PathPieces &Pieces) { if (!(*I)->getLocation().isValid() || !(*I)->getLocation().asLocation().isValid()) { - Pieces.erase(I); + I = Pieces.erase(I); continue; } - + I++; } } diff --git a/clang/test/Analysis/unix-fns.c b/clang/test/Analysis/unix-fns.c index ecd2421d5da..dad03fac70b 100644 --- a/clang/test/Analysis/unix-fns.c +++ b/clang/test/Analysis/unix-fns.c @@ -1,6 +1,8 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,unix.API,osx.API %s -analyzer-store=region -analyzer-output=plist -analyzer-eagerly-assume -analyzer-config faux-bodies=true -analyzer-config path-diagnostics-alternate=false -fblocks -verify -o %t.plist // RUN: FileCheck --input-file=%t.plist %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.API,osx.API -analyzer-output=html -analyzer-config faux-bodies=true -fblocks -o %T/dir %s +// RUN: mkdir -p %t.dir +// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.API,osx.API -analyzer-output=html -analyzer-config faux-bodies=true -fblocks -o %t.dir %s +// RUN: rm -fR %t.dir struct _opaque_pthread_once_t { long __sig; char __opaque[8]; @@ -16,7 +18,6 @@ void *realloc(void *, size_t); void *reallocf(void *, size_t); void *alloca(size_t); void *valloc(size_t); - typedef union { struct _os_object_s *_os_obj; struct dispatch_object_s *_do; @@ -32,7 +33,6 @@ typedef union { struct dispatch_operation_s *_doperation; struct dispatch_disk_s *_ddisk; } dispatch_object_t __attribute__((__transparent_union__)); - typedef void (^dispatch_block_t)(void); typedef long dispatch_once_t; typedef struct dispatch_queue_s *dispatch_queue_t; |