Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile fuzzgen-preprocessor fail with LLVM 6.0.0 #14

Open
Marsman1996 opened this issue Nov 25, 2020 · 0 comments · May be fixed by #23
Open

Compile fuzzgen-preprocessor fail with LLVM 6.0.0 #14

Marsman1996 opened this issue Nov 25, 2020 · 0 comments · May be fixed by #23

Comments

@Marsman1996
Copy link
Contributor

Marsman1996 commented Nov 25, 2020

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

virtual void InclusionDirective(SourceLocation, const Token &, StringRef, bool, CharSourceRange,
const FileEntry *, StringRef, StringRef, const clang::Module *,
SrcMgr::CharacteristicKind) override;

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 Marsman1996 changed the title Compile fuzzgen-preprocessor fail with LLVM 6..0.0 Compile fuzzgen-preprocessor fail with LLVM 6.0.0 Nov 25, 2020
@irwincong irwincong linked a pull request Aug 13, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant