rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.

Seems fine to me, once you add the test for always_destroy + no_destroy.



================
Comment at: clang/include/clang/Basic/LangOptions.def:311
 
+LANGOPT(RegisterStaticDestructors, 1, 1, "Register C++ static destructors")
+
----------------
erik.pilkington wrote:
> rsmith wrote:
> > Should be a `BENIGN_LANGOPT` because it doesn't affect AST construction, 
> > only the generated code.
> It does affect AST construction though, we don't mark a static VarDecl's 
> type's destructor referenced in this mode, or check it's access (because we 
> aren't actually using it). Do you think this is the wrong choice of semantics?
Ah, no, good point. This is right, then. (And I think avoiding checking the 
destructor is also appropriate, so that a private or deleted destructor can be 
used to "remind" people to use the attribute.)


https://reviews.llvm.org/D50994



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to