Skip to content

Commit

Permalink
Corrected check for declaration attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
SquaredTiki committed Jan 12, 2016
1 parent 6b7eb00 commit 9ced244
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Parse/ParsePattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ Parser::parseParameterClause(SourceLoc &leftParenLoc,
// Check if attribute is invalid type attribute
// and actually a declaration attribute
if (TypeAttributes::getAttrKindFromString(nextToken.getText()) == TAK_Count
&& DeclAttribute::getAttrKindFromString(nextToken.getText()) != TAK_Count) {
&& DeclAttribute::getAttrKindFromString(nextToken.getText()) != DAK_Count) {
SourceLoc AtLoc = consumeToken(tok::at_sign);
SourceLoc AttrLoc = consumeToken(tok::identifier);
diagnose(AtLoc, diag::decl_attribute_applied_to_type)
Expand Down

0 comments on commit 9ced244

Please sign in to comment.