diff options
Diffstat (limited to 'include/clang/AST/Redeclarable.h')
-rw-r--r-- | include/clang/AST/Redeclarable.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/clang/AST/Redeclarable.h b/include/clang/AST/Redeclarable.h index c2bd6e6fd136..0975773dd2cb 100644 --- a/include/clang/AST/Redeclarable.h +++ b/include/clang/AST/Redeclarable.h @@ -1,9 +1,8 @@ //===- Redeclarable.h - Base for Decls that can be redeclared --*- C++ -*-====// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // @@ -362,6 +361,13 @@ public: decl_type &operator*() { return *Ptr; } const decl_type &operator*() const { return *Ptr; } + friend bool operator==(CanonicalDeclPtr LHS, CanonicalDeclPtr RHS) { + return LHS.Ptr == RHS.Ptr; + } + friend bool operator!=(CanonicalDeclPtr LHS, CanonicalDeclPtr RHS) { + return LHS.Ptr != RHS.Ptr; + } + private: friend struct llvm::DenseMapInfo<CanonicalDeclPtr<decl_type>>; |