r237115 - Fix misleading parameter name for PPCallbacks::FileSkipped.
Nikola Smiljanic
popizdeh at gmail.com
Tue May 12 04:48:06 PDT 2015
Author: nikola
Date: Tue May 12 06:48:05 2015
New Revision: 237115
URL: http://llvm.org/viewvc/llvm-project?rev=237115&view=rev
Log:
Fix misleading parameter name for PPCallbacks::FileSkipped.
Patch thanks to Vladimir Voskresensky.
Modified:
cfe/trunk/include/clang/Lex/PPCallbacks.h
cfe/trunk/lib/Frontend/Rewrite/InclusionRewriter.cpp
Modified: cfe/trunk/include/clang/Lex/PPCallbacks.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/PPCallbacks.h?rev=237115&r1=237114&r2=237115&view=diff
==============================================================================
--- cfe/trunk/include/clang/Lex/PPCallbacks.h (original)
+++ cfe/trunk/include/clang/Lex/PPCallbacks.h Tue May 12 06:48:05 2015
@@ -55,11 +55,12 @@ public:
/// \brief Callback invoked whenever a source file is skipped as the result
/// of header guard optimization.
///
- /// \param ParentFile The file that \#included the skipped file.
+ /// \param SkippedFile The file that is skipped instead of entering \#include
///
- /// \param FilenameTok The token in ParentFile that indicates the
- /// skipped file.
- virtual void FileSkipped(const FileEntry &ParentFile,
+ /// \param FilenameTok The file name token in \#include "FileName" directive
+ /// or macro expanded file name token from \#include MACRO(PARAMS) directive.
+ /// Note that FilenameTok contains corresponding quotes/angles symbols.
+ virtual void FileSkipped(const FileEntry &SkippedFile,
const Token &FilenameTok,
SrcMgr::CharacteristicKind FileType) {
}
@@ -337,11 +338,11 @@ public:
Second->FileChanged(Loc, Reason, FileType, PrevFID);
}
- void FileSkipped(const FileEntry &ParentFile,
+ void FileSkipped(const FileEntry &SkippedFile,
const Token &FilenameTok,
SrcMgr::CharacteristicKind FileType) override {
- First->FileSkipped(ParentFile, FilenameTok, FileType);
- Second->FileSkipped(ParentFile, FilenameTok, FileType);
+ First->FileSkipped(SkippedFile, FilenameTok, FileType);
+ Second->FileSkipped(SkippedFile, FilenameTok, FileType);
}
bool FileNotFound(StringRef FileName,
Modified: cfe/trunk/lib/Frontend/Rewrite/InclusionRewriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/Rewrite/InclusionRewriter.cpp?rev=237115&r1=237114&r2=237115&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/Rewrite/InclusionRewriter.cpp (original)
+++ cfe/trunk/lib/Frontend/Rewrite/InclusionRewriter.cpp Tue May 12 06:48:05 2015
@@ -61,7 +61,7 @@ private:
void FileChanged(SourceLocation Loc, FileChangeReason Reason,
SrcMgr::CharacteristicKind FileType,
FileID PrevFID) override;
- void FileSkipped(const FileEntry &ParentFile, const Token &FilenameTok,
+ void FileSkipped(const FileEntry &SkippedFile, const Token &FilenameTok,
SrcMgr::CharacteristicKind FileType) override;
void InclusionDirective(SourceLocation HashLoc, const Token &IncludeTok,
StringRef FileName, bool IsAngled,
@@ -153,7 +153,7 @@ void InclusionRewriter::FileChanged(Sour
/// Called whenever an inclusion is skipped due to canonical header protection
/// macros.
-void InclusionRewriter::FileSkipped(const FileEntry &/*ParentFile*/,
+void InclusionRewriter::FileSkipped(const FileEntry &/*SkippedFile*/,
const Token &/*FilenameTok*/,
SrcMgr::CharacteristicKind /*FileType*/) {
assert(LastInsertedFileChange != FileChanges.end() && "A file, that wasn't "
More information about the cfe-commits
mailing list