[clang-tools-extra] r370081 - Use FileEntryRef for PPCallbacks::HasInclude
Alex Lorenz via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 27 10:32:43 PDT 2019
Author: arphaman
Date: Tue Aug 27 10:32:42 2019
New Revision: 370081
URL: http://llvm.org/viewvc/llvm-project?rev=370081&view=rev
Log:
Use FileEntryRef for PPCallbacks::HasInclude
This fixes the issue where a filename dependendency was missing if the file that
was referenced with __has_include() was accessed through a symlink in an earlier run,
if the file manager was reused between runs.
Modified:
clang-tools-extra/trunk/clang-tidy/ExpandModularHeadersPPCallbacks.cpp
clang-tools-extra/trunk/clang-tidy/ExpandModularHeadersPPCallbacks.h
Modified: clang-tools-extra/trunk/clang-tidy/ExpandModularHeadersPPCallbacks.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/ExpandModularHeadersPPCallbacks.cpp?rev=370081&r1=370080&r2=370081&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/ExpandModularHeadersPPCallbacks.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/ExpandModularHeadersPPCallbacks.cpp Tue Aug 27 10:32:42 2019
@@ -210,7 +210,7 @@ void ExpandModularHeadersPPCallbacks::Pr
parseToLocation(Loc);
}
void ExpandModularHeadersPPCallbacks::HasInclude(SourceLocation Loc, StringRef,
- bool, const FileEntry *,
+ bool, Optional<FileEntryRef>,
SrcMgr::CharacteristicKind) {
parseToLocation(Loc);
}
Modified: clang-tools-extra/trunk/clang-tidy/ExpandModularHeadersPPCallbacks.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/ExpandModularHeadersPPCallbacks.h?rev=370081&r1=370080&r2=370081&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/ExpandModularHeadersPPCallbacks.h (original)
+++ clang-tools-extra/trunk/clang-tidy/ExpandModularHeadersPPCallbacks.h Tue Aug 27 10:32:42 2019
@@ -83,7 +83,7 @@ private:
void PragmaDiagnosticPop(SourceLocation Loc, StringRef) override;
void PragmaDiagnostic(SourceLocation Loc, StringRef, diag::Severity,
StringRef) override;
- void HasInclude(SourceLocation Loc, StringRef, bool, const FileEntry *,
+ void HasInclude(SourceLocation Loc, StringRef, bool, Optional<FileEntryRef> ,
SrcMgr::CharacteristicKind) override;
void PragmaOpenCLExtension(SourceLocation NameLoc, const IdentifierInfo *,
SourceLocation StateLoc, unsigned) override;
More information about the cfe-commits
mailing list