@@ -25,9 +25,9 @@ class RestrictedIncludesPPCallbacks
25
25
public:
26
26
explicit RestrictedIncludesPPCallbacks (
27
27
RestrictSystemLibcHeadersCheck &Check, const SourceManager &SM,
28
- const SmallString<128 > CompilerIncudeDir )
28
+ const SmallString<128 > CompilerIncludeDir )
29
29
: portability::RestrictedIncludesPPCallbacks(Check, SM),
30
- CompilerIncudeDir(CompilerIncudeDir ) {}
30
+ CompilerIncludeDir(CompilerIncludeDir ) {}
31
31
32
32
void InclusionDirective (SourceLocation HashLoc, const Token &IncludeTok,
33
33
StringRef FileName, bool IsAngled,
@@ -38,7 +38,7 @@ class RestrictedIncludesPPCallbacks
38
38
SrcMgr::CharacteristicKind FileType) override ;
39
39
40
40
private:
41
- const SmallString<128 > CompilerIncudeDir ;
41
+ const SmallString<128 > CompilerIncludeDir ;
42
42
};
43
43
44
44
} // namespace
@@ -49,7 +49,7 @@ void RestrictedIncludesPPCallbacks::InclusionDirective(
49
49
StringRef SearchPath, StringRef RelativePath, const Module *SuggestedModule,
50
50
bool ModuleImported, SrcMgr::CharacteristicKind FileType) {
51
51
// Compiler provided headers are allowed (e.g stddef.h).
52
- if (SrcMgr::isSystem (FileType) && SearchPath == CompilerIncudeDir )
52
+ if (SrcMgr::isSystem (FileType) && SearchPath == CompilerIncludeDir )
53
53
return ;
54
54
portability::RestrictedIncludesPPCallbacks::InclusionDirective (
55
55
HashLoc, IncludeTok, FileName, IsAngled, FilenameRange, File, SearchPath,
@@ -58,11 +58,11 @@ void RestrictedIncludesPPCallbacks::InclusionDirective(
58
58
59
59
void RestrictSystemLibcHeadersCheck::registerPPCallbacks (
60
60
const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) {
61
- SmallString<128 > CompilerIncudeDir =
61
+ SmallString<128 > CompilerIncludeDir =
62
62
StringRef (PP->getHeaderSearchInfo ().getHeaderSearchOpts ().ResourceDir );
63
- llvm::sys::path::append (CompilerIncudeDir , " include" );
63
+ llvm::sys::path::append (CompilerIncludeDir , " include" );
64
64
PP->addPPCallbacks (std::make_unique<RestrictedIncludesPPCallbacks>(
65
- *this , SM, CompilerIncudeDir ));
65
+ *this , SM, CompilerIncludeDir ));
66
66
}
67
67
68
68
} // namespace clang::tidy::llvm_libc
0 commit comments