This is an archive of the discontinued LLVM Phabricator instance.

[ASTMatchers] Allow file-based narrowing matches to work with NestedNameSpecifierLocs.
AcceptedPublic

Authored by dlj on Feb 26 2018, 6:58 PM.

Details

Reviewers
rsmith
Summary

The narrowing matchers isExpansionInMainFile, isExpansionInSystemHeader, and
isExpansionInFileMatching work for TypeLocs, but not NestedNameSpecifierLocs.
This changes the matchers to use getSourceRange() to get location information,
which not only works for the previous cases, but also for NNSLocs.

Diff Detail

Repository
rC Clang

Event Timeline

dlj created this revision.Feb 26 2018, 6:58 PM
rsmith accepted this revision.Mar 1 2018, 9:59 AM
This revision is now accepted and ready to land.Mar 1 2018, 9:59 AM

Please add some test coverage for the NNS case.