当前位置: 首页>>代码示例>>C++>>正文


C++ QualType::split方法代码示例

本文整理汇总了C++中QualType::split方法的典型用法代码示例。如果您正苦于以下问题:C++ QualType::split方法的具体用法?C++ QualType::split怎么用?C++ QualType::split使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QualType的用法示例。


在下文中一共展示了QualType::split方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: stripType

QualType stripType(const QualType & qualType)
{
	QualType qType = qualType;
	SplitQualType splitQualType = qType.split();
	const Type * t = splitQualType.Ty;

	for(;;) {
		if(t->isArrayType()) {
			qType = dyn_cast<ArrayType>(t->getCanonicalTypeInternal())->getElementType();
		}
		else if(t->isPointerType()) {
			qType = dyn_cast<PointerType>(t)->getPointeeType();
		}
		else if(t->isReferenceType()) {
			qType = dyn_cast<ReferenceType>(t)->getPointeeType();
		}
		else {
			break;
		}
		splitQualType = qType.split();
		t = splitQualType.Ty;
	}

	return qType;
}
开发者ID:Remscar,项目名称:cpgf,代码行数:25,代码来源:cpputil.cpp

示例2: AddQualType

void ODRHash::AddQualType(QualType T) {
  AddBoolean(T.isNull());
  if (T.isNull())
    return;
  SplitQualType split = T.split();
  ID.AddInteger(split.Quals.getAsOpaqueValue());
  AddType(split.Ty);
}
开发者ID:Teemperor,项目名称:clang,代码行数:8,代码来源:ODRHash.cpp

示例3: getTypeWithAttribute

static QualType getTypeWithAttribute(ASTContext &C, QualType T, Qualifiers::AS AS) {
  auto Split = T.split();
  if(Split.second.hasAttributeSpec(AS))
    return T;
  QualifierCollector QC(Split.second);
  QC.addAttributeSpecs(AS);
  return C.getTypeWithQualifers(T, QC);
}
开发者ID:ben-brewer-codethink,项目名称:flang,代码行数:8,代码来源:SemaDecl.cpp

示例4: getQualTypeOtherKind

QualType ASTContext::getQualTypeOtherKind(QualType Type, QualType KindType) {
  auto BTy = Type->asBuiltinType();
  auto DesiredBTy = KindType->asBuiltinType();
  if(BTy->getBuiltinTypeKind() == DesiredBTy->getBuiltinTypeKind())
    return Type;
  auto Split = Type.split();
  return getExtQualType(getBuiltinType(BTy->getTypeSpec(), DesiredBTy->getBuiltinTypeKind(),
                                       DesiredBTy->isKindExplicitlySpecified(),
                                       DesiredBTy->isDoublePrecisionKindSpecified(),
                                       DesiredBTy->isByteKindSpecified()), Split.second);
}
开发者ID:ctgriffiths,项目名称:flang,代码行数:11,代码来源:ASTContext.cpp

示例5: dumpBareType

void ASTDumper::dumpBareType(QualType T) {
  SplitQualType T_split = T.split();
  OS << "'" << QualType::getAsString(T_split) << "'";

  if (!T.isNull()) {
    // If the type is sugared, also dump a (shallow) desugared type.
    SplitQualType D_split = T.getSplitDesugaredType();
    if (T_split != D_split)
      OS << ":'" << QualType::getAsString(D_split) << "'";
  }
}
开发者ID:r4start,项目名称:clang-with-ms-abi-support,代码行数:11,代码来源:ASTDumper.cpp

示例6: printBefore

void TypePrinter::printBefore(QualType T, raw_ostream &OS) {
  SplitQualType Split = T.split();

  // If we have cv1 T, where T is substituted for cv2 U, only print cv1 - cv2
  // at this level.
  Qualifiers Quals = Split.Quals;
  if (const SubstTemplateTypeParmType *Subst =
        dyn_cast<SubstTemplateTypeParmType>(Split.Ty))
    Quals -= QualType(Subst, 0).getQualifiers();

  printBefore(Split.Ty, Quals, OS);
}
开发者ID:8l,项目名称:emscripten-fastcomp-clang,代码行数:12,代码来源:TypePrinter.cpp

示例7: VisitObjCMessageExpr

 bool VisitObjCMessageExpr(ObjCMessageExpr *node)
 {
     if (!node->isImplicit())
     {
         if (node->getReceiverKind() == ObjCMessageExpr::Instance)
         {
             if (node->getReceiverInterface())
             {
                 countInterface(node->getReceiverInterface());
             }
         }
         else if (node->getReceiverKind() == ObjCMessageExpr::Class)
         {
             QualType qualType = node->getClassReceiver();
             countClassName(QualType::getAsString(qualType.split()));
         }
     }
     return true;
 }
开发者ID:52doho,项目名称:oclint,代码行数:19,代码来源:FeatureEnvyRule.cpp

示例8: getTypeWithQualifers

QualType ASTContext::getTypeWithQualifers(QualType Type, Qualifiers Quals) {
  auto Split = Type.split();
  return getExtQualType(Split.first, Quals);
}
开发者ID:ctgriffiths,项目名称:flang,代码行数:4,代码来源:ASTContext.cpp

示例9: printAfter

void TypePrinter::printAfter(QualType t, raw_ostream &OS) {
  SplitQualType split = t.split();
  printAfter(split.Ty, split.Quals, OS);
}
开发者ID:8l,项目名称:emscripten-fastcomp-clang,代码行数:4,代码来源:TypePrinter.cpp

示例10: print

void TypePrinter::print(QualType t, raw_ostream &OS, StringRef PlaceHolder) {
  SplitQualType split = t.split();
  print(split.Ty, split.Quals, OS, PlaceHolder);
}
开发者ID:8l,项目名称:emscripten-fastcomp-clang,代码行数:4,代码来源:TypePrinter.cpp

示例11: print

void TypePrinter::print(QualType t, std::string &buffer) {
  SplitQualType split = t.split();
  print(split.first, split.second, buffer);
}
开发者ID:Bootz,项目名称:multicore-opimization,代码行数:4,代码来源:TypePrinter.cpp

示例12: print

void TypePrinter::print(QualType t, std::string &buffer) {
  SplitQualType split = t.split();
  print(split.Ty, split.Quals, buffer);
}
开发者ID:2014-class,项目名称:freerouter,代码行数:4,代码来源:TypePrinter.cpp


注:本文中的QualType::split方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。