view clang/test/Analysis/double-ranges-bug.c @ 221:79ff65ed7e25

LLVM12 Original
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 15 Jun 2021 19:15:29 +0900
parents
children c4bab56944e8
line wrap: on
line source

// RUN: %clang_analyze_cc1 -verify %s -analyzer-checker=core

// expected-no-diagnostics

typedef unsigned long int A;

extern int fill(A **values, int *nvalues);

void foo() {
  A *values;
  int nvalues;
  fill(&values, &nvalues);

  int i = 1;
  double x, y;

  y = values[i - 1];
  x = values[i];

  if (x <= y) {
  }
}