[PATCH] D67509: [CUDA][HIP] Fix hostness of defaulted constructor
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 19 09:11:58 PDT 2019
tra added inline comments.
================
Comment at: lib/Sema/SemaCUDA.cpp:273-274
+ MemberDecl->hasAttr<CUDAHostAttr>();
+ if (!InClass || hasAttr)
+ return false;
+
----------------
A comment here would be helpful.
I think the intent here is to look for implicit special members with *explicitly* set attributes.
We have number of cases where we set H/D attributes implicitly. I'm not sure whether we ever see any of them here, but if we do, it will sneak through this check. I think a check for whether the attribute is explicit would be prudent.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67509/new/
https://reviews.llvm.org/D67509
More information about the cfe-commits
mailing list