eugenis added a comment. What happens if the attribute is used with the "= default" destructor?
================ Comment at: lib/CodeGen/CGClass.cpp:1483 @@ -1483,1 +1482,3 @@ + if (CGM.getCodeGenOpts().SanitizeMemoryUseAfterDtor + && CurFn->hasFnAttribute(llvm::Attribute::SanitizeMemory)) EmitDtorSanitizerCallback(*this, Dtor); ---------------- I think it would be cleaner to use CodegenFunction::SanOpts ================ Comment at: test/CodeGenCXX/sanitize-dtor-callback.cpp:22 @@ +21,3 @@ +No_San ns; +// Repressing the sanitization attribute results in no msan +// instrumentation of the destructor ---------------- Maybe move this to a separate test file? This one gets cluttered; for example, tail call is a completely orthogonal issue and attribute test should not have to deal with it. ================ Comment at: test/CodeGenCXX/sanitize-dtor-callback.cpp:25 @@ +24,3 @@ +// CHECK: define {{.*}}No_SanD1Ev{{.*}} [[ATTRIBUTE:#[0-9]+]] +// CHECK-NOT: {{^ *}}call void @__sanitizer_dtor_callback +// CHECK: ret void ---------------- Remove {{^ }} to make the check stronger. http://reviews.llvm.org/D11727 _______________________________________________ cfe-commits mailing list cfe-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits