[ASTImporter] Add support for importing ChooseExpr AST nodes.
authorTom Roeder <tmroeder@google.com>
Mon, 25 Feb 2019 23:24:58 +0000 (23:24 +0000)
committerTom Roeder <tmroeder@google.com>
Mon, 25 Feb 2019 23:24:58 +0000 (23:24 +0000)
commit9a72870122394dbdfde5b93555e4409f81a4024e
tree7c4c8d9e9ddc17fee7b632191552c70ee7e1efa6
parent17aec7bd369be14626102a59dff9d88380fd367a
[ASTImporter] Add support for importing ChooseExpr AST nodes.

Summary:
This allows ASTs to be merged when they contain ChooseExpr (the GNU
__builtin_choose_expr construction). This is needed, for example, for
cross-CTU analysis of C code that makes use of __builtin_choose_expr.

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.

Reviewers: shafik, a_sidorin, martong, aaron.ballman

Subscribers: aaron.ballman, rnkovacs, jdoerfert, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D58292

llvm-svn: 354832
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/test/ASTMerge/choose-expr/Inputs/choose.c [new file with mode: 0644]
clang/test/ASTMerge/choose-expr/test.c [new file with mode: 0644]
clang/unittests/AST/ASTImporterTest.cpp
clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp