[VerifyDiagnosticConsumer] support -verify=<prefixes>
This mimics FileCheck's --check-prefixes option. The default prefix is "expected". That is, "-verify" is equivalent to "-verify=expected". The goal is to permit exercising a single test suite source file with different compiler options producing different sets of diagnostics. While cpp can be combined with the existing -verify to accomplish the same goal, source is often easier to maintain when it's not cluttered with preprocessor directives or duplicate passages of code. For example, this patch also rewrites some existing clang tests to demonstrate the benefit of this feature. Patch by Joel E. Denny, thanks! Differential Revision: https://reviews.llvm.org/D39694 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320908 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Basic/DiagnosticDriverKinds.td 4 additions, 0 deletionsinclude/clang/Basic/DiagnosticDriverKinds.td
- include/clang/Basic/DiagnosticOptions.h 4 additions, 0 deletionsinclude/clang/Basic/DiagnosticOptions.h
- include/clang/Driver/CC1Options.td 5 additions, 1 deletioninclude/clang/Driver/CC1Options.td
- lib/Frontend/CompilerInvocation.cpp 32 additions, 1 deletionlib/Frontend/CompilerInvocation.cpp
- lib/Frontend/VerifyDiagnosticConsumer.cpp 90 additions, 40 deletionslib/Frontend/VerifyDiagnosticConsumer.cpp
- test/Frontend/diagnostics-order.c 4 additions, 2 deletionstest/Frontend/diagnostics-order.c
- test/Frontend/verify-prefixes.c 118 additions, 0 deletionstest/Frontend/verify-prefixes.c
- test/Sema/tautological-unsigned-enum-zero-compare.c 20 additions, 154 deletionstest/Sema/tautological-unsigned-enum-zero-compare.c
- test/Sema/tautological-unsigned-enum-zero-compare.cpp 32 additions, 237 deletionstest/Sema/tautological-unsigned-enum-zero-compare.cpp
- test/Sema/tautological-unsigned-zero-compare.c 6 additions, 119 deletionstest/Sema/tautological-unsigned-zero-compare.c
Loading
Please register or sign in to comment