diff --git a/clang/include/clang/Basic/Attr.td b/clang/include/clang/Basic/Attr.td index 66eb9a3fdb10f..55b00b50d0411 100644 --- a/clang/include/clang/Basic/Attr.td +++ b/clang/include/clang/Basic/Attr.td @@ -539,9 +539,9 @@ class Attr { // content. Eg) It parses 3 args, but semantically takes 4 args. Opts out of // common attribute error checking. bit HasCustomParsing = 0; - // Set to true if the attribute is a type attribute that has custom - // TreeTransform logic in order to handle template transformations. - bit HasCustomTypeTransform = 0; + // Set to true if the statement attribute is instantiation dependent and uses + // custom TreeTransform logic for template instantiation. + bit IsStmtDependent = 0; // Set to true if all of the attribute's arguments should be parsed in an // unevaluated context. bit ParseArgumentsAsUnevaluated = 0; @@ -1415,7 +1415,7 @@ def LoopUnrollHint : StmtAttr { ErrorDiag, "'for', 'while', and 'do' statements">; let Args = [ExprArgument<"UnrollHintExpr", /*opt*/1>]; let LangOpts = [SYCLIsDevice, SYCLIsHost]; - let HasCustomTypeTransform = 1; + let IsStmtDependent = 1; let AdditionalMembers = [{ std::string getDiagnosticName(const PrintingPolicy &Policy) const { std::string ValueName; @@ -1883,7 +1883,7 @@ def SYCLIntelFPGAIVDep : StmtAttr { UnsignedArgument<"SafelenValue", /*opt*/1> ]; let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost]; - let HasCustomTypeTransform = 1; + let IsStmtDependent = 1; let AdditionalMembers = [{ bool isDependent() const { return (getSafelenExpr() && @@ -1928,7 +1928,7 @@ def SYCLIntelFPGAInitiationInterval : DeclOrStmtAttr { "'for', 'while', 'do' statements, and functions">; let Args = [ExprArgument<"IntervalExpr">]; let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost]; - let HasCustomTypeTransform = 1; + let IsStmtDependent = 1; let Documentation = [SYCLIntelFPGAInitiationIntervalAttrDocs]; let SupportsNonconformingLambdaSyntax = 1; } @@ -1941,7 +1941,7 @@ def SYCLIntelFPGAMaxConcurrency : DeclOrStmtAttr { "'for', 'while', 'do' statements, and functions">; let Args = [ExprArgument<"NThreadsExpr">]; let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost]; - let HasCustomTypeTransform = 1; + let IsStmtDependent = 1; let Documentation = [SYCLIntelFPGAMaxConcurrencyAttrDocs]; let SupportsNonconformingLambdaSyntax = 1; } @@ -1953,7 +1953,7 @@ def SYCLIntelFPGALoopCoalesce : StmtAttr { ErrorDiag, "'for', 'while', and 'do' statements">; let Args = [ExprArgument<"NExpr", /*opt*/1>]; let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost]; - let HasCustomTypeTransform = 1; + let IsStmtDependent = 1; let Documentation = [SYCLIntelFPGALoopCoalesceAttrDocs]; } @@ -1964,7 +1964,7 @@ def SYCLIntelFPGADisableLoopPipelining : DeclOrStmtAttr { ErrorDiag, "'for', 'while', 'do' statements, and functions">; let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost]; - let HasCustomTypeTransform = 1; + let IsStmtDependent = 1; let Documentation = [SYCLIntelFPGADisableLoopPipeliningAttrDocs]; let SupportsNonconformingLambdaSyntax = 1; } @@ -1985,7 +1985,7 @@ def SYCLIntelFPGAMaxInterleaving : StmtAttr { ErrorDiag, "'for', 'while', and 'do' statements">; let Args = [ExprArgument<"NExpr">]; let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost]; - let HasCustomTypeTransform = 1; + let IsStmtDependent = 1; let Documentation = [SYCLIntelFPGAMaxInterleavingAttrDocs]; } def : MutualExclusions<[SYCLIntelFPGADisableLoopPipelining, @@ -1998,7 +1998,7 @@ def SYCLIntelFPGASpeculatedIterations : StmtAttr { ErrorDiag, "'for', 'while', and 'do' statements">; let Args = [ExprArgument<"NExpr">]; let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost]; - let HasCustomTypeTransform = 1; + let IsStmtDependent = 1; let Documentation = [SYCLIntelFPGASpeculatedIterationsAttrDocs]; } def : MutualExclusions<[SYCLIntelFPGADisableLoopPipelining, @@ -2009,7 +2009,7 @@ def SYCLIntelFPGANofusion : StmtAttr { let Subjects = SubjectList<[ForStmt, CXXForRangeStmt, WhileStmt, DoStmt], ErrorDiag, "'for', 'while', and 'do' statements">; let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost]; - let HasCustomTypeTransform = 1; + let IsStmtDependent = 1; let Documentation = [SYCLIntelFPGANofusionAttrDocs]; } diff --git a/clang/utils/TableGen/ClangAttrEmitter.cpp b/clang/utils/TableGen/ClangAttrEmitter.cpp index 260fe4f5f0a27..fa401e6b7f92b 100644 --- a/clang/utils/TableGen/ClangAttrEmitter.cpp +++ b/clang/utils/TableGen/ClangAttrEmitter.cpp @@ -2896,7 +2896,7 @@ void EmitClangAttrList(RecordKeeper &Records, raw_ostream &OS) { if (AttrHasPragmaSpelling(Attr)) PragmaAttrs.push_back(Attr); - if (Attr->getValueAsBit("HasCustomTypeTransform")) + if (Attr->getValueAsBit("IsStmtDependent")) DependentStmtAttrs.push_back(Attr); // Place it in the hierarchy.