brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.5 KiB · cff0fa7 Raw
94 lines · cpp
1int a [[gnu::used]];2// RUN: %clang_cc1 -code-completion-at=%s:%(line-1):9 %s | FileCheck --check-prefix=STD %s3// STD:     COMPLETION: Pattern : __carries_dependency__4// STD-NOT: COMPLETION: Pattern : __convergent__5// STD:     COMPLETION: Pattern : __gnu__::__used__6// STD-NOT: COMPLETION: Pattern : __gnu__::used7// STD-NOT: COMPLETION: Pattern : __used__8// STD:     COMPLETION: Pattern : _Clang::__convergent__9// STD:     COMPLETION: Pattern : carries_dependency10// STD-NOT: COMPLETION: Pattern : clang::called_once11// STD:     COMPLETION: Pattern : clang::convergent12// STD-NOT: COMPLETION: Pattern : convergent13// STD-NOT: COMPLETION: Pattern : gnu::__used__14// STD:     COMPLETION: Pattern : gnu::abi_tag(<#Tags...#>)15// STD:     COMPLETION: Pattern : gnu::alias(<#Aliasee#>)16// STD:     COMPLETION: Pattern : gnu::used17// STD-NOT: COMPLETION: Pattern : used18// RUN: %clang_cc1 -code-completion-at=%s:%(line-17):9 -xobjective-c++ %s | FileCheck --check-prefix=STD-OBJC %s19// STD-OBJC: COMPLETION: Pattern : clang::called_once20// RUN: %clang_cc1 -code-completion-at=%s:%(line-19):14 %s | FileCheck --check-prefix=STD-NS %s21// STD-NS-NOT: COMPLETION: Pattern : __used__22// STD-NS-NOT: COMPLETION: Pattern : carries_dependency23// STD-NS-NOT: COMPLETION: Pattern : clang::convergent24// STD-NS-NOT: COMPLETION: Pattern : convergent25// STD-NS-NOT: COMPLETION: Pattern : gnu::used26// STD-NS:     COMPLETION: Pattern : used27int b [[__gnu__::used]];28// RUN: %clang_cc1 -code-completion-at=%s:%(line-1):18 %s | FileCheck --check-prefix=STD-NSU %s29// STD-NSU:     COMPLETION: Pattern : __used__30// STD-NSU-NOT: COMPLETION: Pattern : used31 32int c [[using gnu: used]];33// RUN: %clang_cc1 -code-completion-at=%s:%(line-1):15 %s | FileCheck --check-prefix=STD-USING %s34// STD-USING:     COMPLETION: __gnu__35// STD-USING:     COMPLETION: _Clang36// STD-USING-NOT: COMPLETION: Pattern : carries_dependency37// STD-USING:     COMPLETION: clang38// STD-USING-NOT: COMPLETION: Pattern : clang::39// STD-USING-NOT: COMPLETION: Pattern : gnu::40// STD-USING:     COMPLETION: gnu41// RUN: %clang_cc1 -code-completion-at=%s:%(line-9):20 %s | FileCheck --check-prefix=STD-NS %s42 43int d __attribute__((used));44// RUN: %clang_cc1 -code-completion-at=%s:%(line-1):22 %s | FileCheck --check-prefix=GNU %s45// GNU:     COMPLETION: Pattern : __carries_dependency__46// GNU:     COMPLETION: Pattern : __convergent__47// GNU-NOT: COMPLETION: Pattern : __gnu__::__used__48// GNU:     COMPLETION: Pattern : __used__49// GNU-NOT: COMPLETION: Pattern : _Clang::__convergent__50// GNU:     COMPLETION: Pattern : carries_dependency51// GNU-NOT: COMPLETION: Pattern : clang::convergent52// GNU:     COMPLETION: Pattern : convergent53// GNU-NOT: COMPLETION: Pattern : gnu::used54// GNU:     COMPLETION: Pattern : used55 56#pragma clang attribute push (__attribute__((internal_linkage)), apply_to=variable)57int e;58#pragma clang attribute pop59// RUN: %clang_cc1 -code-completion-at=%s:%(line-3):46 %s | FileCheck --check-prefix=PRAGMA %s60// PRAGMA: COMPLETION: Pattern : internal_linkage61 62#ifdef MS_EXT63int __declspec(thread) f;64// RUN: %clang_cc1 -fms-extensions -DMS_EXT -code-completion-at=%s:%(line-1):16 %s | FileCheck --check-prefix=DS %s65// DS-NOT: COMPLETION: Pattern : __convergent__66// DS-NOT: COMPLETION: Pattern : __used__67// DS-NOT: COMPLETION: Pattern : clang::convergent68// DS-NOT: COMPLETION: Pattern : convergent69// DS:     COMPLETION: Pattern : thread70// DS-NOT: COMPLETION: Pattern : used71// DS:     COMPLETION: Pattern : uuid72 73[uuid("123e4567-e89b-12d3-a456-426614174000")] struct g;74// RUN: %clang_cc1 -fms-extensions -DMS_EXT -code-completion-at=%s:%(line-1):2 %s | FileCheck --check-prefix=MS %s75// MS-NOT: COMPLETION: Pattern : __uuid__76// MS-NOT: COMPLETION: Pattern : clang::convergent77// MS-NOT: COMPLETION: Pattern : convergent78// MS-NOT: COMPLETION: Pattern : thread79// MS-NOT: COMPLETION: Pattern : used80// MS:     COMPLETION: Pattern : uuid81#endif // MS_EXT82 83void foo() {84  [[omp::sequence(directive(parallel), directive(critical))]]85  {}86}87// FIXME: support for omp attributes would be nice.88// RUN: %clang_cc1 -fopenmp -code-completion-at=%s:%(line-4):5 %s | FileCheck --check-prefix=OMP-NS --allow-empty %s89// OMP-NS-NOT: COMPLETION: omp90// RUN: %clang_cc1 -fopenmp -code-completion-at=%s:%(line-6):10 %s | FileCheck --check-prefix=OMP-ATTR --allow-empty %s91// OMP-ATTR-NOT: COMPLETION: Pattern : sequence92// RUN: %clang_cc1 -fopenmp -code-completion-at=%s:%(line-8):19 %s | FileCheck --check-prefix=OMP-NESTED --allow-empty %s93// OMP-NESTED-NOT: COMPLETION: Pattern : directive94