[cfe-commits] [Patch] -Wignored-qualifiers should point to the first ignored qualifier
Douglas Gregor
dgregor at apple.com
Thu Jun 2 19:22:52 PDT 2011
On Jun 2, 2011, at 2:08 AM, Hans Wennborg wrote:
> On Wed, Jun 1, 2011 at 9:20 PM, Douglas Gregor <dgregor at apple.com> wrote:
>> This is looking really good. The only issue I see is when comparing source locations with <, e.g.,
>>
>> + if (!Loc.isValid() || ConstQualLoc < Loc)
>> + Loc = ConstQualLoc;
>>
>> The < operator on SourceLocation doesn't necessarily mean "before in the translation"; it's a somewhat arbitrary total ordering useful mainly for use in std::map or std::set.
>>
>> Instead, I suggest using SourceManager::isBeforeInTranslationUnit().
>
> Thanks Doug! New patch attached.
Patch looks good! If you have commit access, please go ahead and commit. If not, please follow the directions here
http://llvm.org/docs/DeveloperPolicy.html#commitaccess
so you can commit patches after approval. Thanks!
- Doug
More information about the cfe-commits
mailing list