https://bugs.llvm.org/show_bug.cgi?id=41774

            Bug ID: 41774
           Summary: GetFullTypeForDeclarator - ExpectNoDerefChunk assigned
                    twice successively
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: libclang
          Assignee: unassignedclangb...@nondot.org
          Reporter: llvm-...@redking.me.uk
                CC: aa...@aaronballman.com, kli...@google.com,
                    leonardc...@google.com, llvm-bugs@lists.llvm.org,
                    richard-l...@metafoo.co.uk
            Blocks: 41655

rL348442 sets the ExpectNoDerefChunk value twice successively:

    if (DeclType.Kind != DeclaratorChunk::Paren) {
      if (ExpectNoDerefChunk) {
        if (!IsNoDerefableChunk(DeclType))
          S.Diag(DeclType.Loc, diag::warn_noderef_on_non_pointer_or_array);
        ExpectNoDerefChunk = false;
      }

      ExpectNoDerefChunk = state.didParseNoDeref();
    }

Reported in https://www.viva64.com/en/b/0629/ (Snippets No. 27).


Referenced Bugs:

https://bugs.llvm.org/show_bug.cgi?id=41655
[Bug 41655] Finding Bugs in LLVM 8 with PVS-Studio
-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to