[PATCH] D58292: Add support for importing ChooseExpr AST nodes.

Tom Roeder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 22 14:32:58 PST 2019


tmroeder updated this revision to Diff 187989.
tmroeder added a comment.

Added more unit tests.

Sorry for the delay; I had to dig into the details to figure out where to put these tests and how to structure them. Please let me know if there are better ways to do this.

I don't know any way to write a matcher that checks the condition of __builtin_choose_expr before and after import, so I added a unit test that matches the expr and compares the From and To ChooseExprs directly.

I've confirmed that without the negation in the condition in VisitChooseExpr, the new tests cause failures and with the negation, everything is clean.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58292/new/

https://reviews.llvm.org/D58292

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58292.187989.patch
Type: text/x-patch
Size: 8321 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190222/404271ef/attachment-0001.bin>


More information about the cfe-commits mailing list