[cfe-dev] What is the walk-through to add custom Identifier recognizer to clang ?

MohsenTi via cfe-dev cfe-dev at lists.llvm.org
Fri Nov 16 05:40:12 PST 2018

I want to add a custom Identifier recognizer to clang compiler that allows
it access to the members of selected object, for example see the code below:

#include <iostream>
using namespace std;
class XY {
        void printX() { cout << "X" << endl; }
        void printY() { cout << "Y" << endl; }
int main() {
    XY xy;
    with(xy) {
    return 0;

I've added "with" token(keyword), statement, parser, semantic, recursive
ast visitor, tree transform and all other requirements to parse concept
All parsing routine are fine follow by " use of undeclared identifier
'printX' " and " use of undeclared identifier 'printX' " errors.
What are the complement works which has to be done after what I have said
so far to allow compiler detect selected object members?

Mohsen Timar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20181116/e0a5a4c0/attachment.html>

More information about the cfe-dev mailing list