Fix issues related to clang 17 upgrade.

- The name of the system include directory has changed to not
  include the minor version inforamtion.  Update the hacky computation
  of this name for copying the Checked C files to that location.
- FileCheck now complains about unused check-prefix
  arguments when checking test results. This uncovered a bunch
  of errors in our dynamic_checking tests with incorrect check prefixes
  (the test wasn't checking its results properly).
- Clang's defaults have changed, so now a bunch of warnings are now
  errors.  These include things that Checked C complained about
  anyway, such as missing prototypes, incorrect function pointer casts,
  and so on.  The warnings being converted to errors affected some of
  our tests. We included clang's messages because they occurred on the
  same line as our errors.
- A few error messages have change format.
- Disabled the typechecking\no_prototype_functions.c test on Windows.
  It seems to cause the compiler to loop due to some changes in the
  internal representation of types. It might loop on Linux, I haven't
  checked.

Testing results:

Here are the results from running check-checkedc on Windows:
  Unsupported:  6
  Passed     : 82
  Failed     : 11
This commit is contained in:
David Tarditi 2024-05-11 21:27:55 -07:00
Родитель 936ad214d7
Коммит 877fc24372
16 изменённых файлов: 150 добавлений и 143 удалений

Просмотреть файл

@ -84,7 +84,7 @@ set(posix_sys_files
# Hack - compute the CLANG version from the LLVM version. The
# CLANG_VERSION variable is not available at this point during the build.
string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CHECKEDC_CLANG_VERSION
string(REGEX MATCH "[0-9]+" CHECKEDC_CLANG_VERSION
${PACKAGE_VERSION})
set(output_dir ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CHECKEDC_CLANG_VERSION}/include)

Просмотреть файл

@ -12,52 +12,52 @@
// The following lines are for the clang automated test suite.
//
// RUN: %clang %S/deref_dot_member_expr.c -o %t1 -DTEST_READ -DARROW_OPERATOR -Werror -Wno-unused-value %checkedc_target_flags
// RUN: %checkedc_rununder %t1 pass1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-1-READ
// RUN: %checkedc_rununder %t1 pass2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-2-READ
// RUN: %checkedc_rununder %t1 pass3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-3-READ
// RUN: %checkedc_rununder %t1 pass4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-4-READ
// RUN: %checkedc_rununder %t1 pass5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-5-READ
// RUN: %checkedc_rununder %t1 fail1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-1
// RUN: %checkedc_rununder %t1 fail2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-2
// RUN: %checkedc_rununder %t1 fail3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-3
// RUN: %checkedc_rununder %t1 fail4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-4
// RUN: %checkedc_rununder %t1 fail5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-5
// RUN: %checkedc_rununder %t1 pass1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-1-READ
// RUN: %checkedc_rununder %t1 pass2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-2-READ
// RUN: %checkedc_rununder %t1 pass3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-3-READ
// RUN: %checkedc_rununder %t1 pass4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-4-READ
// RUN: %checkedc_rununder %t1 pass5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-5-READ
// RUN: %checkedc_rununder %t1 fail1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-1
// RUN: %checkedc_rununder %t1 fail2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-2
// RUN: %checkedc_rununder %t1 fail3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-3
// RUN: %checkedc_rununder %t1 fail4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-4
// RUN: %checkedc_rununder %t1 fail5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-5
//
// RUN: %clang %S/deref_dot_member_expr.c -o %t2 -DTEST_WRITE -DARROW_OPERATOR -Werror %checkedc_target_flags
// RUN: %checkedc_rununder %t2 pass1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-1-WRITE
// RUN: %checkedc_rununder %t2 pass2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-2-WRITE
// RUN: %checkedc_rununder %t2 pass3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-3-WRITE
// RUN: %checkedc_rununder %t2 pass4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-4-WRITE
// RUN: %checkedc_rununder %t2 pass5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-5-WRITE
// RUN: %checkedc_rununder %t2 fail1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-1
// RUN: %checkedc_rununder %t2 fail2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-2
// RUN: %checkedc_rununder %t2 fail3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-3
// RUN: %checkedc_rununder %t2 fail4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-4
// RUN: %checkedc_rununder %t2 fail5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-5
// RUN: %checkedc_rununder %t2 pass1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-1-WRITE
// RUN: %checkedc_rununder %t2 pass2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-2-WRITE
// RUN: %checkedc_rununder %t2 pass3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-3-WRITE
// RUN: %checkedc_rununder %t2 pass4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-4-WRITE
// RUN: %checkedc_rununder %t2 pass5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-5-WRITE
// RUN: %checkedc_rununder %t2 fail1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-1
// RUN: %checkedc_rununder %t2 fail2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-2
// RUN: %checkedc_rununder %t2 fail3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-3
// RUN: %checkedc_rununder %t2 fail4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-4
// RUN: %checkedc_rununder %t2 fail5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-5
// RUN: %clang %S/deref_dot_member_expr.c -o %t3 -DTEST_INCREMENT -DARROW_OPERATOR -Werror %checkedc_target_flags
// RUN: %checkedc_rununder %t3 pass1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-1-INCREMENT
// RUN: %checkedc_rununder %t3 pass2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-2-INCREMENT
// RUN: %checkedc_rununder %t3 pass3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-3-INCREMENT
// RUN: %checkedc_rununder %t3 pass4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-4-INCREMENT
// RUN: %checkedc_rununder %t3 pass5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-5-INCREMENT
// RUN: %checkedc_rununder %t3 fail1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-1
// RUN: %checkedc_rununder %t3 fail2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-2
// RUN: %checkedc_rununder %t3 fail3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-3
// RUN: %checkedc_rununder %t3 fail4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-4
// RUN: %checkedc_rununder %t3 fail5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-5
// RUN: %checkedc_rununder %t3 pass1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-1-INCREMENT
// RUN: %checkedc_rununder %t3 pass2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-2-INCREMENT
// RUN: %checkedc_rununder %t3 pass3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-3-INCREMENT
// RUN: %checkedc_rununder %t3 pass4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-4-INCREMENT
// RUN: %checkedc_rununder %t3 pass5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-5-INCREMENT
// RUN: %checkedc_rununder %t3 fail1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-1
// RUN: %checkedc_rununder %t3 fail2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-2
// RUN: %checkedc_rununder %t3 fail3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-3
// RUN: %checkedc_rununder %t3 fail4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-4
// RUN: %checkedc_rununder %t3 fail5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-5
// RUN: %clang %S/deref_dot_member_expr.c -o %t4 -DTEST_COMPOUND_ASSIGN -DARROW_OPERATOR -Werror %checkedc_target_flags
// RUN: %checkedc_rununder %t4 pass1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-1-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 pass2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-2-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 pass3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-3-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 pass4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-4-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 pass5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-5-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 fail1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-1
// RUN: %checkedc_rununder %t4 fail2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-2
// RUN: %checkedc_rununder %t4 fail3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-3
// RUN: %checkedc_rununder %t4 fail4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-4
// RUN: %checkedc_rununder %t4 fail5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-5
// RUN: %checkedc_rununder %t4 pass1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-1-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 pass2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-2-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 pass3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-3-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 pass4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-4-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 pass5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-5-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 fail1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-1
// RUN: %checkedc_rununder %t4 fail2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-2
// RUN: %checkedc_rununder %t4 fail3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-3
// RUN: %checkedc_rununder %t4 fail4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-4
// RUN: %checkedc_rununder %t4 fail5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-5
#import <stdlib.h>

Просмотреть файл

@ -12,52 +12,52 @@
// if optimisation is breaking some dynamic checks.
//
// RUN: %clang %S/deref_dot_member_expr.c -o %t1 -DTEST_READ -DARROW_OPERATOR -Werror -Wno-unused-value -O3 %checkedc_target_flags
// RUN: %checkedc_rununder %t1 pass1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-1-READ
// RUN: %checkedc_rununder %t1 pass2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-2-READ
// RUN: %checkedc_rununder %t1 pass3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-3-READ
// RUN: %checkedc_rununder %t1 pass4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-4-READ
// RUN: %checkedc_rununder %t1 pass5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-5-READ
// RUN: %checkedc_rununder %t1 fail1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-1
// RUN: %checkedc_rununder %t1 fail2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-2
// RUN: %checkedc_rununder %t1 fail3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-3
// RUN: %checkedc_rununder %t1 fail4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-4
// RUN: %checkedc_rununder %t1 fail5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-5
// RUN: %checkedc_rununder %t1 pass1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-1-READ
// RUN: %checkedc_rununder %t1 pass2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-2-READ
// RUN: %checkedc_rununder %t1 pass3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-3-READ
// RUN: %checkedc_rununder %t1 pass4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-4-READ
// RUN: %checkedc_rununder %t1 pass5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-5-READ
// RUN: %checkedc_rununder %t1 fail1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-1
// RUN: %checkedc_rununder %t1 fail2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-2
// RUN: %checkedc_rununder %t1 fail3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-3
// RUN: %checkedc_rununder %t1 fail4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-4
// RUN: %checkedc_rununder %t1 fail5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-5
//
// RUN: %clang %S/deref_dot_member_expr.c -o %t2 -DTEST_WRITE -DARROW_OPERATOR -Werror -O3 %checkedc_target_flags
// RUN: %checkedc_rununder %t2 pass1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-1-WRITE
// RUN: %checkedc_rununder %t2 pass2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-2-WRITE
// RUN: %checkedc_rununder %t2 pass3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-3-WRITE
// RUN: %checkedc_rununder %t2 pass4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-4-WRITE
// RUN: %checkedc_rununder %t2 pass5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-5-WRITE
// RUN: %checkedc_rununder %t2 fail1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-1
// RUN: %checkedc_rununder %t2 fail2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-2
// RUN: %checkedc_rununder %t2 fail3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-3
// RUN: %checkedc_rununder %t2 fail4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-4
// RUN: %checkedc_rununder %t2 fail5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-5
// RUN: %checkedc_rununder %t2 pass1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-1-WRITE
// RUN: %checkedc_rununder %t2 pass2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-2-WRITE
// RUN: %checkedc_rununder %t2 pass3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-3-WRITE
// RUN: %checkedc_rununder %t2 pass4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-4-WRITE
// RUN: %checkedc_rununder %t2 pass5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-5-WRITE
// RUN: %checkedc_rununder %t2 fail1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-1
// RUN: %checkedc_rununder %t2 fail2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-2
// RUN: %checkedc_rununder %t2 fail3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-3
// RUN: %checkedc_rununder %t2 fail4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-4
// RUN: %checkedc_rununder %t2 fail5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-5
// RUN: %clang %S/deref_dot_member_expr.c -o %t3 -DTEST_INCREMENT -DARROW_OPERATOR -Werror -O3 %checkedc_target_flags
// RUN: %checkedc_rununder %t3 pass1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-1-INCREMENT
// RUN: %checkedc_rununder %t3 pass2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-2-INCREMENT
// RUN: %checkedc_rununder %t3 pass3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-3-INCREMENT
// RUN: %checkedc_rununder %t3 pass4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-4-INCREMENT
// RUN: %checkedc_rununder %t3 pass5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-5-INCREMENT
// RUN: %checkedc_rununder %t3 fail1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-1
// RUN: %checkedc_rununder %t3 fail2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-2
// RUN: %checkedc_rununder %t3 fail3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-3
// RUN: %checkedc_rununder %t3 fail4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-4
// RUN: %checkedc_rununder %t3 fail5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-5
// RUN: %checkedc_rununder %t3 pass1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-1-INCREMENT
// RUN: %checkedc_rununder %t3 pass2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-2-INCREMENT
// RUN: %checkedc_rununder %t3 pass3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-3-INCREMENT
// RUN: %checkedc_rununder %t3 pass4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-4-INCREMENT
// RUN: %checkedc_rununder %t3 pass5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-5-INCREMENT
// RUN: %checkedc_rununder %t3 fail1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-1
// RUN: %checkedc_rununder %t3 fail2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-2
// RUN: %checkedc_rununder %t3 fail3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-3
// RUN: %checkedc_rununder %t3 fail4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-4
// RUN: %checkedc_rununder %t3 fail5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-5
// RUN: %clang %S/deref_dot_member_expr.c -o %t4 -DTEST_COMPOUND_ASSIGN -DARROW_OPERATOR -Werror -O3 %checkedc_target_flags
// RUN: %checkedc_rununder %t4 pass1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-1-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 pass2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-2-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 pass3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-3-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 pass4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-4-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 pass5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,ARROW,PASS-5-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 fail1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-1
// RUN: %checkedc_rununder %t4 fail2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-2
// RUN: %checkedc_rununder %t4 fail3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-3
// RUN: %checkedc_rununder %t4 fail4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-4
// RUN: %checkedc_rununder %t4 fail5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,ARROW,FAIL-5
// RUN: %checkedc_rununder %t4 pass1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-1-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 pass2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-2-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 pass3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-3-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 pass4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-4-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 pass5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-5-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 fail1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-1
// RUN: %checkedc_rununder %t4 fail2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-2
// RUN: %checkedc_rununder %t4 fail3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-3
// RUN: %checkedc_rununder %t4 fail4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-4
// RUN: %checkedc_rununder %t4 fail5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-5
#import <stdlib.h>

Просмотреть файл

@ -25,11 +25,11 @@
// RUN: %checkedc_rununder %t1 pass3 | FileCheck %s --check-prefixes=CHECK,CHECK-PASS,PASS-3-READ
// RUN: %checkedc_rununder %t1 pass4 | FileCheck %s --check-prefixes=CHECK,CHECK-PASS,PASS-4-READ
// RUN: %checkedc_rununder %t1 pass5 | FileCheck %s --check-prefixes=CHECK,CHECK-PASS,PASS-5-READ
// RUN: %checkedc_rununder %t1 fail1 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,FAIL-1
// RUN: %checkedc_rununder %t1 fail2 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,FAIL-2
// RUN: %checkedc_rununder %t1 fail3 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,FAIL-3
// RUN: %checkedc_rununder %t1 fail4 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,FAIL-4
// RUN: %checkedc_rununder %t1 fail5 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,FAIL-5
// RUN: %checkedc_rununder %t1 fail1 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-1
// RUN: %checkedc_rununder %t1 fail2 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-2
// RUN: %checkedc_rununder %t1 fail3 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-3
// RUN: %checkedc_rununder %t1 fail4 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-4
// RUN: %checkedc_rununder %t1 fail5 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-5
//
// RUN: %clang %s -o %t2 -DTEST_WRITE -Werror %checkedc_target_flags
// RUN: %checkedc_rununder %t2 pass1 | FileCheck %s --check-prefixes=CHECK,CHECK-PASS,PASS-1-WRITE
@ -37,11 +37,11 @@
// RUN: %checkedc_rununder %t2 pass3 | FileCheck %s --check-prefixes=CHECK,CHECK-PASS,PASS-3-WRITE
// RUN: %checkedc_rununder %t2 pass4 | FileCheck %s --check-prefixes=CHECK,CHECK-PASS,PASS-4-WRITE
// RUN: %checkedc_rununder %t2 pass5 | FileCheck %s --check-prefixes=CHECK,CHECK-PASS,PASS-5-WRITE
// RUN: %checkedc_rununder %t2 fail1 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,FAIL-1
// RUN: %checkedc_rununder %t2 fail2 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,FAIL-2
// RUN: %checkedc_rununder %t2 fail3 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,FAIL-3
// RUN: %checkedc_rununder %t2 fail4 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,FAIL-4
// RUN: %checkedc_rununder %t2 fail5 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,FAIL-5
// RUN: %checkedc_rununder %t2 fail1 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-1
// RUN: %checkedc_rununder %t2 fail2 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-2
// RUN: %checkedc_rununder %t2 fail3 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-3
// RUN: %checkedc_rununder %t2 fail4 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-4
// RUN: %checkedc_rununder %t2 fail5 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-5
// RUN: %clang %s -o %t3 -DTEST_INCREMENT -Werror %checkedc_target_flags
// RUN: %checkedc_rununder %t3 pass1 | FileCheck %s --check-prefixes=CHECK,CHECK-PASS,PASS-1-INCREMENT
@ -49,11 +49,11 @@
// RUN: %checkedc_rununder %t3 pass3 | FileCheck %s --check-prefixes=CHECK,CHECK-PASS,PASS-3-INCREMENT
// RUN: %checkedc_rununder %t3 pass4 | FileCheck %s --check-prefixes=CHECK,CHECK-PASS,PASS-4-INCREMENT
// RUN: %checkedc_rununder %t3 pass5 | FileCheck %s --check-prefixes=CHECK,CHECK-PASS,PASS-5-INCREMENT
// RUN: %checkedc_rununder %t3 fail1 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,FAIL-1
// RUN: %checkedc_rununder %t3 fail2 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,FAIL-2
// RUN: %checkedc_rununder %t3 fail3 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,FAIL-3
// RUN: %checkedc_rununder %t3 fail4 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,FAIL-4
// RUN: %checkedc_rununder %t3 fail5 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,FAIL-5
// RUN: %checkedc_rununder %t3 fail1 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-1
// RUN: %checkedc_rununder %t3 fail2 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-2
// RUN: %checkedc_rununder %t3 fail3 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-3
// RUN: %checkedc_rununder %t3 fail4 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-4
// RUN: %checkedc_rununder %t3 fail5 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-5
// RUN: %clang %s -o %t4 -DTEST_COMPOUND_ASSIGN -Werror %checkedc_target_flags
// RUN: %checkedc_rununder %t4 pass1 | FileCheck %s --check-prefixes=CHECK,CHECK-PASS,PASS-1-COMPOUND-ASSIGN
@ -61,11 +61,11 @@
// RUN: %checkedc_rununder %t4 pass3 | FileCheck %s --check-prefixes=CHECK,CHECK-PASS,PASS-3-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 pass4 | FileCheck %s --check-prefixes=CHECK,CHECK-PASS,PASS-4-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 pass5 | FileCheck %s --check-prefixes=CHECK,CHECK-PASS,PASS-5-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 fail1 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,FAIL-1
// RUN: %checkedc_rununder %t4 fail2 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,FAIL-2
// RUN: %checkedc_rununder %t4 fail3 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,FAIL-3
// RUN: %checkedc_rununder %t4 fail4 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,FAIL-4
// RUN: %checkedc_rununder %t4 fail5 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,FAIL-5
// RUN: %checkedc_rununder %t4 fail1 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-1
// RUN: %checkedc_rununder %t4 fail2 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-2
// RUN: %checkedc_rununder %t4 fail3 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-3
// RUN: %checkedc_rununder %t4 fail4 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-4
// RUN: %checkedc_rununder %t4 fail5 | FileCheck %s --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-5
#include <assert.h>
#include <signal.h>
#include <stdio.h>

Просмотреть файл

@ -20,11 +20,11 @@
// RUN: %checkedc_rununder %t1 pass3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-3-READ
// RUN: %checkedc_rununder %t1 pass4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-4-READ
// RUN: %checkedc_rununder %t1 pass5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-5-READ
// RUN: %checkedc_rununder %t1 fail1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,FAIL-1
// RUN: %checkedc_rununder %t1 fail2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,FAIL-2
// RUN: %checkedc_rununder %t1 fail3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,FAIL-3
// RUN: %checkedc_rununder %t1 fail4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,FAIL-4
// RUN: %checkedc_rununder %t1 fail5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,FAIL-5
// RUN: %checkedc_rununder %t1 fail1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-1
// RUN: %checkedc_rununder %t1 fail2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-2
// RUN: %checkedc_rununder %t1 fail3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-3
// RUN: %checkedc_rununder %t1 fail4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-4
// RUN: %checkedc_rununder %t1 fail5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-5
//
// RUN: %clang %S/deref_dot_member_expr.c -o %t2 -DTEST_WRITE -Werror -O3 %checkedc_target_flags
// RUN: %checkedc_rununder %t2 pass1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-1-WRITE
@ -32,11 +32,11 @@
// RUN: %checkedc_rununder %t2 pass3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-3-WRITE
// RUN: %checkedc_rununder %t2 pass4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-4-WRITE
// RUN: %checkedc_rununder %t2 pass5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-5-WRITE
// RUN: %checkedc_rununder %t2 fail1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,FAIL-1
// RUN: %checkedc_rununder %t2 fail2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,FAIL-2
// RUN: %checkedc_rununder %t2 fail3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,FAIL-3
// RUN: %checkedc_rununder %t2 fail4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,FAIL-4
// RUN: %checkedc_rununder %t2 fail5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,FAIL-5
// RUN: %checkedc_rununder %t2 fail1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-1
// RUN: %checkedc_rununder %t2 fail2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-2
// RUN: %checkedc_rununder %t2 fail3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-3
// RUN: %checkedc_rununder %t2 fail4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-4
// RUN: %checkedc_rununder %t2 fail5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-5
// RUN: %clang %S/deref_dot_member_expr.c -o %t3 -DTEST_INCREMENT -Werror -O3 %checkedc_target_flags
// RUN: %checkedc_rununder %t3 pass1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-1-INCREMENT
@ -44,11 +44,11 @@
// RUN: %checkedc_rununder %t3 pass3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-3-INCREMENT
// RUN: %checkedc_rununder %t3 pass4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-4-INCREMENT
// RUN: %checkedc_rununder %t3 pass5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-5-INCREMENT
// RUN: %checkedc_rununder %t3 fail1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,FAIL-1
// RUN: %checkedc_rununder %t3 fail2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,FAIL-2
// RUN: %checkedc_rununder %t3 fail3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,FAIL-3
// RUN: %checkedc_rununder %t3 fail4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,FAIL-4
// RUN: %checkedc_rununder %t3 fail5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,FAIL-5
// RUN: %checkedc_rununder %t3 fail1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-1
// RUN: %checkedc_rununder %t3 fail2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-2
// RUN: %checkedc_rununder %t3 fail3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-3
// RUN: %checkedc_rununder %t3 fail4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-4
// RUN: %checkedc_rununder %t3 fail5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-5
// RUN: %clang %S/deref_dot_member_expr.c -o %t4 -DTEST_COMPOUND_ASSIGN -Werror -O3 %checkedc_target_flags
// RUN: %checkedc_rununder %t4 pass1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-1-COMPOUND-ASSIGN
@ -56,11 +56,11 @@
// RUN: %checkedc_rununder %t4 pass3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-3-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 pass4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-4-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 pass5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-PASS,PASS-5-COMPOUND-ASSIGN
// RUN: %checkedc_rununder %t4 fail1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,FAIL-1
// RUN: %checkedc_rununder %t4 fail2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,FAIL-2
// RUN: %checkedc_rununder %t4 fail3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,FAIL-3
// RUN: %checkedc_rununder %t4 fail4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,FAIL-4
// RUN: %checkedc_rununder %t4 fail5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,FAIL-5
// RUN: %checkedc_rununder %t4 fail1 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-1
// RUN: %checkedc_rununder %t4 fail2 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-2
// RUN: %checkedc_rununder %t4 fail3 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-3
// RUN: %checkedc_rununder %t4 fail4 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-4
// RUN: %checkedc_rununder %t4 fail5 | FileCheck %S/deref_dot_member_expr.c --check-prefixes=CHECK,CHECK-FAIL,CHECK-FAIL-5
#include <stdlib.h>

Просмотреть файл

@ -32,7 +32,7 @@
// RUN: %checkedc_rununder %t1 constant_bounds read 4 | FileCheck %s --check-prefixes=CB-READ-START,CB-READ-SUCCESS
// RUN: %checkedc_rununder %t1 constant_bounds read 0 | FileCheck %s --check-prefixes=CB-READ-START,CB-READ-SUCCESS
// Make sure we aren't accidentally running the bounds-safe interface verison of this test.
// RUN: %checkedc_rununder %t1 constant_bounds read 0 | FileCheck %s --check-prefixes=CB-READ-START,CB-READ-SUCCESS,CHECK-BSI-NOT
// RUN: %checkedc_rununder %t1 constant_bounds read 0 | FileCheck %s --check-prefixes=CB-READ-START,CB-READ-SUCCESS,CHECK-ARRAYS
//
// RUN: %checkedc_rununder %t1 constant_bounds write 5| FileCheck %s --check-prefixes=CB-WRITE-START,CB-WRITE-FAIL
// RUN: %checkedc_rununder %t1 constant_bounds write -1 | FileCheck %s --check-prefixes=CB-WRITE-START,CB-WRITE-FAIL
@ -485,7 +485,7 @@ void test_dependent_bounds(int argc, array_ptr<nt_array_ptr<char>> argv : count(
}
case INC: {
puts("Starting dependent bounds increment");
// BB-INC-START: Starting dependent bounds increment
// DB-INC-START: Starting dependent bounds increment
int i = atoi(argv[idx]);
idx++; // TODO: fold back into prior line
int j = atoi(argv[idx]);
@ -621,7 +621,7 @@ void test_nt_dependent_bounds(int argc, array_ptr<nt_array_ptr<char>> argv : cou
}
case INC: {
puts("Starting nt dependent bounds increment");
// BB-INC-START: Starting nt dependent bounds increment
// NT-DB-INC-START: Starting nt dependent bounds increment
int i = atoi(argv[idx]);
idx++; // TODO: fold back into prior line
int j = atoi(argv[idx]);
@ -789,7 +789,13 @@ int main(int argc, array_ptr<nt_array_ptr<char>> argv : count(argc)) {
// tests precede the check below.
puts("Testing interfaces");
// CHECK-BSI: Testing interfaces
// CHECK-ARRAYS-NOT: Testing interfaces
#else
puts("Testing regular arrays");
// CHECK-BSI-NOT: Testing regular arrays
// CHECK-ARRAYS: Testing regular arrays
#endif
return EXIT_SUCCESS;
}

Просмотреть файл

@ -219,7 +219,7 @@ struct S23 {
struct S24 {
int len;
array_ptr<int> arr : boounds(arr, arr + 5); // expected-error 2 {{use of undeclared identifier 'arr'}} \
// expected-warning {{implicit declaration of function 'boounds'}}
// expected-error {{call to undeclared function 'boounds'}}
};
// Misspell count to cause an semantic checking error.
@ -228,7 +228,7 @@ struct S24 {
struct S25 {
int len;
int* _Array arr : coount(5); // expected-error {{expected bounds expression}} \
// expected-warning {{implicit declaration of function 'coount'}}
// expected-error {{call to undeclared function 'coount'}}
};
// Omit an argument to bounds to cause a parsing error

Просмотреть файл

@ -29,7 +29,7 @@ extern void f4() {
array_ptr<int> a : count(2) = 0;
array_ptr<char> b : count(2) = 0;
a = _Asume_bounds_cast<array_ptr<int>>(b, count(2)); // expected-error{{use of undeclared identifier}} expected-warning {{implicit declaration of function 'count' is invalid in C99}}
a = _Asume_bounds_cast<array_ptr<int>>(b, count(2)); // expected-error{{use of undeclared identifier}} expected-error {{call to undeclared function 'count'}}
a = _Dssume_bounds_cast<int>(b); // expected-error{{use of undeclared identifier}}
}

Просмотреть файл

@ -1089,7 +1089,7 @@ void function_pointers(void) {
int* _Nt_array(*t13a)(void) _Bounds(s1, s1 + 5) = fn10a;
int *(*t14)(void) = fn12;
int *(*t15)(void) : bounds(s1, s1 + 5) = fn12;
int *(*t16)(void) : bounds(s1, s1 + 6) = fn12; // expected-warning {{incompatible function pointer types}}
int *(*t16)(void) : bounds(s1, s1 + 6) = fn12; // expected-error {{incompatible function pointer types}}
ptr<int *(void) : bounds(s1, s1 + 6)> t17 = fn12; // expected-error {{incompatible type}}
// Unchecked pointer to function assigned to checked pointer to
@ -1108,8 +1108,8 @@ void function_pointers(void) {
fn204(fn104);
// These are mismatched unchecked function pointers with bounds-safe interfaces
// on parameters.
fn204(fn104a); // expected-warning {{incompatible function pointer types}}
fn204(fn104b); // expected-warning {{incompatible function pointer types}}
fn204(fn104a); // expected-error {{incompatible function pointer types}}
fn204(fn104b); // expected-error {{incompatible function pointer types}}
fn205(fn105);
fn206(fn106);
fn207(fn107);

Просмотреть файл

@ -439,7 +439,7 @@ int test_struct2(struct S1 *p : itype(ptr<struct S1>)) {
int t6 = *(p->f6 + 4);
int t7 = *(p->arr + 4);
(*(p->fp1))(p->f1);
(*(p->fp1))(0x5000); // expected-warning {{incompatible integer to pointer conversion passing 'int' to parameter of type 'int *'}}
(*(p->fp1))(0x5000); // expected-error {{incompatible integer to pointer conversion passing 'int' to parameter of type 'int *'}}
return 0;
}
@ -651,7 +651,7 @@ void test_bounds_safe_interface(void) {
return_fn rfn = signal(0, handler);
typedef void (*wrong_fn)(int, int);
wrong_fn wrong = signal(0, handler); // expected-warning {{incompatible function pointer types}}
wrong_fn wrong = signal(0, handler); // expected-error {{incompatible function pointer types}}
}
typedef ptr<void (int)> checked_return_fn;

Просмотреть файл

@ -163,10 +163,10 @@ void TestAlphaEquivalence() {
// Test that parsing malformed existential types fails without
// a compiler crash.
void TestParseMalformedExistential() {
_Exists(int, T) e1; // expected-error {{expected type variable identifier}} expected-warning {{type specifier missing, defaults to 'int'}}
_Exists(int T) e2; // expected-error {{expected type variable identifier}} expected-warning {{type specifier missing, defaults to 'int'}}
_Exists(T int) e3; // expected-error {{expected ','}} expected-warning {{type specifier missing, defaults to 'int'}}
_Exists(T, int e4; // expected-error {{expected ')'}} expected-warning {{type specifier missing, defaults to 'int'}}
_Exists(int, T) e1; // expected-error {{expected type variable identifier}} expected-error {{type specifier missing, defaults to 'int'}}
_Exists(int T) e2; // expected-error {{expected type variable identifier}} expected-error {{type specifier missing, defaults to 'int'}}
_Exists(T int) e3; // expected-error {{expected ','}} expected-error {{type specifier missing, defaults to 'int'}}
_Exists(T, int e4; // expected-error {{expected ')'}} expected-error {{type specifier missing, defaults to 'int'}}
_Exists(T, T*)) e5; // expected-error {{expected identifier or '('}}
}

Просмотреть файл

@ -34,7 +34,7 @@ void CallGenericFunction(void) {
_For_any(T) T *func1(); // expected-error {{expected prototype for a generic function}}
// Declaration of old-style K&R function definition.
_For_any(T) void func2(x, y) // expected-error {{expected prototype for a generic function}}
_For_any(T) void func2(x, y) // expected-error {{expected prototype for a generic function}} expected-warning {{a function definition without a prototype is deprecated}}
T *x;
T *y;
{

Просмотреть файл

@ -47,7 +47,7 @@ void TestTypeApplicationSimple() {
};
struct Foo<int> li;
int *ele = li.x;
char ele2 = li.x; // expected-warning {{incompatible pointer to integer conversion initializing 'char' with an expression of type 'int *'}}
char ele2 = li.x; // expected-error {{incompatible pointer to integer conversion initializing 'char' with an expression of type 'int *'}}
}
//

Просмотреть файл

@ -953,7 +953,7 @@ float **g251 : itype(ptr<ptr<int>>); // expected-error {{mismatch between inter
float g252[10] : itype(double checked[10]); // expected-error {{mismatch between interface type}}
// Array types
int g253[10][10] : itype(int checked[10][11]); // expected-error {{mismatch between interface type 'int _Checked[10][11]' and declared type 'int [10][10]'}}
int g253[10][10] : itype(int checked[10][11]); // expected-error {{mismatch between interface type 'int _Checked[10][11]' and declared type 'int[10][10]'}}
int (*g254)[10] : itype(ptr<int checked[]>); // expected-error {{mismatch between interface type}}
int(*g255)[] : itype(ptr<int checked[10]>); // expected-error {{mismatch between interface type}}
@ -1223,7 +1223,7 @@ struct S9 {
float g252[10] : itype(double checked[10]); // expected-error {{mismatch between interface type}}
// Array types
int g253[10][10] : itype(int checked[10][11]); // expected-error {{mismatch between interface type 'int _Checked[10][11]' and declared type 'int [10][10]'}}
int g253[10][10] : itype(int checked[10][11]); // expected-error {{mismatch between interface type 'int _Checked[10][11]' and declared type 'int[10][10]'}}
int (*g254)[10] : itype(ptr<int checked[]>); // expected-error {{mismatch between interface type}}
int(*g255)[] : itype(ptr<int checked[10]>); // expected-error {{mismatch between interface type}}
@ -1392,7 +1392,7 @@ union U9 {
float g252[10] : itype(double checked[10]); // expected-error {{mismatch between interface type}}
// Array types
int g253[10][10] : itype(int checked[10][11]); // expected-error {{mismatch between interface type 'int _Checked[10][11]' and declared type 'int [10][10]'}}
int g253[10][10] : itype(int checked[10][11]); // expected-error {{mismatch between interface type 'int _Checked[10][11]' and declared type 'int[10][10]'}}
int(*g254)[10] : itype(ptr<int checked[]>); // expected-error {{mismatch between interface type}}
int(*g255)[] : itype(ptr<int checked[10]>); // expected-error {{mismatch between interface type}}

Просмотреть файл

@ -3,6 +3,7 @@
// The following lines are for the LLVM test harness:
//
// RUN: %clang_cc1 -verify -verify-ignore-unexpected=note %s
// UNSUPPORTED: !linux
#include <stdchecked.h>

Просмотреть файл

@ -1646,7 +1646,7 @@ int *check_return2(float *p) {
}
int *check_return3(void) {
return 5; // expected-warning {{incompatible integer to pointer conversion}}
return 5; // expected-error {{incompatible integer to pointer conversion}}
}
int *check_return4(ptr<int> p) {
@ -1806,7 +1806,7 @@ void *check_voidptr_return2(float *p) {
}
void *check_voidptr_return3(void) {
return 5; // expected-warning {{incompatible integer to pointer conversion}}
return 5; // expected-error {{incompatible integer to pointer conversion}}
}
void *check_voidptr_return4(ptr<int> p) {