bloomberg / clangmetatool

A framework for reusing code in Clang tools
https://bloomberg.github.io/clangmetatool/
Apache License 2.0
119 stars 25 forks source link

Improve support for locating declRefs that are used in a macro #76

Closed samanpa closed 1 year ago

samanpa commented 1 year ago

This is a more conservative version of #75

Given the example below foo.h

#define PASTE(x, y ) x ## y

foo.cpp

#include "foo.h"
#include <cerrno>

int zee()
{
  return PASTE(err, no);
}

After this PR clangmetatool will now detect that foo.h uses cerrno. In #75 it would say foo.cpp uses cerrno.

Signed-off-by: Kojo Adams kadams85@bloomberg.net