<feed xmlns='http://www.w3.org/2005/Atom'>
<title>clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp, branch master</title>
<subtitle>Unofficial clang GIT mirror used in EmbToolkit
</subtitle>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/'/>
<entry>
<title>[C++11] Use 'nullptr'. StaticAnalyzer edition.</title>
<updated>2014-05-27T02:45:47+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@gmail.com</email>
</author>
<published>2014-05-27T02:45:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=1843a2095a5509f59f7108b17ab817b92e55c6eb'/>
<id>1843a2095a5509f59f7108b17ab817b92e55c6eb</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209642 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209642 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>[C++11] Replacing DeclStmt iterators decl_begin() and decl_end() with iterator_range decls(). Updating all of the usages of the iterators with range-based for loops.</title>
<updated>2014-03-14T17:01:24+00:00</updated>
<author>
<name>Aaron Ballman</name>
<email>aaron@aaronballman.com</email>
</author>
<published>2014-03-14T17:01:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=47aa3ca54bb0e2103306fda97af0de9a7efa5012'/>
<id>47aa3ca54bb0e2103306fda97af0de9a7efa5012</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203947 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203947 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace OwningPtr with std::unique_ptr.</title>
<updated>2014-03-07T20:03:18+00:00</updated>
<author>
<name>Ahmed Charles</name>
<email>ahmedcharles@gmail.com</email>
</author>
<published>2014-03-07T20:03:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=70639e8de3f7232504008ae36507eb0125093907'/>
<id>70639e8de3f7232504008ae36507eb0125093907</id>
<content type='text'>
This compiles cleanly with lldb/lld/clang-tools-extra/llvm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203279 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This compiles cleanly with lldb/lld/clang-tools-extra/llvm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203279 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>[C++11] Replace llvm::tie with std::tie.</title>
<updated>2014-03-02T13:01:17+00:00</updated>
<author>
<name>Benjamin Kramer</name>
<email>benny.kra@googlemail.com</email>
</author>
<published>2014-03-02T13:01:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=ba9fd9e97eb0a194186ae9fc4d3344f5c8640c09'/>
<id>ba9fd9e97eb0a194186ae9fc4d3344f5c8640c09</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202639 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202639 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Expose the name of the checker producing each diagnostic message.</title>
<updated>2014-02-11T21:49:21+00:00</updated>
<author>
<name>Alexander Kornienko</name>
<email>alexfh@google.com</email>
</author>
<published>2014-02-11T21:49:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=15c01b27f5651daf39978f722aff057079230042'/>
<id>15c01b27f5651daf39978f722aff057079230042</id>
<content type='text'>
Summary:
In clang-tidy we'd like to know the name of the checker producing each
diagnostic message. PathDiagnostic has BugType and Category fields, which are
both arbitrary human-readable strings, but we need to know the exact name of the
checker in the form that can be used in the CheckersControlList option to
enable/disable the specific checker.

This patch adds the CheckName field to the CheckerBase class, and sets it in
the CheckerManager::registerChecker() method, which gets them from the
CheckerRegistry.

Checkers that implement multiple checks have to store the names of each check
in the respective registerXXXChecker method.

Reviewers: jordan_rose, krememek

Reviewed By: jordan_rose

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2557

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201186 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
In clang-tidy we'd like to know the name of the checker producing each
diagnostic message. PathDiagnostic has BugType and Category fields, which are
both arbitrary human-readable strings, but we need to know the exact name of the
checker in the form that can be used in the CheckersControlList option to
enable/disable the specific checker.

This patch adds the CheckName field to the CheckerBase class, and sets it in
the CheckerManager::registerChecker() method, which gets them from the
CheckerRegistry.

Checkers that implement multiple checks have to store the names of each check
in the respective registerXXXChecker method.

Reviewers: jordan_rose, krememek

