How to determine what memory locations a variable points to?

I'm writing some checkers using Clang and as part of my work I need to know
what memory locations a variable points to. For example for this code I'm
wondering if there is any way I could know that variable out in main
function points to "point"?

class foo {
    char* x;
  public:
    foo (char*);
    char* getx () {return x;}
};

foo::foo (char* a) {
  x = a;
}

int main () {
  char *c = "point";
  foo f(c);
  char* out = f.getx();
  return 0;
}