FuzzGen icon indicating copy to clipboard operation
FuzzGen copied to clipboard

Compile fuzzgen-preprocessor fail with LLVM 6.0.0

Open Marsman1996 opened this issue 5 years ago • 0 comments

When I compile fuzzgen-preprocessor with LLVM 6.0.0, I get the following error

In file included from /home/ubuntu/llvm-6.0.0/tools/clang/tools/fuzzgen/preprocessor.cpp:41:0:
/home/ubuntu/llvm-6.0.0/tools/clang/tools/fuzzgen/preprocessor.h:210:18: error: ‘virtual void IncludesProcessor::InclusionDirective(clang::SourceLocation, const clang::Token&, llvm::StringRef, bool, clang::CharSourceRange, const clang::FileEntry*, llvm::StringRef, llvm::StringRef, const clang::Module*, clang::SrcMgr::CharacteristicKind)’ marked ‘override’, but does not override
     virtual void InclusionDirective(SourceLocation, const Token &, StringRef, bool, CharSourceRange,

It is because of the arguments of the function InclusionDirective are different. In fuzzgen the InclusionDirective has argument SrcMgr::CharacteristicKind in https://github.com/HexHive/FuzzGen/blob/34411151d58cd9414c1ede4874716c64789efd16/src/preprocessor/preprocessor.h#L210-L212

while LLVM 6.x doesn't.

https://github.com/llvm/llvm-project/blob/release/6.x/clang/include/clang/Lex/PPCallbacks.h#L128

virtual void InclusionDirective(SourceLocation HashLoc,
                                  const Token &IncludeTok,
                                  StringRef FileName,
                                  bool IsAngled,
                                  CharSourceRange FilenameRange,
                                  const FileEntry *File,
                                  StringRef SearchPath,
                                  StringRef RelativePath,
                                  const Module *Imported)

Marsman1996 avatar Nov 25 '20 02:11 Marsman1996