summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/TreeTransform.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/TreeTransform.h')
-rw-r--r--clang/lib/Sema/TreeTransform.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h
index 26d7222445b..a52234663d7 100644
--- a/clang/lib/Sema/TreeTransform.h
+++ b/clang/lib/Sema/TreeTransform.h
@@ -1059,7 +1059,8 @@ public:
QualType RebuildAtomicType(QualType ValueType, SourceLocation KWLoc);
/// \brief Build a new pipe type given its value type.
- QualType RebuildPipeType(QualType ValueType, SourceLocation KWLoc);
+ QualType RebuildPipeType(QualType ValueType, SourceLocation KWLoc,
+ bool isReadPipe);
/// \brief Build a new template name given a nested name specifier, a flag
/// indicating whether the "template" keyword was provided, and the template
@@ -5483,7 +5484,9 @@ QualType TreeTransform<Derived>::TransformPipeType(TypeLocBuilder &TLB,
QualType Result = TL.getType();
if (getDerived().AlwaysRebuild() || ValueType != TL.getValueLoc().getType()) {
- Result = getDerived().RebuildPipeType(ValueType, TL.getKWLoc());
+ const PipeType *PT = Result->getAs<PipeType>();
+ bool isReadPipe = PT->isReadOnly();
+ Result = getDerived().RebuildPipeType(ValueType, TL.getKWLoc(), isReadPipe);
if (Result.isNull())
return QualType();
}
@@ -11839,8 +11842,10 @@ QualType TreeTransform<Derived>::RebuildAtomicType(QualType ValueType,
template<typename Derived>
QualType TreeTransform<Derived>::RebuildPipeType(QualType ValueType,
- SourceLocation KWLoc) {
- return SemaRef.BuildPipeType(ValueType, KWLoc);
+ SourceLocation KWLoc,
+ bool isReadPipe) {
+ return isReadPipe ? SemaRef.BuildReadPipeType(ValueType, KWLoc)
+ : SemaRef.BuildWritePipeType(ValueType, KWLoc);
}
template<typename Derived>
OpenPOWER on IntegriCloud