[cfe-dev] [XRay] RFC: Adding -fxray-{always, never}-instrument=... to Clang
Dean Michael Berris via cfe-dev
cfe-dev at lists.llvm.org
Thu Mar 2 04:55:43 PST 2017
> On 2 Mar 2017, at 09:40, Anna Zaks <zaks.anna at gmail.com> wrote:
>
>
>
> On Wed, Mar 1, 2017 at 2:25 PM, Reid Kleckner <rnk at google.com> wrote:
> This sounds totally reasonable.
>
> I have vague memories that there was some demand for a generic way to slap attributes on decls without changing the source code, but I don't remember who wanted that. I thought it had something to do with static analysis, so maybe Jordan or Anna know?
>
> Correct. We have implemented such system for clang. We call it API Notes. It currently lives in the out-of-tree clang used by the Swift compiler (http://github.com/apple/swift-clang). It is not complete, for example, it lacks C++ support, but we've been using it in production for several years now.
>
> Doug has sent out an email about this and other out-of-tree changes trying to figure out if the community has interest in these additions. Here is the thread, it mainly discusses API Notes:
>
> http://lists.llvm.org/pipermail/cfe-dev/2015-December/046335.html
Thanks for the pointer Anna -- I'll go have a read about this.
Maybe later on we can generalise based on experience from swift to inform the design/use-cases if this will ever be done in clang.
Cheers
-- Dean
More information about the cfe-dev
mailing list