Skip to content

Commit 1811037

Browse files
authored
Rename misleading attribute flag (#3610)
Signed-off-by: Zahira Ammarguellat <[email protected]>
1 parent 201f902 commit 1811037

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

clang/include/clang/Basic/Attr.td

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -539,9 +539,9 @@ class Attr {
539539
// content. Eg) It parses 3 args, but semantically takes 4 args. Opts out of
540540
// common attribute error checking.
541541
bit HasCustomParsing = 0;
542-
// Set to true if the attribute is a type attribute that has custom
543-
// TreeTransform logic in order to handle template transformations.
544-
bit HasCustomTypeTransform = 0;
542+
// Set to true if the statement attribute is instantiation dependent and uses
543+
// custom TreeTransform logic for template instantiation.
544+
bit IsStmtDependent = 0;
545545
// Set to true if all of the attribute's arguments should be parsed in an
546546
// unevaluated context.
547547
bit ParseArgumentsAsUnevaluated = 0;
@@ -1415,7 +1415,7 @@ def LoopUnrollHint : StmtAttr {
14151415
ErrorDiag, "'for', 'while', and 'do' statements">;
14161416
let Args = [ExprArgument<"UnrollHintExpr", /*opt*/1>];
14171417
let LangOpts = [SYCLIsDevice, SYCLIsHost];
1418-
let HasCustomTypeTransform = 1;
1418+
let IsStmtDependent = 1;
14191419
let AdditionalMembers = [{
14201420
std::string getDiagnosticName(const PrintingPolicy &Policy) const {
14211421
std::string ValueName;
@@ -1883,7 +1883,7 @@ def SYCLIntelFPGAIVDep : StmtAttr {
18831883
UnsignedArgument<"SafelenValue", /*opt*/1>
18841884
];
18851885
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
1886-
let HasCustomTypeTransform = 1;
1886+
let IsStmtDependent = 1;
18871887
let AdditionalMembers = [{
18881888
bool isDependent() const {
18891889
return (getSafelenExpr() &&
@@ -1928,7 +1928,7 @@ def SYCLIntelFPGAInitiationInterval : DeclOrStmtAttr {
19281928
"'for', 'while', 'do' statements, and functions">;
19291929
let Args = [ExprArgument<"IntervalExpr">];
19301930
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
1931-
let HasCustomTypeTransform = 1;
1931+
let IsStmtDependent = 1;
19321932
let Documentation = [SYCLIntelFPGAInitiationIntervalAttrDocs];
19331933
let SupportsNonconformingLambdaSyntax = 1;
19341934
}
@@ -1941,7 +1941,7 @@ def SYCLIntelFPGAMaxConcurrency : DeclOrStmtAttr {
19411941
"'for', 'while', 'do' statements, and functions">;
19421942
let Args = [ExprArgument<"NThreadsExpr">];
19431943
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
1944-
let HasCustomTypeTransform = 1;
1944+
let IsStmtDependent = 1;
19451945
let Documentation = [SYCLIntelFPGAMaxConcurrencyAttrDocs];
19461946
let SupportsNonconformingLambdaSyntax = 1;
19471947
}
@@ -1953,7 +1953,7 @@ def SYCLIntelFPGALoopCoalesce : StmtAttr {
19531953
ErrorDiag, "'for', 'while', and 'do' statements">;
19541954
let Args = [ExprArgument<"NExpr", /*opt*/1>];
19551955
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
1956-
let HasCustomTypeTransform = 1;
1956+
let IsStmtDependent = 1;
19571957
let Documentation = [SYCLIntelFPGALoopCoalesceAttrDocs];
19581958
}
19591959

@@ -1964,7 +1964,7 @@ def SYCLIntelFPGADisableLoopPipelining : DeclOrStmtAttr {
19641964
ErrorDiag,
19651965
"'for', 'while', 'do' statements, and functions">;
19661966
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
1967-
let HasCustomTypeTransform = 1;
1967+
let IsStmtDependent = 1;
19681968
let Documentation = [SYCLIntelFPGADisableLoopPipeliningAttrDocs];
19691969
let SupportsNonconformingLambdaSyntax = 1;
19701970
}
@@ -1985,7 +1985,7 @@ def SYCLIntelFPGAMaxInterleaving : StmtAttr {
19851985
ErrorDiag, "'for', 'while', and 'do' statements">;
19861986
let Args = [ExprArgument<"NExpr">];
19871987
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
1988-
let HasCustomTypeTransform = 1;
1988+
let IsStmtDependent = 1;
19891989
let Documentation = [SYCLIntelFPGAMaxInterleavingAttrDocs];
19901990
}
19911991
def : MutualExclusions<[SYCLIntelFPGADisableLoopPipelining,
@@ -1998,7 +1998,7 @@ def SYCLIntelFPGASpeculatedIterations : StmtAttr {
19981998
ErrorDiag, "'for', 'while', and 'do' statements">;
19991999
let Args = [ExprArgument<"NExpr">];
20002000
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
2001-
let HasCustomTypeTransform = 1;
2001+
let IsStmtDependent = 1;
20022002
let Documentation = [SYCLIntelFPGASpeculatedIterationsAttrDocs];
20032003
}
20042004
def : MutualExclusions<[SYCLIntelFPGADisableLoopPipelining,
@@ -2009,7 +2009,7 @@ def SYCLIntelFPGANofusion : StmtAttr {
20092009
let Subjects = SubjectList<[ForStmt, CXXForRangeStmt, WhileStmt, DoStmt],
20102010
ErrorDiag, "'for', 'while', and 'do' statements">;
20112011
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
2012-
let HasCustomTypeTransform = 1;
2012+
let IsStmtDependent = 1;
20132013
let Documentation = [SYCLIntelFPGANofusionAttrDocs];
20142014
}
20152015

clang/utils/TableGen/ClangAttrEmitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2896,7 +2896,7 @@ void EmitClangAttrList(RecordKeeper &Records, raw_ostream &OS) {
28962896
if (AttrHasPragmaSpelling(Attr))
28972897
PragmaAttrs.push_back(Attr);
28982898

2899-
if (Attr->getValueAsBit("HasCustomTypeTransform"))
2899+
if (Attr->getValueAsBit("IsStmtDependent"))
29002900
DependentStmtAttrs.push_back(Attr);
29012901

29022902
// Place it in the hierarchy.

0 commit comments

Comments
 (0)