brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.2 KiB · 2450bb4 Raw
69 lines · c
1// Tests without serialization:2// RUN: %clang_cc1 -ast-dump -triple i386-pc-linux-gnu %s \3// RUN: | FileCheck %s --strict-whitespace --check-prefixes=CHECK,CHECK14//5// RUN: %clang_cc1 -ast-dump -triple aarch64-unknown-linux-gnu %s \6// RUN: | FileCheck %s --strict-whitespace --check-prefixes=CHECK,CHECK17//8// RUN: %clang_cc1 -ast-dump -triple i386-pc-linux-gnu -DFAST -mreassociate %s \9// RUN: | FileCheck %s --strict-whitespace --check-prefixes=CHECK,CHECK110//11// RUN: %clang_cc1 -ast-dump -triple aarch64-unknown-linux-gnu -DFAST -mreassociate %s \12// RUN: | FileCheck %s --strict-whitespace --check-prefixes=CHECK,CHECK113//14// RUN: %clang_cc1 -ast-dump -triple i386-pc-linux-gnu -DFAST -mreassociate %s \15// RUN: -fprotect-parens \16// RUN: | FileCheck %s --strict-whitespace --check-prefixes=CHECK,CHECK217//18// RUN: %clang_cc1 -ast-dump -triple aarch64-unknown-linux-gnu -DFAST -mreassociate %s \19// RUN: -fprotect-parens \20// RUN: | FileCheck %s --strict-whitespace --check-prefixes=CHECK,CHECK221//22// Tests with serialization:23// RUN: %clang_cc1 -triple i386-pc-linux-gnu -emit-pch -o %t %s24// RUN: %clang_cc1 -triple i386-pc-linux-gnu -include-pch %t -ast-dump-all /dev/null \25// RUN: | FileCheck %s --strict-whitespace26//27// RUN: %clang_cc1 -triple aarch64-unknown-linux-gnu -emit-pch -o %t %s28// RUN: %clang_cc1 -triple aarch64-unknown-linux-gnu -include-pch %t -ast-dump-all /dev/null \29// RUN: | FileCheck %s --strict-whitespace30//31// RUN: %clang_cc1 -triple i386-pc-linux-gnu -DFAST -mreassociate %s \32// RUN: -emit-pch -o %t33// RUN: %clang_cc1 -triple i386-pc-linux-gnu -include-pch %t -ast-dump-all /dev/null \34// RUN: | FileCheck %s --strict-whitespace --check-prefixes=CHECK,CHECK135//36// RUN: %clang_cc1 -triple aarch64-unknown-linux-gnu -DFAST -mreassociate %s \37// RUN: -emit-pch -o %t38// RUN: %clang_cc1 -triple aarch64-unknown-linux-gnu -include-pch %t -ast-dump-all /dev/null \39// RUN: | FileCheck %s --strict-whitespace --check-prefixes=CHECK,CHECK140//41// RUN: %clang_cc1 -triple i386-pc-linux-gnu -DFAST -mreassociate %s \42// RUN:   -fprotect-parens -emit-pch -o %t43// RUN: %clang_cc1 -triple i386-pc-linux-gnu -include-pch %t -ast-dump-all /dev/null -fprotect-parens\44// RUN: | FileCheck %s --strict-whitespace --check-prefixes=CHECK,CHECK245//46// RUN: %clang_cc1 -triple aarch64-unknown-linux-gnu -DFAST -mreassociate %s \47// RUN:   -fprotect-parens -emit-pch -o %t48// RUN: %clang_cc1 -triple aarch64-unknown-linux-gnu -include-pch %t -ast-dump-all /dev/null -fprotect-parens\49// RUN: | FileCheck %s --strict-whitespace --check-prefixes=CHECK,CHECK250 51int v;52int addit(float a, float b) {53 54  v = __arithmetic_fence(a + b);55 56  v = (a + b);57 58  return 0;59}60//CHECK:| `-CompoundStmt {{.*}}61//CHECK-NEXT:|   |-BinaryOperator {{.*}} 'int' '='62//CHECK-NEXT:|   | |-DeclRefExpr {{.*}} 'int' lvalue Var {{.*}} 'v' 'int'63//CHECK-NEXT:|   | `-ImplicitCastExpr {{.*}}64//CHECK-NEXT:|   |   `-CallExpr {{.*}} 'float'65//CHECK-NEXT:|   |     |-ImplicitCastExpr {{.*}}66//CHECK-NEXT:|   |     | `-DeclRefExpr {{.*}}' Function {{.*}} '__arithmetic_fence'{{.*}}67//CHECK1-NOT:|   |     | `-DeclRefExpr {{.*}}' Function{{.*}} '__arithmetic_fence' 'void ()'68//CHECK2:|   |     | `-DeclRefExpr {{.*}} Function{{.*}} '__arithmetic_fence' 'void ()'69