SuccessChanges

Summary

  1. [InstCombine] Add more tests to select-safe-transforms.ll (NFC) (details)
  2. [InstCombine] Add more tests for select operand replacement (NFC) (details)
  3. [ASTMatchers] Add mapAnyOf matcher (details)
Commit e0a979ccadd81c71d78be816e893dd1bcd6508ee by aqjune
[InstCombine] Add more tests to select-safe-transforms.ll (NFC)
The file was modifiedllvm/test/Transforms/InstCombine/select-safe-transforms.ll
Commit f0a0ec2d085b0bc53e20643b740b20b49cfd9bd5 by nikita.ppv
[InstCombine] Add more tests for select operand replacement (NFC)
The file was modifiedllvm/test/Transforms/InstCombine/select-binop-cmp.ll
Commit a7101450a42e4f1ed5af1a38a6def08f1b5b58fe by steveire
[ASTMatchers] Add mapAnyOf matcher

Make it possible to compose a matcher for different base nodes.

This accepts one or more node matcher functors and zero or more
matchers, composing the latter into the former.

This allows composing of matchers where the same inner matcher name is
used for the same concept, but with a different node functor. Currently,
there is a limitation that the nodes must be in the same "clade", so
while

  mapAnyOf(ifStmt, forStmt).with(hasBody(stmt()))

can be used, functionDecl can not be added to the tuple.

It is possible to use this in clang-query, but it will require changes
to the QueryParser, so is deferred to a future review.

Differential Revision: https://reviews.llvm.org/D94127
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchers.h
The file was modifiedclang/docs/tools/dump_ast_matchers.py
The file was modifiedclang/docs/LibASTMatchersReference.html
The file was modifiedclang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchersInternal.h