2014-06-21 03:23:57 +08:00
|
|
|
// RUN: %clang_cc1 -std=c++1z %s -verify
|
2020-08-14 02:33:04 +08:00
|
|
|
// RUN: %clang_cc1 -std=c++1z %s -verify -ftrigraphs -DENABLED_TRIGRAPHS=1
|
|
|
|
// RUN: %clang_cc1 -std=c++1z %s -verify -fno-trigraphs -DENABLED_TRIGRAPHS=0
|
2014-06-21 03:23:57 +08:00
|
|
|
|
2020-08-14 02:33:04 +08:00
|
|
|
#ifdef __MVS__
|
|
|
|
#ifndef ENABLED_TRIGRAPHS
|
|
|
|
#define ENABLED_TRIGRAPHS 1
|
|
|
|
#endif
|
|
|
|
#endif
|
2014-06-21 03:23:57 +08:00
|
|
|
|
2020-08-14 02:33:04 +08:00
|
|
|
??= define foo ;
|
|
|
|
|
|
|
|
static_assert("??="[0] == '#', "");
|
2014-06-21 03:23:57 +08:00
|
|
|
|
|
|
|
// ??/
|
2020-08-14 02:33:04 +08:00
|
|
|
error here;
|
2017-04-19 05:45:04 +08:00
|
|
|
|
2020-08-14 02:33:04 +08:00
|
|
|
// Note, there is intentionally trailing whitespace one line below.
|
2017-04-19 05:45:04 +08:00
|
|
|
// ??/
|
2020-08-14 02:33:04 +08:00
|
|
|
error here;
|
|
|
|
|
|
|
|
#if !ENABLED_TRIGRAPHS
|
|
|
|
// expected-error@11 {{}} expected-warning@11 {{trigraph ignored}}
|
|
|
|
// expected-error@13 {{failed}} expected-warning@13 {{trigraph ignored}}
|
|
|
|
// expected-error@16 {{}}
|
|
|
|
// expected-error@20 {{}}
|
|
|
|
#else
|
|
|
|
// expected-warning@11 {{trigraph converted}}
|
|
|
|
// expected-warning@13 {{trigraph converted}}
|
|
|
|
// expected-warning@19 {{backslash and newline separated by space}}
|
|
|
|
#endif
|