rsmith added inline comments.
================
Comment at: clang/include/clang/AST/DeclCXX.h:779
+ bool mayBeDynamicClass() const {
+ return !isCompleteDefinition() || isDynamicClass();
+ }
----------------
`isCompleteDefinition` checks whether this declaration of the class is a
definition, not whether it has a definition anywhere; the latter is what you
need here. You can use `hasDefinition` to check that.
Please also check `hasAnyDependentBases()` (or add a comment to this function
to indicate that it may return `false` for a templated class whose
instantiations might be dynamic classes) -- if a class has dependent bases, we
might not find out that it's a dynamic class until it's instantiated.
================
Comment at: clang/lib/CodeGen/CGExprScalar.cpp:1626-1627
+
+ // Casting to pointer that does not carry dynamic information (provided
by
+ // invariant.group) requires stripping it.
+ Src = Builder.CreateStripInvariantGroup(Src);
----------------
Are there any cases where we need a barrier when the destination type is a
dynamic type here?
Repository:
rL LLVM
https://reviews.llvm.org/D47299
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits