[PATCH] D59934: Compare SourceLocations from different TUs by FileID

2019-07-23 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 abandoned this revision. gamesh411 added a comment. 32f220c5fbe5 is the more sophisticated solution to the problem. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59934/new/ https://

[PATCH] D59934: Compare SourceLocations from different TUs by FileID

2019-06-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Is it a better fix to change getMacroInfoForLocation? static const MacroInfo *getMacroInfoForLocation(const Preprocessor &PP, const SourceManager &SM, const IdentifierIn

[PATCH] D59934: Compare SourceLocations from different TUs by FileID

2019-06-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. The following ASTImporterTest reproduces the assert: TEST_P(ASTImporterOptionSpecificTestBase, SourceLocationDifferentTU) { TranslationUnitDecl *ToTU = getToTuDecl("void f1();", Lang_CXX11); Decl *FromTU = getTuDecl("void f2();", Lang_CXX11, "input.cc"); au

[PATCH] D59934: Compare SourceLocations from different TUs by FileID

2019-06-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. The problem has not necessarily do something with macro expansion. If a function is imported in CTU mode and for any reason source locations inside it are compared against source locations in the original TU these locations are (from `SourceManager` point of view) in d

[PATCH] D59934: Compare SourceLocations from different TUs by FileID

2019-03-31 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. In D59934#1449221 , @Szelethus wrote: > Hmm. Is your clang recent enough to contain @bruntib's patch D57892 > ? Is it possible that this patch solves the > same issue? With this patch applied, a

[PATCH] D59934: Compare SourceLocations from different TUs by FileID

2019-03-31 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a subscriber: bruntib. Szelethus added a comment. Hmm. Is your clang recent enough to contain @bruntib's patch D57892 ? Is it possible that this patch solves the same issue? With this patch applied, are you able to get a macro expansions from a d

[PATCH] D59934: Compare SourceLocations from different TUs by FileID

2019-03-31 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. In D59934#1449109 , @Szelethus wrote: > I would still like to learn more about this issue. I am somewhat afraid that > the our macro expansion is faulty. Can you provide a stacktrace maybe? The stack trace that belongs to the

[PATCH] D59934: Compare SourceLocations from different TUs by FileID

2019-03-31 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I would still like to learn more about this issue. I am somewhat afraid that the our macro expansion is faulty. Can you provide a stacktrace maybe? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59934/new/ https://reviews.llvm.org/D5993

[PATCH] D59934: Compare SourceLocations from different TUs by FileID

2019-03-30 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. In D59934#1446059 , @lebedev.ri wrote: > Test? Thanks for the remark :) I agree, that there should be at least a unit test asserting the right behaviour. I am working on it. Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D59934: Compare SourceLocations from different TUs by FileID

2019-03-30 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. Just have a bit more context, I have the following information from a debug session at the execution point of the unreachable: (rr) p LHS.dump(*this) ./tmux-2.8/compat/tree.h:721:9 (rr) p RHS.dump(*this) ./tmux-2.8/arg

[PATCH] D59934: Compare SourceLocations from different TUs by FileID

2019-03-30 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. In D59934#1446736 , @Szelethus wrote: > In D59934#1446051 , @gamesh411 wrote: > > > Hi! > > > > This issue came up during the generation BugReports of BugPaths containing > > macro-expans

[PATCH] D59934: Compare SourceLocations from different TUs by FileID

2019-03-28 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a reviewer: Szelethus. Szelethus added a comment. In D59934#1446051 , @gamesh411 wrote: > Hi! > > This issue came up during the generation BugReports of BugPaths containing > macro-expansions, where the spelling location and expansion loca

[PATCH] D59934: Compare SourceLocations from different TUs by FileID

2019-03-28 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Test? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59934/new/ https://reviews.llvm.org/D59934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[PATCH] D59934: Compare SourceLocations from different TUs by FileID

2019-03-28 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. Hi! This issue came up during the generation BugReports of BugPaths containing macro-expansions, where the spelling location and expansion locations were in different files. With this change, we make such SourceLocations comparable by their FileIDs. Repository: rC

[PATCH] D59934: Compare SourceLocations from different TUs by FileID

2019-03-28 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 created this revision. Herald added subscribers: cfe-commits, jdoerfert, Szelethus, dkrupp. Herald added a project: clang. The comparison of SourceLocations is extended to handle locations from different translation units, making the comparison based on the corresponding FileID. Reposi