[PATCH] D20855: [include-fixer] use includer of .inc header to be the file path of a symbol from .inc header.
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 1 04:31:59 PDT 2016
bkramer accepted this revision.
This revision is now accepted and ready to land.
================
Comment at: include-fixer/find-all-symbols/PathConfig.cpp:20
@@ +19,3 @@
+ llvm::StringRef FilePath;
+ while (true) {
+ if (!Loc.isValid() || SM.isInMainFile(Loc))
----------------
Maybe add a comment that we walk up the include stack for .inc files?
================
Comment at: include-fixer/find-all-symbols/PathConfig.cpp:33
@@ +32,3 @@
+ // If Collector is not nullptr, check pragma remapping header.
+ FilePath = Collector ? Collector->getMappedHeader(FilePath) : FilePath;
+
----------------
Not your fault here, but I'd really prefer
```
if (Collector)
FilePath = Collector->getMappedHeader(FilePath);
```
http://reviews.llvm.org/D20855
More information about the cfe-commits
mailing list