Reviewed By: jordan_rose

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2557

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201186 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>[analyzer] Better modeling of memcpy by the CStringChecker (PR16731).</title>
<updated>2013-11-17T09:18:48+00:00</updated>
<author>
<name>Anton Yartsev</name>
<email>anton.yartsev@gmail.com</email>
</author>
<published>2013-11-17T09:18:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=b7a747b0c271faeeb8d0f886f0e691eb25f637d9'/>
<id>b7a747b0c271faeeb8d0f886f0e691eb25f637d9</id>
<content type='text'>
New rules of invalidation/escape of the source buffer of memcpy: the source buffer contents is invalidated and escape while the source buffer region itself is neither invalidated, nor escape.
In the current modeling of memcpy the information about allocation state of regions, accessible through the source buffer, is not copied to the destination buffer and we can not track the allocation state of those regions anymore. So we invalidate/escape the source buffer indirect regions in anticipation of their being invalidated for real later. This eliminates false-positive leaks reported by the unix.Malloc and alpha.cplusplus.NewDeleteLeaks checkers for the cases like

char *f() {
  void *x = malloc(47);
  char *a;
  memcpy(&amp;a, &amp;x, sizeof a);
  return a;
}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194953 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
New rules of invalidation/escape of the source buffer of memcpy: the source buffer contents is invalidated and escape while the source buffer region itself is neither invalidated, nor escape.
In the current modeling of memcpy the information about allocation state of regions, accessible through the source buffer, is not copied to the destination buffer and we can not track the allocation state of those regions anymore. So we invalidate/escape the source buffer indirect regions in anticipation of their being invalidated for real later. This eliminates false-positive leaks reported by the unix.Malloc and alpha.cplusplus.NewDeleteLeaks checkers for the cases like

char *f() {
  void *x = malloc(47);
  char *a;
  memcpy(&amp;a, &amp;x, sizeof a);
  return a;
}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194953 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>[analyzer] Replace bug category magic strings with shared constants, take 2.</title>
<updated>2013-10-04T00:25:24+00:00</updated>
<author>
<name>Jordan Rose</name>
<email>jordan_rose@apple.com</email>
</author>
<published>2013-10-04T00:25:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=edcc199f5861dd8ad1ec3ad1b83512d2a92e515a'/>
<id>edcc199f5861dd8ad1ec3ad1b83512d2a92e515a</id>
<content type='text'>
Re-commit r191910 (reverted in r191936) with layering violation fixed, by
moving the bug categories to StaticAnalyzerCore instead of ...Checkers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191937 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Re-commit r191910 (reverted in r191936) with layering violation fixed, by
moving the bug categories to StaticAnalyzerCore instead of ...Checkers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191937 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Temporarily revert r191910 until the layering violation can be fixed.</title>
<updated>2013-10-03T23:38:02+00:00</updated>
<author>
<name>Richard Smith</name>
<email>richard-llvm@metafoo.co.uk</email>
</author>
<published>2013-10-03T23:38:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=10a61586e12fcd94dad877cbcf09cc34aec980d8'/>
<id>10a61586e12fcd94dad877cbcf09cc34aec980d8</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191936 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191936 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>[analyzer] Replace bug category magic strings with shared constants.</title>
<updated>2013-10-03T16:57:20+00:00</updated>
<author>
<name>Jordan Rose</name>
<email>jordan_rose@apple.com</email>
</author>
<published>2013-10-03T16:57:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=4587cace907ed9a68256bdae506fbb8d93ac232c'/>
<id>4587cace907ed9a68256bdae506fbb8d93ac232c</id>
<content type='text'>
One small functionality change is to bring the sizeof-pointer checker in
line with the other checkers by making its category be "Logic error"
instead of just "Logic". There should be no other functionality changes.

Patch by Daniel Marjamäki!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191910 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
One small functionality change is to bring the sizeof-pointer checker in
line with the other checkers by making its category be "Logic error"
instead of just "Logic". There should be no other functionality changes.

Patch by Daniel Marjamäki!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191910 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>[analyzer] Assume that strings are no longer than SIZE_MAX/4.</title>
<updated>2013-08-19T16:27:34+00:00</updated>
<author>
<name>Jordan Rose</name>
<email>jordan_rose@apple.com</email>
</author>
<published>2013-08-19T16:27:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=a728e927c6e58f26b2c8615a8baa761d2f157e4b'/>
<id>a728e927c6e58f26b2c8615a8baa761d2f157e4b</id>
<content type='text'>
This keeps the analyzer from making silly assumptions, like thinking
strlen(foo)+1 could wrap around to 0. This fixes PR16558.

Patch by Karthik Bhat!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188680 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This keeps the analyzer from making silly assumptions, like thinking
strlen(foo)+1 could wrap around to 0. This fixes PR16558.

Patch by Karthik Bhat!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188680 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
</feed>
