diff options
author | Serge Pavlov <sepavloff@gmail.com> | 2016-11-03 07:32:02 +0000 |
---|---|---|
committer | Serge Pavlov <sepavloff@gmail.com> | 2016-11-03 07:32:02 +0000 |
commit | 459d409358ac4552dca613431a05862c0dc4b5ca (patch) | |
tree | b77757418274319f1e0c532f41bf7f16671632c9 /clang/test/Coverage | |
parent | 277a09d9fad06ac2ef69c589e1053e00a5075718 (diff) | |
download | bcm5719-llvm-459d409358ac4552dca613431a05862c0dc4b5ca.tar.gz bcm5719-llvm-459d409358ac4552dca613431a05862c0dc4b5ca.zip |
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.
llvm-svn: 285882
Diffstat (limited to 'clang/test/Coverage')
-rw-r--r-- | clang/test/Coverage/ast-printing.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/test/Coverage/ast-printing.c b/clang/test/Coverage/ast-printing.c index ecaf3abeaa8..eb22f92e66d 100644 --- a/clang/test/Coverage/ast-printing.c +++ b/clang/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 |