implementing language extensions in clang

I am adding extensions to clang for annotating c++ and doing some static analysis and checking.
Need at least one new type, annotations (after) declarations and methods to start.
Are there some guidelines and/or can someone give some advice?
The plan is currently:
  1. Mod clang to digest the syntax and ignore the extensions.
  2. Add static analysis and type checking w.r.t. the new constructs and attributes.

Hi David,

The best way to get started is to look for similar examples and see how they work. Your plan seems pretty reasonable to me!


<sending to cfe-dev>

Vector extensions are reasonable?

I finally stumbled on the .def files and have some region classes prototyped,
now looking for the actual tokenization of "region" in the input.

Sure, depending on what you want to add. See also the various static analyzer attributes.

Is there a particular development environment/tools that the insiders are using?
I'm using gdb/emacs/make which is flies reasonably straight but throws me on the
ground occasionally... :slight_smile:

I use xcode to edit, plus gdb/make.