Skip to content

Compile fuzzgen-preprocessor fail with LLVM 6.0.0 #14

Description

@Marsman1996

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions