Mercurial > hg > CbC > CbC_llvm
comparison clang/test/AST/alignas_maybe_odr_cleanup.cpp @ 207:2e18cbf3894f
LLVM12
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Jun 2021 06:07:14 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
173:0572611fdcc8 | 207:2e18cbf3894f |
---|---|
1 // Test without serialization: | |
2 // RUN: %clang_cc1 -fsyntax-only %s -ast-dump | FileCheck %s | |
3 // | |
4 // Test with serialization: | |
5 // RUN: %clang_cc1 -emit-pch -o %t %s | |
6 // RUN: %clang_cc1 -x c++ -include-pch %t -ast-dump-all /dev/null \ | |
7 // RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \ | |
8 // RUN: | FileCheck %s | |
9 | |
10 struct FOO { | |
11 static const int vec_align_bytes = 16; | |
12 void foo() { | |
13 double a alignas(vec_align_bytes); | |
14 ; | |
15 } | |
16 }; | |
17 | |
18 // CHECK: | `-AlignedAttr {{.*}} <col:14> alignas | |
19 // CHECK-NEXT: | `-ConstantExpr {{.*}} <col:22> 'int' | |
20 // CHECK-NEXT: | |-value: Int 16 | |
21 // CHECK-NEXT: | `-ImplicitCastExpr {{.*}} <col:22> 'int' <LValueToRValue> | |
22 // CHECK-NEXT: | `-DeclRefExpr {{.*}} <col:22> 'const int' lvalue Var {{.*}} 'vec_align_bytes' 'const int' non_odr_use_constant | |
23 // CHECK-NEXT: `-NullStmt {{.*}} <line:14:5> |