This is an archive of the discontinued LLVM Phabricator instance.

-Wdeprecated: Use noexcept rather than throw() where supported
ClosedPublic

Authored by dblaikie on Aug 5 2015, 2:27 PM.

Details

Summary

I've copy/pasted the LLVM_NOEXCEPT definition macro goo from LLVM's Compiler.h. Is there somewhere I should put this in Compiler RT? Is there a useful header to define/share things like this?

Diff Detail

Repository
rL LLVM

Event Timeline

dblaikie updated this revision to Diff 31395.Aug 5 2015, 2:27 PM
dblaikie retitled this revision from to -Wdeprecated: Use noexcept rather than throw() where supported.
dblaikie added a reviewer: samsonov.
dblaikie updated this object.
dblaikie added a subscriber: llvm-commits.
samsonov edited edge metadata.Aug 5 2015, 2:35 PM

The correct header for this is lib/sanitizer_common/sanitizer_internal_defs.h. BTW we already have NOTHROW define there, but it does smth. different.

lib/tsan/rtl/tsan_new_delete.cc
39 ↗(On Diff #31395)

Huh?

dblaikie updated this revision to Diff 31421.Aug 5 2015, 5:22 PM
dblaikie edited edge metadata.

Move macro goo to lib/sanitizer_common/sanitizer_internal_defs.h

samsonov added inline comments.Aug 5 2015, 6:10 PM
lib/sanitizer_common/sanitizer_internal_defs.h
122 ↗(On Diff #31421)

This is irrelevant

130 ↗(On Diff #31421)

This (together with MSC_PREREQ def) can probably go to sanitizer_platform.h (where we define which OS are not supported).

140 ↗(On Diff #31421)

Please move this below (under //Platform-specific defs) for consistency. I also don't quite like defining one macro via another (their order becomes important).

dblaikie updated this revision to Diff 31480.Aug 6 2015, 3:33 PM

Address Alexey's feedback

samsonov accepted this revision.Aug 6 2015, 6:01 PM
samsonov edited edge metadata.

LGTM

lib/sanitizer_common/sanitizer_internal_defs.h
146 ↗(On Diff #31480)

Please don't define one macro through another. Also, this macro seem to be unused, maybe we can just delete it?

166 ↗(On Diff #31480)

Indentation and below:

#if blah
# define FOO bar
#endif
lib/sanitizer_common/sanitizer_platform.h
145 ↗(On Diff #31480)

Remove reference to LLVM_MSC_PREREQ

This revision is now accepted and ready to land.Aug 6 2015, 6:01 PM
This revision was automatically updated to reflect the committed changes.