[PATCH] D90303: [ASTMatchers] Made isExpandedFromMacro Polymorphic

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 28 06:05:39 PDT 2020


njames93 created this revision.
njames93 added reviewers: klimek, aaron.ballman.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
njames93 requested review of this revision.

Made the isExpandedFromMacro matcher work on Stmt's, TypeLocs and Decls in line with the other macro expansion matchers.
Also tweaked it to take a `std::string` instead of a `StringRef`.
This prevents potential use-after-free bugs if the matcher is created with a string thats destroyed before the matcher finishes matching.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D90303

Files:
  clang/docs/LibASTMatchersReference.html
  clang/include/clang/ASTMatchers/ASTMatchers.h
  clang/lib/ASTMatchers/GtestMatchers.cpp
  clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90303.301258.patch
Type: text/x-patch
Size: 6363 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201028/c7c240f5/attachment-0001.bin>


More information about the cfe-commits mailing list