Skip to content
Snippets Groups Projects
Select Git revision
  • v3.12-rc6
  • master default protected
  • objtool-32bit
  • objtool
  • v5.9
  • v5.9-rc8
  • v5.9-rc7
  • v5.9-rc6
  • v5.9-rc5
  • v5.9-rc4
  • v5.9-rc3
  • v5.9-rc2
  • v5.9-rc1
  • v5.8
  • v5.8-rc7
  • v5.8-rc6
  • v5.8-rc5
  • v5.8-rc4
  • v5.8-rc3
  • v5.8-rc2
  • v5.8-rc1
  • v5.7
  • v5.7-rc7
  • v5.7-rc6
24 results

rmd320.c

Blame
  • Forked from Jonas Rabenstein / Linux
    Source project has a limited visibility.
    SemaExprCXX.cpp 296.23 KiB
    //===--- SemaExprCXX.cpp - Semantic Analysis for Expressions --------------===//
    //
    //                     The LLVM Compiler Infrastructure
    //
    // This file is distributed under the University of Illinois Open Source
    // License. See LICENSE.TXT for details.
    //
    //===----------------------------------------------------------------------===//
    ///
    /// \file
    /// \brief Implements semantic analysis for C++ expressions.
    ///
    //===----------------------------------------------------------------------===//
    
    #include "clang/Sema/SemaInternal.h"
    #include "TreeTransform.h"
    #include "TypeLocBuilder.h"
    #include "clang/AST/ASTContext.h"
    #include "clang/AST/ASTLambda.h"
    #include "clang/AST/CXXInheritance.h"
    #include "clang/AST/CharUnits.h"
    #include "clang/AST/DeclObjC.h"
    #include "clang/AST/ExprCXX.h"
    #include "clang/AST/ExprObjC.h"
    #include "clang/AST/RecursiveASTVisitor.h"
    #include "clang/AST/TypeLoc.h"
    #include "clang/Basic/PartialDiagnostic.h"
    #include "clang/Basic/TargetInfo.h"
    #include "clang/Lex/Preprocessor.h"
    #include "clang/Sema/DeclSpec.h"
    #include "clang/Sema/Initialization.h"
    #include "clang/Sema/Lookup.h"
    #include "clang/Sema/ParsedTemplate.h"
    #include "clang/Sema/Scope.h"
    #include "clang/Sema/ScopeInfo.h"
    #include "clang/Sema/SemaLambda.h"
    #include "clang/Sema/TemplateDeduction.h"
    #include "llvm/ADT/APInt.h"
    #include "llvm/ADT/STLExtras.h"
    #include "llvm/Support/ErrorHandling.h"
    using namespace clang;
    using namespace sema;
    
    /// \brief Handle the result of the special case name lookup for inheriting
    /// constructor declarations. 'NS::X::X' and 'NS::X<...>::X' are treated as
    /// constructor names in member using declarations, even if 'X' is not the
    /// name of the corresponding type.
    ParsedType Sema::getInheritingConstructorName(CXXScopeSpec &SS,
                                                  SourceLocation NameLoc,
                                                  IdentifierInfo &Name) {
      NestedNameSpecifier *NNS = SS.getScopeRep();
    
      // Convert the nested-name-specifier into a type.
      QualType Type;
      switch (NNS->getKind()) {
      case NestedNameSpecifier::TypeSpec:
      case NestedNameSpecifier::TypeSpecWithTemplate:
        Type = QualType(NNS->getAsType(), 0);
        break;
    
      case NestedNameSpecifier::Identifier:
        // Strip off the last layer of the nested-name-specifier and build a
        // typename type for it.
        assert(NNS->getAsIdentifier() == &Name && "not a constructor name");
        Type = Context.getDependentNameType(ETK_None, NNS->getPrefix(),
                                            NNS->getAsIdentifier());
        break;
    
      case NestedNameSpecifier::Global:
      case NestedNameSpecifier::Super: