File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ struct PrintingPolicy {
7676 MSWChar(LO.MicrosoftExt && !LO.WChar), IncludeNewlines(true ),
7777 MSVCFormatting(false ), ConstantsAsWritten(false ),
7878 SuppressImplicitBase(false ), FullyQualifiedName(false ),
79+ EnforceScopeForElaboratedTypes(false ),
7980 SuppressDefinition(false ), SuppressDefaultTemplateArguments(false ),
8081 PrintCanonicalTypes(false ),
8182 SkipCanonicalizationOfTemplateTypeParms(false ),
@@ -342,6 +343,10 @@ struct PrintingPolicy {
342343 LLVM_PREFERRED_TYPE (bool )
343344 unsigned FullyQualifiedName : 1;
344345
346+ // / Enforce fully qualified name printing for elaborated types.
347+ LLVM_PREFERRED_TYPE (bool )
348+ unsigned EnforceScopeForElaboratedTypes : 1;
349+
345350 // / When true does not print definition of a type. E.g.
346351 // / \code
347352 // / template<typename T> class C0 : public C1 {...}
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ class ElaboratedTypePolicyRAII {
101101 SuppressTagKeyword = Policy.SuppressTagKeyword ;
102102 SuppressScope = Policy.SuppressScope ;
103103 Policy.SuppressTagKeyword = true ;
104- Policy.SuppressScope = true ;
104+ Policy.SuppressScope = !Policy. EnforceScopeForElaboratedTypes ;
105105 }
106106
107107 ~ElaboratedTypePolicyRAII () {
Original file line number Diff line number Diff line change @@ -6483,6 +6483,8 @@ void SYCLIntegrationHeader::emit(raw_ostream &O) {
64836483 Policy.SuppressDefinition = true ;
64846484 Policy.PolishForDeclaration = true ;
64856485 Policy.EnforceDefaultTemplateArgs = true ;
6486+ Policy.FullyQualifiedName = true ;
6487+ Policy.EnforceScopeForElaboratedTypes = true ;
64866488 if (FTD) {
64876489 FTD->print (O, Policy);
64886490 } else {
@@ -6513,6 +6515,8 @@ void SYCLIntegrationHeader::emit(raw_ostream &O) {
65136515 O << " }\n " ;
65146516 Policy.SuppressDefaultTemplateArgs = true ;
65156517 Policy.EnforceDefaultTemplateArgs = false ;
6518+ Policy.FullyQualifiedName = false ;
6519+ Policy.EnforceScopeForElaboratedTypes = false ;
65166520
65176521 // Generate is_kernel, is_single_task_kernel and nd_range_kernel functions.
65186522 O << " namespace sycl {\n " ;
You can’t perform that action at this time.
0 commit comments