[PATCH] D58663: [ASTImporter] Add support for importing ChooseExpr AST nodes.
Tom Roeder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 25 21:18:16 PST 2019
tmroeder created this revision.
tmroeder added reviewers: shafik, a_sidorin, martong, aaron.ballman, rnk.
tmroeder added a project: clang.
Herald added a reviewer: a.sidorin.
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
This was originally reviewed and approved in
https://reviews.llvm.org/D58292 and submitted as r354832. It was
reverted in r354839 due to failures on the Windows CI builds.
This version fixes the test failures on Windows, caused by differences
in the behavior of -fms-compatibility between Linux and MSVC builds. In
MSVC builds, -fms-compatibility delays template evaluation for the C++
test case in clang/unittests/AST/ASTImporter.cpp, and that causes the
matcher to fail to match chooseExpr().
The only difference between this patch and r354839 is that the unit test
now checks for "-fms-compatibility" and treats it like
"-fdelayed-template-parsing": it doesn't try to match chooseExpr().
rG LLVM Github Monorepo
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 8549 bytes
Desc: not available
More information about the cfe-commits