CTSRD-CHERI/llvm-project

Misleading error message with __attribute__((cheri_no_provenance)) on pointer type

Opened this issue · 0 comments

With:

int * p __attribute((cheri_no_provenance));

on purecap, CHERI LLVM diagnoses it with error: 'cheri_no_provenance' attribute only applies to capability types: but int * is a capability type on purecap. From what I can gather in the CHERI C/C++ programming guide, the attribute is intended only for use on __(u)intcap_t types. If so, perhaps it should mention the type not being a __(u)intcap_t in the diagnostic.

Complier Explorer link: https://cheri-compiler-explorer.cl.cam.ac.uk/z/9KMWo5