同人誌を書くやつ

同人誌を書くやつ

  • お腹が空いて力がでない…

# LLVMとか

エラーっぽい

1
2
3
4
5
6
FAILED: tools/clang/lib/Parse/CMakeFiles/obj.clangParse.dir/ParseCbC.cpp.o
/usr/local/gcc9/bin/g++  -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/clang/lib/Parse -I/mnt/dalmore-home/one/src/CbC_llvm/clang/lib/Parse -I/mnt/dalmore-home/one/src/CbC_llvm/clang/include -Itools/clang/include -I/usr/include/libxml2 -Iinclude -I/mnt/dalmore-home/one/src/CbC_llvm/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -fno-common -Woverloaded-virtual -fno-strict-aliasing -g    -fno-exceptions -fno-rtti -std=c++14 -MD -MT tools/clang/lib/Parse/CMakeFiles/obj.clangParse.dir/ParseCbC.cpp.o -MF tools/clang/lib/Parse/CMakeFiles/obj.clangParse.dir/ParseCbC.cpp.o.d -o tools/clang/lib/Parse/CMakeFiles/obj.clangParse.dir/ParseCbC.cpp.o -c /mnt/dalmore-home/one/src/CbC_llvm/clang/lib/Parse/ParseCbC.cpp
/mnt/dalmore-home/one/src/CbC_llvm/clang/lib/Parse/ParseCbC.cpp: In member function 'clang::ExprResult clang::Parser::Prepare__envForGotoWithTheEnvExpr()':
/mnt/dalmore-home/one/src/CbC_llvm/clang/lib/Parse/ParseCbC.cpp:260:166: error: cannot bind rvalue reference of type 'clang::ParsedAttributes&&' to lvalue of type 'clang::ParsedAttributes'
  260 |                                                          star_DS.getRestrictSpecLoc(),star_DS.getAtomicSpecLoc(),star_DS.getUnalignedSpecLoc()),star_DS.getAttributes(),SourceLocation());
      |                                                                                                                                                 ~~~~~~~~~~~~~~~~~~~~~^~

ParseCbCのそれっぽい場所

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
  // cast
  ParsedType CastTy;
  DeclSpec void_DS(AttrFactory);
  setTST(&void_DS, DeclSpec::TST_void);
  Declarator DeclaratorInfo(void_DS, DeclaratorContext::TypeNameContext);
  DeclSpec star_DS(AttrFactory);
  star_DS.Finish(Actions, Actions.getASTContext().getPrintingPolicy());
  DeclaratorInfo.ExtendWithDeclSpec(star_DS);
  DeclaratorInfo.SetIdentifier(nullptr, Tok.getLocation());
  DeclaratorInfo.AddTypeInfo(DeclaratorChunk::getPointer(star_DS.getTypeQualifiers(), Loc,star_DS.getConstSpecLoc(),star_DS.getVolatileSpecLoc(),
                                                         star_DS.getRestrictSpecLoc(),star_DS.getAtomicSpecLoc(),star_DS.getUnalignedSpecLoc()),star_DS.getAttributes(),SourceLocation());
 

なんかこの関数の呼び出しで死んでそうな気がする

./clang/include/clang/Sema/DeclSpec.h

DeclaratorInfo.AddTypeInfo(DeclaratorChunk::getPointer(star_DS.getTypeQualifiers(), Loc,star_DS.getConstSpecLoc(),star_DS.getVolatileSpecLoc(),

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
  /// AddTypeInfo - Add a chunk to this declarator. Also extend the range to
  /// EndLoc, which should be the last token of the chunk.
  /// This function takes attrs by R-Value reference because it takes ownership
  /// of those attributes from the parameter.
  void AddTypeInfo(const DeclaratorChunk &TI, ParsedAttributes &&attrs,
                   SourceLocation EndLoc) {
    DeclTypeInfo.push_back(TI);
    DeclTypeInfo.back().getAttrs().addAll(attrs.begin(), attrs.end());
    getAttributePool().takeAllFrom(attrs.getPool());

    if (!EndLoc.isInvalid())
      SetRangeEnd(EndLoc);
  }
Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy