Skip to content

Commit dcf53dc

Browse files
committed
[AST] Make DeclAttributes::getAttribute() propagate its AllowInvalid bit.
Because, you know, I’d like it to do what it says it does.
1 parent bc0a18f commit dcf53dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/swift/AST/Attr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1385,7 +1385,7 @@ class DeclAttributes {
13851385
/// Retrieve the first attribute of the given attribute class.
13861386
template <typename ATTR>
13871387
const ATTR *getAttribute(bool AllowInvalid = false) const {
1388-
return const_cast<DeclAttributes *>(this)->getAttribute<ATTR>();
1388+
return const_cast<DeclAttributes *>(this)->getAttribute<ATTR>(AllowInvalid);
13891389
}
13901390

13911391
template <typename ATTR>

0 commit comments

Comments
 (0)