[PATCH] D92600: [ASTImporter] Add support for importing GenericSelectionExpr AST nodes.

Tom Roeder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 3 12:39:50 PST 2020


tmroeder created this revision.
tmroeder added reviewers: aaron.ballman, klimek.
Herald added subscribers: teemperor, martong.
Herald added a reviewer: a.sidorin.
Herald added a reviewer: shafik.
tmroeder requested review of this revision.
Herald added a project: clang.

This allows ASTs to be merged when they contain GenericSelectionExpr
nodes (this is _Generic from C11). This is needed, for example, for
cross-CTU analysis of C code that makes use of _Generic, like the Linux
kernel.

The node is already supported in the AST, but it didn't have a matcher
in ASTMatchers. So, this change adds the matcher and adds support to
ASTImporter.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D92600

Files:
  clang/docs/LibASTMatchersReference.html
  clang/include/clang/ASTMatchers/ASTMatchers.h
  clang/lib/AST/ASTImporter.cpp
  clang/lib/ASTMatchers/ASTMatchersInternal.cpp
  clang/lib/ASTMatchers/Dynamic/Registry.cpp
  clang/lib/Analysis/ExprMutationAnalyzer.cpp
  clang/test/ASTMerge/generic-selection-expr/Inputs/generic.c
  clang/test/ASTMerge/generic-selection-expr/test.c
  clang/unittests/AST/ASTImporterTest.cpp
  clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92600.309337.patch
Type: text/x-patch
Size: 9341 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201203/38eb9b91/attachment.bin>


More information about the cfe-commits mailing list