[PATCH] D85722: [SystemZ][z/OS] enable trigraphs by default on z/OS

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 13 07:58:49 PDT 2020


hubert.reinterpretcast added inline comments.


================
Comment at: clang/test/Lexer/cxx1z-trigraphs.cpp:24
+// notri-warning at 6 {{trigraph converted}} tri-warning at 6 {{trigraph converted}}
+// notri-warning at 12 {{backslash and newline separated by space}} tri-warning at 12 {{backslash and newline separated by space}}
+#endif
----------------
This strategy duplicates the trigraphs-enabled behaviour checks three times.

Plain `-verify` can be used along with a macro instead (without such duplication). This also allows the explicit `-fno-trigraphs` case to be added with little cost.

Pseudo-code:
```
// RUN: ...
// RUN: ... -ftrigraphs -DENABLED_TRIGRAPHS=1
// RUN: ... -fno-trigraphs -DENABLED_TRIGRAPHS=0

#ifdef __MVS__
#ifndef ENABLED_TRIGRAPHS
#define ENABLED_TRIGRAPHS 1
#endif
#endif

#if !ENABLED_TRIGRAPHS
// ...
#else
// ...
#endif
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85722/new/

https://reviews.llvm.org/D85722



More information about the cfe-commits mailing list