This is an archive of the discontinued LLVM Phabricator instance.

[AST] Fix comparison to of SourceRanges in container
ClosedPublic

Authored by steveire on Apr 18 2021, 5:34 AM.

Diff Detail

Event Timeline

steveire requested review of this revision.Apr 18 2021, 5:34 AM
steveire created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptApr 18 2021, 5:34 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
njames93 added inline comments.Apr 18 2021, 8:37 AM
clang/lib/Tooling/NodeIntrospection.cpp
47

Maybe we should assert the ranges (or locations) are valid before inserting. Will require modification to the generator script but it would make subsequent handling simpler.

steveire added inline comments.Apr 18 2021, 10:24 AM
clang/lib/Tooling/NodeIntrospection.cpp
47

I don't think I agree, but I think that's a different patch. We should fix the bug for now.

njames93 accepted this revision.Apr 19 2021, 1:11 PM
njames93 added inline comments.
clang/lib/Tooling/NodeIntrospection.cpp
47

Fair enough, though this doesn't seem a great solution, Semantics of Sourcelocation comparisons for invalid source lox

This revision is now accepted and ready to land.Apr 19 2021, 1:11 PM