weixin_39822993 2020-11-30 11:25
浏览 0

Clang r151489 changed constructor representation on CXXNewExpr, iwyu doesn't compile

Originally reported on Google Code with ID 65


$ g++ -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -fno-rtti
-I include -L lib *.cc -lclangFrontend -lclangSerialization -lclangDriver -lclangSema
-lclangAnalysis -lclangAST -lclangParse -lclangLex -lclangBasic -lLLVMipo -lLLVMScalarOpts
-lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC
-lLLVMCore -lLLVMSupport -lpthread -ldl -lm -o include-what-you-use
iwyu_ast_util.cc: In function ‘std::map<const clang::type const> include_what_you_use::GetTplTypeResugarMapForFunction(const
clang::FunctionDecl*, const clang::Expr*)’:
iwyu_ast_util.cc:676:50: error: ‘class clang::CXXNewExpr’ has no member named ‘getConstructorArgs’
iwyu_ast_util.cc:677:26: error: ‘const class clang::CXXNewExpr’ has no member named
‘getNumConstructorArgs’
iwyu.cc: In member function ‘bool include_what_you_use::BaseAstVisitor<derived>::TraverseCXXNewExpr(clang::CXXNewExpr*)’:
iwyu.cc:897:56: error: ‘class clang::CXXNewExpr’ has no member named ‘getConstructor’
iwyu.cc: In member function ‘bool include_what_you_use::IwyuBaseAstVisitor<derived>::VisitCXXNewExpr(clang::CXXNewExpr*)’:
iwyu.cc:2310:35: error: ‘class clang::CXXNewExpr’ has no member named ‘getConstructorArgs’
iwyu.cc:2311:35: error: ‘class clang::CXXNewExpr’ has no member named ‘getNumConstructorArgs’
iwyu.cc:2312:35: error: ‘class clang::CXXNewExpr’ has no member named ‘getConstructor’

</derived></derived></const>

Reported by peter.waller on 2012-02-27 18:47:26

该提问来源于开源项目:include-what-you-use/include-what-you-use

  • 写回答

18条回答 默认 最新

  • weixin_39822993 2020-11-30 11:25
    关注
    
    Just to clarify, this change doesn't happen in r151489, but that is the revision I tested
    against.
    

    Reported by peter.waller on 2012-02-27 18:48:11

    评论

报告相同问题?