Ericsson / clang

Cross Translation Unit analysis capability for Clang Static Analyzer. (Fork of official clang at http://llvm.org/git/clang)
http://clang.llvm.org/
Other
15 stars 10 forks source link

ImportRecordDeclInFuncParams test fails #371

Closed balazske closed 6 years ago

balazske commented 6 years ago
$ ./tools/clang/unittests/AST/ASTTests  --gtest_filter=ImportDecl.ImportRecordDeclInFuncParams
Note: Google Test filter = ImportDecl.ImportRecordDeclInFuncParams
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from ImportDecl
[ RUN      ] ImportDecl.ImportRecordDeclInFuncParams
input.cc:1:25: warning: declaration of 'struct data_t' will not be visible outside of this function [-Wvisibility]
int declToImport(struct data_t{int a;int b;} *d){ return 0; }
                        ^
ASTTests: clang/clang6/llvm/tools/clang/lib/Frontend/TextDiagnosticPrinter.cpp:151: virtual void clang::TextDiagnosticPrinter::HandleDiagnostic(clang::DiagnosticsEngine::Level, const clang::Diagnostic&): Assertion `TextDiag && "Unexpected diagnostic outside source file processing"' failed.
clang/clang6/build/lib/libLLVMSupport.so.6(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x33)[0x7f3b0372c497]
clang/clang6/build/lib/libLLVMSupport.so.6(+0x297528)[0x7f3b0372c528]
clang/clang6/build/lib/libLLVMSupport.so.6(_ZN4llvm3sys17RunSignalHandlersEv+0x76)[0x7f3b0372a910]
clang/clang6/build/lib/libLLVMSupport.so.6(+0x296e2f)[0x7f3b0372be2f]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10330)[0x7f3b03287330]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37)[0x7f3b004efc37]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x7f3b004f3028]
/lib/x86_64-linux-gnu/libc.so.6(+0x2fbf6)[0x7f3b004e8bf6]
/lib/x86_64-linux-gnu/libc.so.6(+0x2fca2)[0x7f3b004e8ca2]
clang/clang6/build/lib/libclangFrontend.so.6(_ZN5clang21TextDiagnosticPrinter16HandleDiagnosticENS_17DiagnosticsEngine5LevelERKNS_10DiagnosticE+0x2f7)[0x7f3b012d9ca9]
clang/clang6/build/lib/libclangBasic.so.6(_ZNK5clang13DiagnosticIDs8EmitDiagERNS_17DiagnosticsEngineENS0_5LevelE+0x71)[0x7f3b0183c233]
clang/clang6/build/lib/libclangBasic.so.6(_ZNK5clang13DiagnosticIDs11ProcessDiagERNS_17DiagnosticsEngineE+0x321)[0x7f3b0183c1b5]
clang/clang6/build/lib/libclangBasic.so.6(+0x1d811b)[0x7f3b0183011b]
clang/clang6/build/lib/libclangBasic.so.6(_ZN5clang17DiagnosticsEngine21EmitCurrentDiagnosticEb+0xe6)[0x7f3b0182cef4]
clang/clang6/build/lib/libclangAST.so.6(+0x32c724)[0x7f3b0243a724]
clang/clang6/build/lib/libclangAST.so.6(+0x32c752)[0x7f3b0243a752]
clang/clang6/build/lib/libclangAST.so.6(_ZN5clang15ASTNodeImporter15ImportDeclPartsEPNS_9NamedDeclERPNS_11DeclContextES5_RNS_15DeclarationNameERS2_RNS_14SourceLocationE+0x249)[0x7f3b02415f09]
clang/clang6/build/lib/libclangAST.so.6(_ZN5clang15ASTNodeImporter15VisitRecordDeclEPNS_10RecordDeclE+0x137)[0x7f3b0241b629]
clang/clang6/build/lib/libclangAST.so.6(+0x344b55)[0x7f3b02452b55]
clang/clang6/build/lib/libclangAST.so.6(_ZN5clang11ASTImporter6ImportEPNS_4DeclE+0xc5)[0x7f3b02437703]
clang/clang6/build/lib/libclangAST.so.6(_ZN5clang15ASTNodeImporter15VisitRecordTypeEPKNS_10RecordTypeE+0x31)[0x7f3b02414c8b]
clang/clang6/build/lib/libclangAST.so.6(+0x34431b)[0x7f3b0245231b]
clang/clang6/build/lib/libclangAST.so.6(_ZN5clang11ASTImporter6ImportENS_8QualTypeE+0x126)[0x7f3b0243738a]
clang/clang6/build/lib/libclangAST.so.6(_ZN5clang15ASTNodeImporter19VisitElaboratedTypeEPKNS_14ElaboratedTypeE+0x96)[0x7f3b0241534e]
clang/clang6/build/lib/libclangAST.so.6(+0x34434b)[0x7f3b0245234b]
clang/clang6/build/lib/libclangAST.so.6(_ZN5clang11ASTImporter6ImportENS_8QualTypeE+0x126)[0x7f3b0243738a]
clang/clang6/build/lib/libclangAST.so.6(_ZN5clang15ASTNodeImporter16VisitPointerTypeEPKNS_11PointerTypeE+0x31)[0x7f3b02413929]
clang/clang6/build/lib/libclangAST.so.6(+0x3440db)[0x7f3b024520db]
clang/clang6/build/lib/libclangAST.so.6(_ZN5clang11ASTImporter6ImportENS_8QualTypeE+0x126)[0x7f3b0243738a]
clang/clang6/build/lib/libclangAST.so.6(_ZN5clang15ASTNodeImporter22VisitFunctionProtoTypeEPKNS_17FunctionProtoTypeE+0x125)[0x7f3b02414293]
clang/clang6/build/lib/libclangAST.so.6(+0x344213)[0x7f3b02452213]
clang/clang6/build/lib/libclangAST.so.6(_ZN5clang11ASTImporter6ImportENS_8QualTypeE+0x126)[0x7f3b0243738a]
clang/clang6/build/lib/libclangAST.so.6(_ZN5clang15ASTNodeImporter17VisitFunctionDeclEPNS_12FunctionDeclE+0xa9d)[0x7f3b0241e245]
clang/clang6/build/lib/libclangAST.so.6(+0x344d05)[0x7f3b02452d05]
clang/clang6/build/lib/libclangAST.so.6(_ZN5clang11ASTImporter6ImportEPNS_4DeclE+0xc5)[0x7f3b02437703]
./tools/clang/unittests/AST/ASTTests[0x4c1800]
./tools/clang/unittests/AST/ASTTests[0x4b5724]
./tools/clang/unittests/AST/ASTTests[0x489606]
clang/clang6/build/lib/libgtest.so.6(_ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc+0x65)[0x7f3b02e2e068]
clang/clang6/build/lib/libgtest.so.6(_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc+0x4a)[0x7f3b02e28879]
clang/clang6/build/lib/libgtest.so.6(_ZN7testing4Test3RunEv+0xd5)[0x7f3b02e12537]
clang/clang6/build/lib/libgtest.so.6(_ZN7testing8TestInfo3RunEv+0x108)[0x7f3b02e12bee]
clang/clang6/build/lib/libgtest.so.6(_ZN7testing8TestCase3RunEv+0xf1)[0x7f3b02e13181]
clang/clang6/build/lib/libgtest.so.6(_ZN7testing8internal12UnitTestImpl11RunAllTestsEv+0x298)[0x7f3b02e18708]
clang/clang6/build/lib/libgtest.so.6(_ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc+0x65)[0x7f3b02e2ee5e]
clang/clang6/build/lib/libgtest.so.6(_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc+0x4a)[0x7f3b02e29247]
clang/clang6/build/lib/libgtest.so.6(_ZN7testing8UnitTest3RunEv+0xb4)[0x7f3b02e1779a]
clang/clang6/build/lib/libgtest_main.so.6(+0xc50)[0x7f3b03074c50]
clang/clang6/build/lib/libgtest_main.so.6(main+0xcb)[0x7f3b03074be0]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7f3b004daf45]
./tools/clang/unittests/AST/ASTTests[0x44a4e9]
Aborted
balazske commented 6 years ago

fixed by #372