diff options
author | Serge Pavlov <sepavloff@gmail.com> | 2016-11-04 06:09:23 +0000 |
---|---|---|
committer | Serge Pavlov <sepavloff@gmail.com> | 2016-11-04 06:09:23 +0000 |
commit | 351cf00f4839eb42c9c4a247302a8c625d835d1f (patch) | |
tree | c98551c1230adb4dcddcb31fd3ccde6156611512 /test/Coverage | |
parent | 0b0e503e9c9a28574c141c1fd3f0ca8ebffeb801 (diff) |
Enhancement to test for -ast-print
Present tests for the functionality provided by command lime option
`-ast-print` check only absence of crash. This change tries to make
testing better, - the output produced by the compiler is compiled again
with option `-print-ast` and both outputs are compared. Such test at
least checks that the output is valid code. This change fixes only the
test for pure C.
This is recommit of r285882.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285981 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Coverage')
-rw-r--r-- | test/Coverage/ast-printing.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/Coverage/ast-printing.c b/test/Coverage/ast-printing.c index ecaf3abeaa..eb22f92e66 100644 --- a/test/Coverage/ast-printing.c +++ b/test/Coverage/ast-printing.c @@ -1,5 +1,7 @@ // RUN: %clang_cc1 -fsyntax-only %s -// RUN: %clang_cc1 -ast-print %s +// RUN: %clang_cc1 -ast-print %s -o %t.1.c +// RUN: %clang_cc1 -ast-print %t.1.c -o %t.2.c +// RUN: diff %t.1.c %t.2.c // RUN: %clang_cc1 -ast-dump %s // RUN: %clang_cc1 -print-decl-contexts %s |