Re: r249721 - When mapping no_sanitize_* attributes to no_sanitize attributes, handle GNU-style formatting that involves prefix and suffix underscores. Cleans up other usages of similar functionality.

2015-10-08 Thread Adrian Zgorzalek via cfe-commits
to:a...@fb.com>> wrote: On Oct 8, 2015, at 2:17 PM, Richard Smith mailto:rich...@metafoo.co.uk>> wrote: On Thu, Oct 8, 2015 at 2:10 PM, Adrian Zgorzalek via cfe-commits mailto:cfe-commits@lists.llvm.org>> wrote: You are right, my bad, I thought this if covers all the cases, but

Re: r249721 - When mapping no_sanitize_* attributes to no_sanitize attributes, handle GNU-style formatting that involves prefix and suffix underscores. Cleans up other usages of similar functionality.

2015-10-08 Thread Adrian Zgorzalek via cfe-commits
chard Smith mailto:rich...@metafoo.co.uk>> wrote: On Thu, Oct 8, 2015 at 2:10 PM, Adrian Zgorzalek via cfe-commits mailto:cfe-commits@lists.llvm.org>> wrote: You are right, my bad, I thought this if covers all the cases, but part could be empty. Here is the fix Please add a testcase

Re: r249721 - When mapping no_sanitize_* attributes to no_sanitize attributes, handle GNU-style formatting that involves prefix and suffix underscores. Cleans up other usages of similar functionality.

2015-10-08 Thread Adrian Zgorzalek via cfe-commits
2:45 PM, Adrian Zgorzalek mailto:a...@fb.com>> wrote: On Oct 8, 2015, at 2:17 PM, Richard Smith mailto:rich...@metafoo.co.uk>> wrote: On Thu, Oct 8, 2015 at 2:10 PM, Adrian Zgorzalek via cfe-commits mailto:cfe-commits@lists.llvm.org>> wrote: You are right, my bad, I thought this

Re: r249721 - When mapping no_sanitize_* attributes to no_sanitize attributes, handle GNU-style formatting that involves prefix and suffix underscores. Cleans up other usages of similar functionality.

2015-10-08 Thread Adrian Zgorzalek via cfe-commits
On Oct 8, 2015, at 2:17 PM, Richard Smith mailto:rich...@metafoo.co.uk>> wrote: On Thu, Oct 8, 2015 at 2:10 PM, Adrian Zgorzalek via cfe-commits mailto:cfe-commits@lists.llvm.org>> wrote: You are right, my bad, I thought this if covers all the cases, but part could be empty. Her

Re: r249721 - When mapping no_sanitize_* attributes to no_sanitize attributes, handle GNU-style formatting that involves prefix and suffix underscores. Cleans up other usages of similar functionality.

2015-10-08 Thread Adrian Zgorzalek via cfe-commits
You are right, my bad, I thought this if covers all the cases, but part could be empty. Here is the fix: Adrian > On Oct 8, 2015, at 1:52 PM, Aaron Ballman wrote: > > On Thu, Oct 8, 2015 at 4:49 PM, Richard Smith wrote: >> On Thu, Oct 8, 2015 at 1:21 PM, Aaron Ballman >> wrote: >>> >>> On

Re: r249721 - When mapping no_sanitize_* attributes to no_sanitize attributes, handle GNU-style formatting that involves prefix and suffix underscores. Cleans up other usages of similar functionality.

2015-10-08 Thread Adrian Zgorzalek via cfe-commits
Hey! I think you are right. This will not regress any of the cases, because previous behaviour either checked str.size() >= 4 OR didn’t check it at all, but then called .substr(2, str.size() - 4), which would crash. I think, though, that explicitly checking str.size() >= 4 makes sense. See comm

Re: [PATCH] Fix ICE in Clang when dealing with attribute(__no_sanitize_*__)

2015-10-08 Thread Adrian Zgorzalek via cfe-commits
Run clang-format, diff is in SVN format. Please, can you commit on behalf of me unless you are willing to grant me write permission to the repo ;-) Adrian > On Oct 8, 2015, at 11:40 AM, Aaron Ballman wrote: > > On Thu, Oct 8, 2015 at 2:33 PM, Adrian Zgorzalek wrote: >> I so much like this fa

Re: [PATCH] Fix ICE in Clang when dealing with attribute(__no_sanitize_*__)

2015-10-08 Thread Adrian Zgorzalek via cfe-commits
I so much like this fast review cycle :) Comments applied. Adrian > On Oct 8, 2015, at 11:24 AM, Aaron Ballman wrote: > > On Thu, Oct 8, 2015 at 12:46 PM, Adrian Zgorzalek wrote: >> Feedback applied, new patch in the attachment. > > Thank you for working on this! A few comments: > >> From 13f

Re: [PATCH] Fix ICE in Clang when dealing with attribute(__no_sanitize_*__)

2015-10-08 Thread Adrian Zgorzalek via cfe-commits
Feedback applied, new patch in the attachment. Adrian > On Oct 8, 2015, at 8:48 AM, Adrian Zgorzalek wrote: > > Great! I did not notice, that we already have exactly the same logic in > SemaDeclAttr.cpp. > Maybe it would be possible even to refactor it in such a way that this code > is writte

Re: [PATCH] Fix ICE in Clang when dealing with attribute(__no_sanitize_*__)

2015-10-08 Thread Adrian Zgorzalek via cfe-commits
Great! I did not notice, that we already have exactly the same logic in SemaDeclAttr.cpp. Maybe it would be possible even to refactor it in such a way that this code is written only once. Adrian > On Oct 8, 2015, at 6:53 AM, Aaron Ballman wrote: > > (Removing llvm-commits, adding cfe-commits)