aaron.ballman added inline comments.
================ Comment at: clang/include/clang/Basic/Attr.td:3873 + let Subjects = SubjectList<[Function]>; + let LateParsed = 1; + let Documentation = [DiagnoseAsBuiltinDocs]; ---------------- Why does this need to be late parsed? I don't think the arguments to the attribute are ones that name class members or anything like that. ================ Comment at: clang/lib/Sema/SemaDeclAttr.cpp:1006-1009 + const auto *DeclFD = dyn_cast<FunctionDecl>(D); + if (!DeclFD) + // User will have already been warned. + return; ---------------- aaron.ballman wrote: > Sorry, I should have suggested this earlier -- might as well assert if `D` is > something we should have already validated is a `FunctionDecl` before calling > this helper. Sorry, my suggestion wasn't as clear as it could have been -- `cast<>` does the assertion for you, so you can switch `dyn_cast` to `cast` and remove the explicit `assert` here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112024/new/ https://reviews.llvm.org/D112024 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits