diff options
Diffstat (limited to 'clang/tools/libclang')
-rw-r--r-- | clang/tools/libclang/CIndex.cpp | 10 | ||||
-rw-r--r-- | clang/tools/libclang/CIndexCodeCompletion.cpp | 4 | ||||
-rw-r--r-- | clang/tools/libclang/CXCursor.cpp | 2 | ||||
-rw-r--r-- | clang/tools/libclang/CXIndexDataConsumer.cpp | 2 | ||||
-rw-r--r-- | clang/tools/libclang/CXType.cpp | 8 |
5 files changed, 14 insertions, 12 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index c39f337..fc27fd2 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -1644,9 +1644,9 @@ bool CursorVisitor::VisitTagTypeLoc(TagTypeLoc TL) { return true; if (TL.isDefinition()) - return Visit(MakeCXCursor(TL.getOriginalDecl(), TU, RegionOfInterest)); + return Visit(MakeCXCursor(TL.getDecl(), TU, RegionOfInterest)); - return Visit(MakeCursorTypeRef(TL.getOriginalDecl(), TL.getNameLoc(), TU)); + return Visit(MakeCursorTypeRef(TL.getDecl(), TL.getNameLoc(), TU)); } bool CursorVisitor::VisitTemplateTypeParmTypeLoc(TemplateTypeParmTypeLoc TL) { @@ -1852,7 +1852,7 @@ bool CursorVisitor::VisitPackIndexingTypeLoc(PackIndexingTypeLoc TL) { } bool CursorVisitor::VisitInjectedClassNameTypeLoc(InjectedClassNameTypeLoc TL) { - return Visit(MakeCursorTypeRef(TL.getOriginalDecl(), TL.getNameLoc(), TU)); + return Visit(MakeCursorTypeRef(TL.getDecl(), TL.getNameLoc(), TU)); } bool CursorVisitor::VisitAtomicTypeLoc(AtomicTypeLoc TL) { @@ -2386,7 +2386,9 @@ void OMPClauseEnqueue::VisitOMPDetachClause(const OMPDetachClause *C) { Visitor->AddStmt(C->getEventHandler()); } -void OMPClauseEnqueue::VisitOMPNowaitClause(const OMPNowaitClause *) {} +void OMPClauseEnqueue::VisitOMPNowaitClause(const OMPNowaitClause *C) { + Visitor->AddStmt(C->getCondition()); +} void OMPClauseEnqueue::VisitOMPUntiedClause(const OMPUntiedClause *) {} diff --git a/clang/tools/libclang/CIndexCodeCompletion.cpp b/clang/tools/libclang/CIndexCodeCompletion.cpp index 6d14f28..81448b4 100644 --- a/clang/tools/libclang/CIndexCodeCompletion.cpp +++ b/clang/tools/libclang/CIndexCodeCompletion.cpp @@ -617,7 +617,7 @@ namespace { if (!baseType.isNull()) { // Get the declaration for a class/struct/union/enum type if (const TagType *Tag = baseType->getAs<TagType>()) - D = Tag->getOriginalDecl(); + D = Tag->getDecl(); // Get the @interface declaration for a (possibly-qualified) Objective-C // object pointer type, e.g., NSString* else if (const ObjCObjectPointerType *ObjPtr = @@ -629,7 +629,7 @@ namespace { // Get the class for a C++ injected-class-name else if (const InjectedClassNameType *Injected = baseType->getAs<InjectedClassNameType>()) - D = Injected->getOriginalDecl(); + D = Injected->getDecl(); } if (D != nullptr) { diff --git a/clang/tools/libclang/CXCursor.cpp b/clang/tools/libclang/CXCursor.cpp index 56f113c..0a43d73 100644 --- a/clang/tools/libclang/CXCursor.cpp +++ b/clang/tools/libclang/CXCursor.cpp @@ -1338,7 +1338,7 @@ CXCursor cxcursor::getTypeRefCursor(CXCursor cursor) { if (const TypedefType *Typedef = Ty->getAs<TypedefType>()) return MakeCursorTypeRef(Typedef->getDecl(), Loc, TU); if (const TagType *Tag = Ty->getAs<TagType>()) - return MakeCursorTypeRef(Tag->getOriginalDecl(), Loc, TU); + return MakeCursorTypeRef(Tag->getDecl(), Loc, TU); if (const TemplateTypeParmType *TemplP = Ty->getAs<TemplateTypeParmType>()) return MakeCursorTypeRef(TemplP->getDecl(), Loc, TU); diff --git a/clang/tools/libclang/CXIndexDataConsumer.cpp b/clang/tools/libclang/CXIndexDataConsumer.cpp index 932201a..c97aefa 100644 --- a/clang/tools/libclang/CXIndexDataConsumer.cpp +++ b/clang/tools/libclang/CXIndexDataConsumer.cpp @@ -357,7 +357,7 @@ CXIndexDataConsumer::CXXBasesListInfo::CXXBasesListInfo(const CXXRecordDecl *D, TST = T->getAs<TemplateSpecializationType>()) { BaseD = TST->getTemplateName().getAsTemplateDecl(); } else if (const RecordType *RT = T->getAs<RecordType>()) { - BaseD = RT->getOriginalDecl(); + BaseD = RT->getDecl(); } if (BaseD) diff --git a/clang/tools/libclang/CXType.cpp b/clang/tools/libclang/CXType.cpp index d21ac7c..3feb563 100644 --- a/clang/tools/libclang/CXType.cpp +++ b/clang/tools/libclang/CXType.cpp @@ -546,11 +546,11 @@ try_again: break; case Type::Record: case Type::Enum: - D = cast<TagType>(TP)->getOriginalDecl(); + D = cast<TagType>(TP)->getDecl(); break; case Type::TemplateSpecialization: if (const RecordType *Record = TP->getAs<RecordType>()) - D = Record->getOriginalDecl(); + D = Record->getDecl(); else D = cast<TemplateSpecializationType>(TP)->getTemplateName() .getAsTemplateDecl(); @@ -564,7 +564,7 @@ try_again: break; case Type::InjectedClassName: - D = cast<InjectedClassNameType>(TP)->getOriginalDecl(); + D = cast<InjectedClassNameType>(TP)->getDecl(); break; // FIXME: Template type parameters! @@ -1037,7 +1037,7 @@ static long long visitRecordForValidation(const RecordDecl *RD) { return CXTypeLayoutError_Dependent; // recurse if (const RecordType *ChildType = I->getType()->getAs<RecordType>()) { - if (const RecordDecl *Child = ChildType->getOriginalDecl()) { + if (const RecordDecl *Child = ChildType->getDecl()) { long long ret = visitRecordForValidation(Child); if (ret < 0) return ret; |