[clang] 3ed8ebc - Fix return values of some matcher functions
Stephen Kelly via cfe-commits
cfe-commits at lists.llvm.org
Sun May 24 04:37:54 PDT 2020
Author: Stephen Kelly
Date: 2020-05-24T12:37:44+01:00
New Revision: 3ed8ebc2f6b8172bed48cc5986d3b7af4cfca1bc
URL: https://github.com/llvm/llvm-project/commit/3ed8ebc2f6b8172bed48cc5986d3b7af4cfca1bc
DIFF: https://github.com/llvm/llvm-project/commit/3ed8ebc2f6b8172bed48cc5986d3b7af4cfca1bc.diff
LOG: Fix return values of some matcher functions
The old return values mean
* implicit conversion
* not being able to write sizeOfExpr().bind() for example
Added:
Modified:
clang/include/clang/ASTMatchers/ASTMatchers.h
Removed:
################################################################################
diff --git a/clang/include/clang/ASTMatchers/ASTMatchers.h b/clang/include/clang/ASTMatchers/ASTMatchers.h
index 460962d9e73b..a750747c9aa3 100644
--- a/clang/include/clang/ASTMatchers/ASTMatchers.h
+++ b/clang/include/clang/ASTMatchers/ASTMatchers.h
@@ -2662,7 +2662,7 @@ AST_MATCHER_P(UnaryExprOrTypeTraitExpr, ofKind, UnaryExprOrTypeTrait, Kind) {
/// Same as unaryExprOrTypeTraitExpr, but only matching
/// alignof.
-inline internal::Matcher<Stmt> alignOfExpr(
+inline internal::BindableMatcher<Stmt> alignOfExpr(
const internal::Matcher<UnaryExprOrTypeTraitExpr> &InnerMatcher) {
return stmt(unaryExprOrTypeTraitExpr(
allOf(anyOf(ofKind(UETT_AlignOf), ofKind(UETT_PreferredAlignOf)),
@@ -2671,7 +2671,7 @@ inline internal::Matcher<Stmt> alignOfExpr(
/// Same as unaryExprOrTypeTraitExpr, but only matching
/// sizeof.
-inline internal::Matcher<Stmt> sizeOfExpr(
+inline internal::BindableMatcher<Stmt> sizeOfExpr(
const internal::Matcher<UnaryExprOrTypeTraitExpr> &InnerMatcher) {
return stmt(unaryExprOrTypeTraitExpr(
allOf(ofKind(UETT_SizeOf), InnerMatcher)));
More information about the cfe-commits
mailing list