This revision was automatically updated to reflect the committed changes.
kadircet marked an inline comment as done.
Closed by commit rG411a254af3ff: [clang] Make sure argument expansion locations
are correct in presence of… (authored by kadircet).
Changed prior to commit:
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
Comment at: clang/lib/Basic/SourceManager.cpp:1816
+ } else if (IncludeLoc.isValid()) {
+// If file wasn't included from FID, there is no more
kadircet updated this revision to Diff 259332.
kadircet marked an inline comment as done.
kadircet added a comment.
- address comments
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78649/new/
https://reviews.llvm.org/D78649
Files:
kadircet marked 4 inline comments as done.
kadircet added inline comments.
Comment at: clang/lib/Lex/PPLexerChange.cpp:420
+ // Predefines file doesn't have a valid include location.
+ CurPPLexer->FID == getPredefinesFileID())) {
// Notify SourceManager to
sammccall added inline comments.
Comment at: clang/lib/Basic/SourceManager.cpp:1805
+ // macro args expanded in the main file.
+ if (Entry.getFile().Filename == "" && FID == getMainFileID()) {
+if (Entry.getFile().NumCreatedFIDs)
nit: reverse
kadircet created this revision.
kadircet added a reviewer: sammccall.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Macro argument expansion logic relies on skipping file IDs that created
as a result of an include. Unfortunately it fails to do that for
predefined buffer