Clang Project

clang_source_code/test/Lexer/cxx1z-trigraphs.cpp
1// RUN: %clang_cc1 -std=c++1z %s -verify
2// RUN: %clang_cc1 -std=c++1z %s -ftrigraphs -fsyntax-only 2>&1 | FileCheck --check-prefix=TRIGRAPHS %s
3
4??= define foo ; // expected-error {{}} expected-warning {{trigraph ignored}}
5
6static_assert("??="[0] == '#', ""); // expected-error {{failed}} expected-warning {{trigraph ignored}}
7
8// ??/
9error here; // expected-error {{}}
10
11// Note, there is intentionally trailing whitespace two lines below.
12// TRIGRAPHS: :[[@LINE+1]]:{{.*}} backslash and newline separated by space
13// ??/  
14error here; // expected-error {{}}
15