Skip to content

Commit bf440f7

Browse files
committed
[Clang][NFC] Remove trailing whitespace from Attr{,Docs}.td
1 parent 2a0162c commit bf440f7

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

clang/include/clang/Basic/Attr.td

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1916,7 +1916,7 @@ public:
19161916
}
19171917
auto getArgIdents() const { return ArgIdents; }
19181918
auto getArgLocs() const { return ArgLocs; }
1919-
void setParamIdx(size_t Idx, int Val) {
1919+
void setParamIdx(size_t Idx, int Val) {
19201920
assert(Idx < params_Size);
19211921
params_[Idx] = Val;
19221922
}
@@ -4637,7 +4637,7 @@ def HLSLResourceBinding: InheritableAttr {
46374637
let AdditionalMembers = [{
46384638
public:
46394639
enum class RegisterType : unsigned { SRV, UAV, CBuffer, Sampler, C, I };
4640-
4640+
46414641
private:
46424642
RegisterType RegType;
46434643
unsigned SlotNumber;
@@ -4707,7 +4707,7 @@ def HLSLResource : InheritableAttr {
47074707
let Spellings = [];
47084708
let Subjects = SubjectList<[Struct]>;
47094709
let LangOpts = [HLSL];
4710-
let Args = [
4710+
let Args = [
47114711
EnumArgument<
47124712
"ResourceKind", "llvm::hlsl::ResourceKind",
47134713
/*is_string=*/0,
@@ -4732,7 +4732,7 @@ def HLSLResource : InheritableAttr {
47324732

47334733
def HLSLROV : TypeAttr {
47344734
let Spellings = [CXX11<"hlsl", "is_rov">];
4735-
let LangOpts = [HLSL];
4735+
let LangOpts = [HLSL];
47364736
let Documentation = [InternalOnly];
47374737
}
47384738

@@ -4757,7 +4757,7 @@ def HLSLContainedType : TypeAttr {
47574757

47584758
def HLSLRawBuffer : TypeAttr {
47594759
let Spellings = [CXX11<"hlsl", "raw_buffer">];
4760-
let LangOpts = [HLSL];
4760+
let LangOpts = [HLSL];
47614761
let Documentation = [InternalOnly];
47624762
}
47634763

clang/include/clang/Basic/AttrDocs.td

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3943,7 +3943,7 @@ In this case, the capturing entity ``X`` could capture a dangling reference to t
39433943
temporary object.
39443944

39453945
.. code-block:: c++
3946-
3946+
39473947
void addToSet(std::string_view a [[clang::lifetime_capture_by(s)]], std::set<std::string_view>& s) {
39483948
s.insert(a);
39493949
}
@@ -3957,16 +3957,16 @@ temporary object.
39573957

39583958
The capturing entity ``X`` can be one of the following:
39593959

3960-
- Another (named) function parameter.
3961-
3960+
- Another (named) function parameter.
3961+
39623962
.. code-block:: c++
39633963

39643964
void addToSet(std::string_view a [[clang::lifetime_capture_by(s)]], std::set<std::string_view>& s) {
39653965
s.insert(a);
39663966
}
39673967

39683968
- ``this`` (in case of member functions).
3969-
3969+
39703970
.. code-block:: c++
39713971

39723972
class S {
@@ -3977,7 +3977,7 @@ The capturing entity ``X`` can be one of the following:
39773977
};
39783978

39793979
- `global`, `unknown`.
3980-
3980+
39813981
.. code-block:: c++
39823982

39833983
std::set<std::string_view> s;
@@ -4000,7 +4000,7 @@ function by writing the attribute after the function type:
40004000
The attribute supports specifying more than one capturing entities:
40014001

40024002
.. code-block:: c++
4003-
4003+
40044004
void addToSets(std::string_view a [[clang::lifetime_capture_by(s1, s2)]],
40054005
std::set<std::string_view>& s1,
40064006
std::set<std::string_view>& s2) {
@@ -4014,7 +4014,7 @@ statement-local and only detects use of a temporary as an argument to the
40144014
annotated parameter.
40154015

40164016
.. code-block:: c++
4017-
4017+
40184018
void addToSet(std::string_view a [[clang::lifetime_capture_by(s)]], std::set<std::string_view>& s);
40194019
void use() {
40204020
std::set<std::string_view> s;
@@ -7174,8 +7174,8 @@ the field it is attached to, and it may also lead to emission of automatic fix-i
71747174
hints which would help the user replace the use of unsafe functions(/fields) with safe
71757175
alternatives, though the attribute can be used even when the fix can't be automated.
71767176

7177-
* Attribute attached to functions: The attribute does not suppress
7178-
``-Wunsafe-buffer-usage`` inside the function to which it is attached.
7177+
* Attribute attached to functions: The attribute does not suppress
7178+
``-Wunsafe-buffer-usage`` inside the function to which it is attached.
71797179
These warnings still need to be addressed.
71807180

71817181
The attribute is warranted even if the only way a function can overflow
@@ -7238,10 +7238,10 @@ alternatives, though the attribute can be used even when the fix can't be automa
72387238
and then use the attribute on the original ``baz()`` to help the users
72397239
update their code to use the new function.
72407240

7241-
* Attribute attached to fields: The attribute should only be attached to
7242-
struct fields, if the fields can not be updated to a safe type with bounds
7243-
check, such as std::span. In other words, the buffers prone to unsafe accesses
7244-
should always be updated to use safe containers/views and attaching the attribute
7241+
* Attribute attached to fields: The attribute should only be attached to
7242+
struct fields, if the fields can not be updated to a safe type with bounds
7243+
check, such as std::span. In other words, the buffers prone to unsafe accesses
7244+
should always be updated to use safe containers/views and attaching the attribute
72457245
must be last resort when such an update is infeasible.
72467246

72477247
The attribute can be placed on individual fields or a set of them as shown below.
@@ -7259,7 +7259,7 @@ alternatives, though the attribute can be used even when the fix can't be automa
72597259
size_t sz;
72607260
};
72617261

7262-
Here, every read/write to the fields ptr1, ptr2, buf and sz will trigger a warning
7262+
Here, every read/write to the fields ptr1, ptr2, buf and sz will trigger a warning
72637263
that the field has been explcitly marked as unsafe due to unsafe-buffer operations.
72647264

72657265
}];
@@ -7814,10 +7814,10 @@ def HLSLLoopHintDocs : Documentation {
78147814
let Content = [{
78157815
The ``[loop]`` directive allows loop optimization hints to be
78167816
specified for the subsequent loop. The directive allows unrolling to
7817-
be disabled and is not compatible with [unroll(x)].
7817+
be disabled and is not compatible with [unroll(x)].
78187818

78197819
Specifying the parameter, ``[loop]``, directs the
7820-
unroller to not unroll the loop.
7820+
unroller to not unroll the loop.
78217821

78227822
.. code-block:: hlsl
78237823

0 commit comments

Comments
 (0)