[PATCH] D34563: [ubsan] Disable the object-size check at -O0

2017-06-23 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL306181: [ubsan] Disable the object size check at -O0 (authored by vedantk). Changed prior to commit: https://reviews.llvm.org/D34563?vs=103778&id=103796#toc Repository: rL LLVM https://reviews.llvm.

Re: [PATCH] D34563: [ubsan] Disable the object-size check at -O0

2017-06-23 Thread Justin Bogner via cfe-commits
v...@apple.com writes: > Good point, it makes sense to hand users a warning when they explicitly enable > -fsanitize=object-size at -O0. I've added in the diagnostic. PTAL. LGTM. > diff --git a/include/clang/Basic/DiagnosticDriverKinds.td > b/include/clang/Basic/DiagnosticDriverKinds.td > index

[PATCH] D34563: [ubsan] Disable the object-size check at -O0

2017-06-23 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 103778. vsk added a comment. Add a diagnostic for users who explicitly turn the object-size check on at -O0, and tighten up the test a bit. https://reviews.llvm.org/D34563 Files: include/clang/Basic/DiagnosticDriverKinds.td lib/Driver/SanitizerArgs.cpp t

Re: [PATCH] D34563: [ubsan] Disable the object-size check at -O0

2017-06-23 Thread via cfe-commits
Good point, it makes sense to hand users a warning when they explicitly enable -fsanitize=object-size at -O0. I've added in the diagnostic. PTAL. disable-object-size-check-O0.diff Description: Binary data vedantOn Jun 23, 2017, at 1:05 PM, Justin Bogner wrote:+++ test/Driv

Re: [PATCH] D34563: [ubsan] Disable the object-size check at -O0

2017-06-23 Thread Justin Bogner via cfe-commits
Vedant Kumar via Phabricator writes: > vsk created this revision. > > This is motivated by the thread: > [cfe-dev] Disabling ubsan's object size check at -O0 > > I think the driver is the best place to disable a sanitizer check at > particular optimization levels. Doing so in the frontend is messy

[PATCH] D34563: [ubsan] Disable the object-size check at -O0

2017-06-23 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. This is motivated by the thread: [cfe-dev] Disabling ubsan's object size check at -O0 I think the driver is the best place to disable a sanitizer check at particular optimization levels. Doing so in the frontend is messy, and makes it really hard to test IR generation