Hi Olaf,
Here is my further update.
1. As I already mentioned in my previous reply, extra redundant
Handler classes are removed, and we can do magic with just one Handler
class.
2. Later, after shooting my reply to your mail, I started to think
that I can even get rid of extra annotated omp tokens, as you
inidicated. I can achieve similar functionality by keeping *only one*
generic omp token, and *without* lexing the omp directive *name* in
the Handler, instead allowing it to take care by Parser.
3. Regarding your suggestion of *not* disturbing Global Parser and
Sema, I really doubt, if I can avoid it. I agree that, Global Parser
and Sema should not be disturbed to handle the stuffs which is suppose
to be handled by Preprocessor. But, as you already guessed, re-design
for Clang is required to achieve this, and I do not think if it can be
achieved very quickly though it may not be an impossible task.
4. I quickly went through the following link to understand the concept
of C++11 attributes -
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf. In
this doc, I see some proposal to represent OpenMP directives as C++11
attributes, though I do not know if any other compilers have already
implemented OpenMP by parsing C++11 attribute based OpenMP
representation. I am bit confused here about your suggestion of not
using ASTs to represent OpenMP statements. As per my understanding,
GCC and other compilers create ASTs for OpenMP constructs - and make
use of these ASTs for further *outlining* of parallel OpenMP regions,
and sub-sequent *lowering*. I do have an opinion that ASTs are very
much required to process classic OpenMP *pragma* constructs. However,
I appreciate, if you can share your suggestion with more *detail*