[cfe-dev] Custom C++ extension

rzaghi at mosaic3dx.com rzaghi at mosaic3dx.com
Sat Jun 13 18:53:01 PDT 2015

Hey everyone on cfe-dev

New list member but an old admirer of your great work here.

I am planning the implementation of a set of C++ language extensions which we hope to be used in a [non-compiler related] research project at the University of Cambridge next year.

Naturally, I chose Clang to do this. However, I have an "engineering" question.

The extensions are, as you would imagine, not part of the standard - and I had like to add the word "yet", hehe.

Given the potential invasiveness of some of the features and the pace of changes to the code base, I am left with no answer as to how I can keep up with the pace of the change and whether such requirements have been taken into account in the internal design of the front end, by any chances?

Basically, I do not want to be in a position where we have working version of the extensions next year but based on a version of the front end which is one year old.

It may help to give you a flavour of what some of these changes may look like.

As an example, the extension would allow us to "tag" some identifiers in the code as follows:

class CLXYZ {
  int <tag1> x;

The identifier tagged as such is later picked at one of the phases and operated on.

So what is the best practice here? Other than rebasing every so often?

Appreciate your input and advice.
- Ramin

(ps, not so related to my question but we call this "tagged-programming" paradigm. Actually we hope that the combination of these extensions can eventually help programmers in scenarios as the very question I am asking above!).

More information about the cfe-dev mailing list