[PATCH] D19831: [scan-build] fix dead store warnings emitted on clang code base

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Tue May 3 14:08:38 PDT 2016


Thanks - do you need someone (me) to commit this, or do you have commit
access?

On Tue, May 3, 2016 at 1:32 PM, Apelete Seketeli via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> apelete updated this revision to Diff 56059.
> apelete added a comment.
>
> [scan-build] fix dead store warnings emitted on clang code base
>
> Changes since last revision:
>
> - Move 'Record' and 'Parent' variables into if() {} scope where they are
> actually used.
>
>
> http://reviews.llvm.org/D19831
>
> Files:
>   tools/c-index-test/c-index-test.c
>
> Index: tools/c-index-test/c-index-test.c
> ===================================================================
> --- tools/c-index-test/c-index-test.c
> +++ tools/c-index-test/c-index-test.c
> @@ -1432,10 +1432,10 @@
>      CXString FieldSpelling = clang_getCursorSpelling(cursor);
>      const char *FieldName = clang_getCString(FieldSpelling);
>      /* recurse to get the first parent record that is not anonymous. */
> -    CXCursor Parent, Record;
>      unsigned RecordIsAnonymous = 0;
>      if (clang_getCursorKind(cursor) == CXCursor_FieldDecl) {
> -      Record = Parent = p;
> +      CXCursor Record;
> +      CXCursor Parent = p;
>        do {
>          Record = Parent;
>          Parent = clang_getCursorSemanticParent(Record);
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160503/3e09f35c/attachment-0001.html>


More information about the cfe-commits mailing list