We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e97db8 commit 0807966Copy full SHA for 0807966
clang/lib/Parse/Parser.cpp
@@ -1484,6 +1484,18 @@ Decl *Parser::ParseFunctionDefinition(ParsingDeclarator &D,
1484
if (LateParsedAttrs)
1485
ParseLexedAttributeList(*LateParsedAttrs, Res, false, true);
1486
1487
+ if (Res) {
1488
+ for (const auto *FD : Res->redecls()) {
1489
+ if (FD == Res)
1490
+ continue;
1491
+ if (Res->hasAttr<RequiresCapabilityAttr>() &&
1492
+ !FD->hasAttr<RequiresCapabilityAttr>()) {
1493
+ // Definition has attribute, but the declaration doesn't.
1494
+ llvm::errs() << "AHA!\n";
1495
+ }
1496
1497
1498
+
1499
return ParseFunctionStatementBody(Res, BodyScope);
1500
}
1501
0 commit comments