• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN:     %clang_cc1 -triple thumbv8m.base-eabi -fsyntax-only        %s 2>&1 | FileCheck --check-prefix=CHECK-c %s
2 // RUN: not %clang_cc1 -triple thumbv8m.base-eabi -fsyntax-only -x c++ %s 2>&1 | FileCheck --check-prefix=CHECK-cpp %s
3 
4 #include <arm_cmse.h>
5 
6 typedef void (*callback_t)(void);
7 
func(callback_t fptr,void * p)8 void func(callback_t fptr, void *p)
9 {
10   cmse_TT(p);
11   cmse_TTT(p);
12   cmse_TT_fptr(fptr);
13   cmse_TTT_fptr(fptr);
14 
15   cmse_TTA(p);
16   cmse_TTAT(p);
17   cmse_TTA_fptr(fptr);
18   cmse_TTAT_fptr(fptr);
19 // CHECK-c: warning: implicit declaration of function 'cmse_TTA'
20 // CHECK-c: warning: implicit declaration of function 'cmse_TTAT'
21 // CHECK-c: warning: implicit declaration of function 'cmse_TTA_fptr'
22 // CHECK-c: warning: implicit declaration of function 'cmse_TTAT_fptr'
23 // CHECK-cpp: error: use of undeclared identifier 'cmse_TTA'
24 // CHECK-cpp: error: use of undeclared identifier 'cmse_TTAT'
25 // CHECK-cpp: error: use of undeclared identifier 'cmse_TTA_fptr'
26 // CHECK-cpp: error: use of undeclared identifier 'cmse_TTAT_fptr'
27 }
28