[PATCH] D46112: Allow _Atomic to be specified on incomplete types
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 14 06:44:55 PDT 2018
aaron.ballman marked 8 inline comments as done.
aaron.ballman added inline comments.
================
Comment at: lib/Sema/SemaType.cpp:7604-7608
+ // When instantiating a class template and reaching an atomic type, the check
+ // for type completeness should occur on the underlying type and not the
+ // atomic type itself (which is always incomplete).
+ if (inTemplateInstantiation() && T->isAtomicType())
+ T = cast<AtomicType>(T)->getValueType();
----------------
rsmith wrote:
> This function is duplicating the work of finding the type to complete, which was already done by `isIncompleteType`. Rather than unwrapping `T` here...
Thank you for the explanation!
https://reviews.llvm.org/D46112
More information about the cfe-commits
mailing list