rsmith added inline comments.
================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:9733
return true;
return false;
};
----------------
This is not the right fallback answer if the class is a dependent type -- we
don't yet know if there's a non-deleted copy or move constructor if one might
be implicitly declared, so we should conservatively assume that there might be
one. It'd probably be easiest to return `true` from this function at the very
start if the type is dependent (because we don't know if there's a non-deleted
copy or move constructor).
================
Comment at: clang/test/SemaObjCXX/attr-trivial-abi.mm:59-62
+template <class T>
+struct __attribute__((trivial_abi)) S10 { // expected-warning {{'trivial_abi'
cannot be applied to 'S10}}' expected-note {{copy constructors and move
constructors are all deleted}}
T p;
};
----------------
We should not diagnose this, because instantiations of this template might have
non-deleted copy or move constructors. (We don't know yet when parsing the
template definition.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83263/new/
https://reviews.llvm.org/D83263
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits