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

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 3 03:38:34 PDT 2019


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 different TUs. But from TU point of view these are in the same TU because the AST import (AST import keeps the original filename and location in the new source location, so the new `SourceLocation` is in the same TU but different source file). Maybe this is a new case related to CTU mode in the compare function so it is correct to handle this case too (without assert).


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59934/new/

https://reviews.llvm.org/D59934





More information about the cfe-commits mailing list