view clang/test/Sema/const-eval-64.c @ 221:79ff65ed7e25

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

// RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-linux %s

#define EVAL_EXPR(testno, expr) int test##testno = sizeof(struct{char qq[expr];});

// <rdar://problem/10962435>
EVAL_EXPR(1, ((char*)-1LL) + 1 == 0 ? 1 : -1) // expected-warning {{folded}}
EVAL_EXPR(2, ((char*)-1LL) + 1 < (char*) -1 ? 1 : -1) // expected-warning {{folded}}