This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Fix an assertion fail in hash generation.
ClosedPublic

Authored by xazax.hun on Mar 16 2016, 6:32 AM.

Details

Summary

In case the (uniqueing) location of the diagnostic is in a line that only contains whitespaces there was an assertion fail during issue hash generation.

This error was reproduced by an internal checker that warned when the header guard is missing in a header. The location of the warning was the sart location of the header file which might only contain whitespaces in some cases.

Unfortunately I am unable to reproduce this error with the built in checkers, so no there is no failing test case with this patch. It would be easy to wrote a custom debug checker for that purpuse but I think it might not worth the effort.

Diff Detail

Repository
rL LLVM

Event Timeline

xazax.hun updated this revision to Diff 50819.Mar 16 2016, 6:32 AM
xazax.hun retitled this revision from to [analyzer] Fix an assertion fail in hash generation..
xazax.hun updated this object.
xazax.hun added reviewers: dcoughlin, zaks.anna.
xazax.hun added subscribers: cfe-commits, dkrupp.
zaks.anna accepted this revision.Mar 29 2016, 4:29 PM
zaks.anna edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Mar 29 2016, 4:29 PM
This revision was automatically updated to reflect the committed changes.