diff options
Diffstat (limited to 'clang/include/clang/Sema/Overload.h')
-rw-r--r-- | clang/include/clang/Sema/Overload.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/include/clang/Sema/Overload.h b/clang/include/clang/Sema/Overload.h index d34a414..59bbd0f 100644 --- a/clang/include/clang/Sema/Overload.h +++ b/clang/include/clang/Sema/Overload.h @@ -1202,12 +1202,12 @@ class Sema; /// Would use of this function result in a rewrite using a different /// operator? - bool isRewrittenOperator(const FunctionDecl *FD) { + bool isRewrittenOperator(const FunctionDecl *FD) const { return OriginalOperator && FD->getDeclName().getCXXOverloadedOperator() != OriginalOperator; } - bool isAcceptableCandidate(const FunctionDecl *FD) { + bool isAcceptableCandidate(const FunctionDecl *FD) const { if (!OriginalOperator) return true; @@ -1234,7 +1234,7 @@ class Sema; } /// Determines whether this operator could be implemented by a function /// with reversed parameter order. - bool isReversible() { + bool isReversible() const { return AllowRewrittenCandidates && OriginalOperator && (getRewrittenOverloadedOperator(OriginalOperator) != OO_None || allowsReversed(OriginalOperator)); @@ -1242,13 +1242,13 @@ class Sema; /// Determine whether reversing parameter order is allowed for operator /// Op. - bool allowsReversed(OverloadedOperatorKind Op); + bool allowsReversed(OverloadedOperatorKind Op) const; /// Determine whether we should add a rewritten candidate for \p FD with /// reversed parameter order. /// \param OriginalArgs are the original non reversed arguments. bool shouldAddReversed(Sema &S, ArrayRef<Expr *> OriginalArgs, - FunctionDecl *FD); + FunctionDecl *FD) const; }; private: |