LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 13974 - Analyzer does not track the value of '(*argv)', where 'argv += optind();'
Summary: Analyzer does not track the value of '(*argv)', where 'argv += optind();'
Status: NEW
Alias: None
Product: clang
Classification: Unclassified
Component: Static Analyzer (show other bugs)
Version: trunk
Hardware: PC All
: P normal
Assignee: Ted Kremenek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-28 13:36 PDT by Anna Zaks
Modified: 2012-10-07 11:35 PDT (History)
4 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anna Zaks 2012-09-28 13:36:13 PDT
unsigned optind();
int foo(char *argv[], int *p) {
  argv += optind();
  if (!*argv) {
    p = 0;
  }

  if (*argv) {
    return *p;
  }
  return 0;
}