[PATCH] D99231: [AST] Add introspection support for more base nodes

Stephen Kelly via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 23 17:26:07 PDT 2021


steveire created this revision.
steveire added a reviewer: njames93.
Herald added a subscriber: mgorny.
steveire requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Replace an assert for a CXXCtorInitializer SourceLocation with a
condition, as was done for other locations in commit 54272e5b (NFC:
Replace asserts with if() in SourceLocation accessors, 2019-01-07).

Fix the logic of detecting pseudo-virtual getBeginLoc etc on Stmt and
Decl subclasses.

Adjust the test infrastructure to filter out invalid source locations.
This makes the tests more clear about which nodes have which locations.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99231

Files:
  clang/include/clang/AST/DeclCXX.h
  clang/include/clang/Tooling/NodeIntrospection.h
  clang/lib/Tooling/CMakeLists.txt
  clang/lib/Tooling/DumpTool/ASTSrcLocProcessor.cpp
  clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py
  clang/unittests/Introspection/IntrospectionTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99231.332834.patch
Type: text/x-patch
Size: 23942 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210324/6005f141/attachment-0001.bin>


More information about the cfe-commits mailing list