Changeset d5916ce
- Timestamp:
- Aug 28, 2018, 6:27:21 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- b54ad9c
- Parents:
- e5ea867
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Validate.cc
re5ea867 rd5916ce 1333 1333 void FindSpecialDeclarations::previsit( FunctionDecl * funcDecl ) { 1334 1334 if ( ! dereferenceOperator ) { 1335 if ( funcDecl->get_name() == "*?" && funcDecl->get_linkage() == LinkageSpec::Intrinsic ) { 1336 FunctionType * ftype = funcDecl->get_functionType(); 1337 if ( ftype->get_parameters().size() == 1 && ftype->get_parameters().front()->get_type()->get_qualifiers() == Type::Qualifiers() ) { 1338 dereferenceOperator = funcDecl; 1335 // find and remember the intrinsic dereference operator for object pointers 1336 if ( funcDecl->name == "*?" && funcDecl->linkage == LinkageSpec::Intrinsic ) { 1337 FunctionType * ftype = funcDecl->type; 1338 if ( ftype->parameters.size() == 1 ) { 1339 PointerType * ptrType = strict_dynamic_cast<PointerType *>( ftype->parameters.front()->get_type() ); 1340 if ( ptrType->base->get_qualifiers() == Type::Qualifiers() ) { 1341 TypeInstType * inst = dynamic_cast<TypeInstType *>( ptrType->base ); 1342 if ( inst && ! inst->get_isFtype() ) { 1343 dereferenceOperator = funcDecl; 1344 } 1345 } 1339 1346 } 1340 1347 }
Note: See TracChangeset
for help on using the changeset viewer.