@@ -1836,7 +1836,7 @@ QualType Sema::BuildPointerType(QualType T,
18361836 if (getLangOpts ().ObjCAutoRefCount )
18371837 T = inferARCLifetimeForPointee (*this , T, Loc, /* reference*/ false );
18381838
1839- if (getLangOpts ().OpenCL || getLangOpts (). OpenCLGenericAddressSpace )
1839+ if (getLangOpts ().OpenCL )
18401840 T = deduceOpenCLPointeeAddrSpace (*this , T);
18411841
18421842 // In WebAssembly, pointers to reference types and pointers to tables are
@@ -1913,7 +1913,7 @@ QualType Sema::BuildReferenceType(QualType T, bool SpelledAsLValue,
19131913 if (getLangOpts ().ObjCAutoRefCount )
19141914 T = inferARCLifetimeForPointee (*this , T, Loc, /* reference*/ true );
19151915
1916- if (getLangOpts ().OpenCL || getLangOpts (). OpenCLGenericAddressSpace )
1916+ if (getLangOpts ().OpenCL )
19171917 T = deduceOpenCLPointeeAddrSpace (*this , T);
19181918
19191919 // In WebAssembly, references to reference types and tables are illegal.
@@ -2741,7 +2741,7 @@ QualType Sema::BuildBlockPointerType(QualType T,
27412741 if (checkQualifiedFunction (*this , T, Loc, QFK_BlockPointer))
27422742 return QualType ();
27432743
2744- if (getLangOpts ().OpenCL || getLangOpts (). OpenCLGenericAddressSpace )
2744+ if (getLangOpts ().OpenCL )
27452745 T = deduceOpenCLPointeeAddrSpace (*this , T);
27462746
27472747 return Context.getBlockPointerType (T);
@@ -5289,10 +5289,7 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state,
52895289 DeclaratorContext::LambdaExpr;
52905290 };
52915291
5292- if ((state.getSema ().getLangOpts ().OpenCLCPlusPlus ||
5293- (!state.getSema ().getLangOpts ().OpenCL &&
5294- state.getSema ().getLangOpts ().OpenCLGenericAddressSpace )) &&
5295- IsClassMember ()) {
5292+ if (state.getSema ().getLangOpts ().OpenCLCPlusPlus && IsClassMember ()) {
52965293 LangAS ASIdx = LangAS::Default;
52975294 // Take address space attr if any and mark as invalid to avoid adding
52985295 // them later while creating QualType.
0 commit comments