[PATCH] Fixed misleading parameter name for PPCallbacks::FileSkipped
Vladimir Voskresensky
voskresensky.vladimir at gmail.com
Tue May 12 03:33:26 PDT 2015
updated comments
http://reviews.llvm.org/D9109
Files:
include/clang/Lex/PPCallbacks.h
lib/Frontend/Rewrite/InclusionRewriter.cpp
Index: include/clang/Lex/PPCallbacks.h
===================================================================
--- include/clang/Lex/PPCallbacks.h
+++ include/clang/Lex/PPCallbacks.h
@@ -54,11 +54,12 @@
/// \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) {
}
@@ -336,11 +337,11 @@
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,
Index: lib/Frontend/Rewrite/InclusionRewriter.cpp
===================================================================
--- lib/Frontend/Rewrite/InclusionRewriter.cpp
+++ lib/Frontend/Rewrite/InclusionRewriter.cpp
@@ -61,7 +61,7 @@
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 @@
/// 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 "
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9109.25568.patch
Type: text/x-patch
Size: 2874 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150512/7310998d/attachment.bin>
More information about the cfe-commits
mailing list