summaryrefslogtreecommitdiffstats
path: root/test/Analysis/ptr-cmp-const-trunc.cl
blob: 4483ef68397c7ab03dbee7e88c6f68d56a63e560 (plain)
1
2
3
4
5
6
7
8
9
10
11
//RUN: %clang_analyze_cc1 -triple amdgcn-unknown-unknown -analyze -analyzer-checker=core -verify %s
// expected-no-diagnostics

#include <stdint.h>

void bar(__global int *p) __attribute__((nonnull(1)));

void foo(__global int *p) {
  if ((uint64_t)p <= 1UL << 32)
    bar(p); // no-warning
}