[PATCH] D34506: Relax an assert in the comparison of source locations

2017-06-27 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D34506#791089, @akyrtzi wrote: > Comparing SourceLocations from different translation units is not meaningful > and my concern is that treating source locations like this can very easily > lead to errors where by mistake the code is resolvi

[PATCH] D34506: Relax an assert in the comparison of source locations

2017-06-26 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi added a comment. `FullSourceLoc` could be useful, it wraps the SourceManager that the SourceLocation come from. Repository: rL LLVM https://reviews.llvm.org/D34506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm

[PATCH] D34506: Relax an assert in the comparison of source locations

2017-06-26 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi added a comment. Comparing SourceLocations from different translation units is not meaningful and my concern is that treating source locations like this can very easy lead to errors where by mistake the code is resolving a SourceLocation with the wrong translation unit and not the trans

[PATCH] D34506: Relax an assert in the comparison of source locations

2017-06-26 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D34506#787971, @joerg wrote: > I don't think it is a good idea to make this function non-transitive. I think this is a good point. However, I am not entirely sure that it is transitive right now. Check the "Both are in built-in buffers, bu

[PATCH] D34506: Relax an assert in the comparison of source locations

2017-06-22 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. I don't think it is a good idea to make this function non-transitive. Repository: rL LLVM https://reviews.llvm.org/D34506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D34506: Relax an assert in the comparison of source locations

2017-06-22 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Note that, it is not easy to add a test case for this patch without the https://reviews.llvm.org/D30691 being accepted. Repository: rL LLVM https://reviews.llvm.org/D34506 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D34506: Relax an assert in the comparison of source locations

2017-06-22 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun created this revision. Right now source locations from different translation units can not be compared. This is a problem for an upcoming feature in the Static Analyzer, the cross translation unit support (https://reviews.llvm.org/D30691). It would be great to be able to sort the sou