diff options
Diffstat (limited to 'lib/Sema/SemaOverload.h')
| -rw-r--r-- | lib/Sema/SemaOverload.h | 22 | 
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/Sema/SemaOverload.h b/lib/Sema/SemaOverload.h index 0d1f37aa4beb2..3613d608834a8 100644 --- a/lib/Sema/SemaOverload.h +++ b/lib/Sema/SemaOverload.h @@ -15,12 +15,26 @@  #ifndef LLVM_CLANG_SEMA_OVERLOAD_H  #define LLVM_CLANG_SEMA_OVERLOAD_H +#include "clang/AST/Decl.h" +#include "clang/AST/Type.h" +#include "llvm/ADT/SmallPtrSet.h"  #include "llvm/ADT/SmallVector.h"  namespace clang { +  class ASTContext;    class CXXConstructorDecl; +  class CXXConversionDecl;    class FunctionDecl; +  /// OverloadingResult - Capture the result of performing overload +  /// resolution. +  enum OverloadingResult { +    OR_Success,             ///< Overload resolution succeeded. +    OR_No_Viable_Function,  ///< No viable function found. +    OR_Ambiguous,           ///< Ambiguous candidates found. +    OR_Deleted              ///< Overload resoltuion refers to a deleted function. +  }; +        /// ImplicitConversionKind - The kind of implicit conversion used to    /// convert an argument to a parameter's type. The enumerator values    /// match with Table 9 of (C++ 13.3.3.1.1) and are listed such that @@ -30,6 +44,7 @@ namespace clang {      ICK_Lvalue_To_Rvalue,      ///< Lvalue-to-rvalue conversion (C++ 4.1)      ICK_Array_To_Pointer,      ///< Array-to-pointer conversion (C++ 4.2)      ICK_Function_To_Pointer,   ///< Function-to-pointer (C++ 4.3) +    ICK_NoReturn_Adjustment,   ///< Removal of noreturn from a type (Clang)      ICK_Qualification,         ///< Qualification conversions (C++ 4.4)      ICK_Integral_Promotion,    ///< Integral promotions (C++ 4.5)      ICK_Floating_Promotion,    ///< Floating point promotions (C++ 4.6) @@ -270,6 +285,7 @@ namespace clang {    /// OverloadCandidateSet - A set of overload candidates, used in C++    /// overload resolution (C++ 13.3).    class OverloadCandidateSet : public llvm::SmallVector<OverloadCandidate, 16> { +    typedef llvm::SmallVector<OverloadCandidate, 16> inherited;      llvm::SmallPtrSet<Decl *, 16> Functions;    public: @@ -278,6 +294,12 @@ namespace clang {      bool isNewCandidate(Decl *F) {         return Functions.insert(F->getCanonicalDecl());       } + +    /// \brief Clear out all of the candidates. +    void clear() { +      inherited::clear(); +      Functions.clear(); +    }    };  } // end namespace clang  | 
