[llvm-bugs] [Bug 31136] New: Cannot infer template argument
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Nov 23 04:01:04 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=31136
Bug ID: 31136
Summary: Cannot infer template argument
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Modules
Assignee: unassignedclangbugs at nondot.org
Reporter: vvasilev at cern.ch
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Classification: Unclassified
error: no matching function for call to 'min_element'
Int_t TGLPlotBox::FindFrontPoint() const {
std::min_element(f2DBoxU, f2DBoxU + 4, Compare) ; }
^~~~~~~~~~~~~~~~
includes/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:2:18:
note: candidate template ignored: couldn't infer template argument '_Compare'
_ForwardIterator min_element(_ForwardIterator, _ForwardIterator, _Compare);
^
1 error generated.
Invocation:
(lldb) settings set -- target.run-args "-cc1" "-resource-dir"
"/Users/vvassilev/workspace/llvm-git/inst/lib/clang/4.0.0" "-dependency-file"
"TGLPlotBox.d" "-MT" "TGLPlotBox.o" "-MP" "-I"
"includes/Users/vvassilev/workspace/root_obj/include/" "-stdlib=libc++"
"-std=c++11" "-ferror-limit" "1" "-fmodules" "-fmodules-cache-path=./modules"
"-fmodule-map-file=includes/Users/vvassilev/workspace/root_obj/include/module.modulemap"
"-fcxx-exceptions" "-fexceptions" "-fdiagnostics-show-option" "-x" "c++"
"TGLPlotBox.cxx" "-isystem"
"includes/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/"
"-isystem" "includes/usr/include/" "-nostdsysteminc"
(lldb) r
Process 55936 launched: '/Users/vvassilev/workspace/llvm-git/obj/bin/clang'
(x86_64)
TGLPlotBox.cxx:5:89: error: no matching function for call to 'min_element'
Int_t TGLPlotBox::FindFrontPoint() const {
std::min_element(f2DBoxU, f2DBoxU + 4, Compare) ; }
^~~~~~~~~~~~~~~~
includes/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:2:18:
note: candidate template ignored: couldn't infer template argument '_Compare'
_ForwardIterator min_element(_ForwardIterator, _ForwardIterator, _Compare);
^
1 error generated.
Process 55936 exited with status = 1 (0x00000001)
(lldb) b 'clang::TextDiagnosticPrinter::HandleDiagnostic'
Breakpoint 1: where =
clang`clang::TextDiagnosticPrinter::HandleDiagnostic(clang::DiagnosticsEngine::Level,
clang::Diagnostic const&) + 38 at TextDiagnosticPrinter.cpp:113, address =
0x000000010255fdd6
(lldb) r
Process 55940 launched: '/Users/vvassilev/workspace/llvm-git/obj/bin/clang'
(x86_64)
Process 55940 stopped
* thread #1: tid = 0x28fb2d, 0x000000010255fdd6
clang`clang::TextDiagnosticPrinter::HandleDiagnostic(this=0x000000010d30bcd0,
Level=Error, Info=0x00007fff5fbf2b20) + 38 at TextDiagnosticPrinter.cpp:113,
queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
frame #0: 0x000000010255fdd6
clang`clang::TextDiagnosticPrinter::HandleDiagnostic(this=0x000000010d30bcd0,
Level=Error, Info=0x00007fff5fbf2b20) + 38 at TextDiagnosticPrinter.cpp:113
110 void
TextDiagnosticPrinter::HandleDiagnostic(DiagnosticsEngine::Level Level,
111 const Diagnostic &Info)
{
112 // Default implementation (Warnings/errors count).
-> 113 DiagnosticConsumer::HandleDiagnostic(Level, Info);
114
115 // Render the diagnostic message into a temporary buffer eagerly.
We'll use
116 // this later as we print out the diagnostic to the terminal.
(lldb) bt
warning: could not load any Objective-C class information. This will
significantly reduce the quality of type information available.
* thread #1: tid = 0x28fb2d, 0x000000010255fdd6
clang`clang::TextDiagnosticPrinter::HandleDiagnostic(this=0x000000010d30bcd0,
Level=Error, Info=0x00007fff5fbf2b20) + 38 at TextDiagnosticPrinter.cpp:113,
queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
* frame #0: 0x000000010255fdd6
clang`clang::TextDiagnosticPrinter::HandleDiagnostic(this=0x000000010d30bcd0,
Level=Error, Info=0x00007fff5fbf2b20) + 38 at TextDiagnosticPrinter.cpp:113
frame #1: 0x00000001019e3a9f
clang`clang::DiagnosticIDs::EmitDiag(this=0x000000010d30c780,
Diag=0x000000010d805400, DiagLevel=Error) const + 143 at DiagnosticIDs.cpp:685
frame #2: 0x00000001019e386e
clang`clang::DiagnosticIDs::ProcessDiag(this=0x000000010d30c780,
Diag=0x000000010d805400) const + 1038 at DiagnosticIDs.cpp:677
frame #3: 0x00000001019d4def
clang`clang::DiagnosticsEngine::ProcessDiag(this=0x000000010d805400) + 47 at
Diagnostic.h:798
frame #4: 0x00000001019d4d55
clang`clang::DiagnosticsEngine::EmitCurrentDiagnostic(this=0x000000010d805400,
Force=false) + 277 at Diagnostic.cpp:384
frame #5: 0x0000000103db1328
clang`clang::Sema::EmitCurrentDiagnostic(this=0x000000010d833200, DiagID=2993)
+ 1096 at Sema.cpp:1049
frame #6: 0x0000000103dbbfbb
clang`clang::Sema::SemaDiagnosticBuilder::~SemaDiagnosticBuilder(this=0x00007fff5fbf31a8)
+ 91 at Sema.h:1136
frame #7: 0x0000000103daa865
clang`clang::Sema::SemaDiagnosticBuilder::~SemaDiagnosticBuilder(this=0x00007fff5fbf31a8)
+ 21 at Sema.h:1119
frame #8: 0x0000000104491556
clang`FinishOverloadedCallExpr(SemaRef=0x000000010d833200,
S=0x000000010d703140, Fn=0x000000010d871698, ULE=0x000000010d871698,
LParenLoc=(ID = 191), Args=clang::MultiExprArg @ 0x00007fff5fbf3370,
RParenLoc=(ID = 221), ExecConfig=0x0000000000000000,
CandidateSet=0x00007fff5fbf3488, Best=0x00007fff5fbf3410,
OverloadResult=OR_No_Viable_Function, AllowTypoCorrection=true) + 1542 at
SemaOverload.cpp:11537
frame #9: 0x0000000104490e3f
clang`clang::Sema::BuildOverloadedCallExpr(this=0x000000010d833200,
S=0x000000010d703140, Fn=0x000000010d871698, ULE=0x000000010d871698,
LParenLoc=(ID = 191), Args=clang::MultiExprArg @ 0x00007fff5fbf4a10,
RParenLoc=(ID = 221), ExecConfig=0x0000000000000000, AllowTypoCorrection=true,
CalleesAddressIsTaken=false) + 719 at SemaOverload.cpp:11612
frame #10: 0x000000010410b2f0
clang`clang::Sema::ActOnCallExpr(this=0x000000010d833200,
Scope=0x000000010d703140, Fn=0x000000010d871698, LParenLoc=(ID = 191),
ArgExprs=clang::MultiExprArg @ 0x00007fff5fbf4ea8, RParenLoc=(ID = 221),
ExecConfig=0x0000000000000000, IsExecConfig=false) + 2336 at SemaExpr.cpp:5217
frame #11: 0x0000000103939872
clang`clang::Parser::ParsePostfixExpressionSuffix(this=0x000000010d836000,
LHS=(PtrWithInvalid = 4521924248)) + 5586 at ParseExpr.cpp:1604
frame #12: 0x00000001039406d1
clang`clang::Parser::ParseCastExpression(this=0x000000010d836000,
isUnaryExpression=false, isAddressOfOperand=false,
NotCastExpr=0x00007fff5fbf8587, isTypeCast=NotTypeCast) + 24721 at
ParseExpr.cpp:1371
frame #13: 0x00000001039381a3
clang`clang::Parser::ParseCastExpression(this=0x000000010d836000,
isUnaryExpression=false, isAddressOfOperand=false, isTypeCast=NotTypeCast) + 83
at ParseExpr.cpp:478
frame #14: 0x0000000103936750
clang`clang::Parser::ParseAssignmentExpression(this=0x000000010d836000,
isTypeCast=NotTypeCast) + 240 at ParseExpr.cpp:168
frame #15: 0x000000010393662f
clang`clang::Parser::ParseExpression(this=0x000000010d836000,
isTypeCast=NotTypeCast) + 31 at ParseExpr.cpp:120
frame #16: 0x00000001039a250b
clang`clang::Parser::ParseExprStatement(this=0x000000010d836000) + 91 at
ParseStmt.cpp:402
frame #17: 0x00000001039a0f2c
clang`clang::Parser::ParseStatementOrDeclarationAfterAttributes(this=0x000000010d836000,
Stmts=0x00007fff5fbf8ff0, Allowed=ACK_Any, TrailingElseLoc=0x0000000000000000,
Attrs=0x00007fff5fbf8be8) + 2156 at ParseStmt.cpp:223
frame #18: 0x00000001039a0520
clang`clang::Parser::ParseStatementOrDeclaration(this=0x000000010d836000,
Stmts=0x00007fff5fbf8ff0, Allowed=ACK_Any, TrailingElseLoc=0x0000000000000000)
+ 160 at ParseStmt.cpp:110
frame #19: 0x00000001039a892a
clang`clang::Parser::ParseCompoundStatementBody(this=0x000000010d836000,
isStmtExpr=false) + 1290 at ParseStmt.cpp:987
frame #20: 0x00000001039a96e4
clang`clang::Parser::ParseFunctionStatementBody(this=0x000000010d836000,
Decl=0x000000010d871570, BodyScope=0x00007fff5fbf9408) + 484 at
ParseStmt.cpp:1951
frame #21: 0x00000001039cc8c6
clang`clang::Parser::ParseFunctionDefinition(this=0x000000010d836000,
D=0x00007fff5fbf9a68, TemplateInfo=0x00007fff5fbf9850,
LateParsedAttrs=0x00007fff5fbf9a38) + 4262 at Parser.cpp:1217
frame #22: 0x00000001038f6f55
clang`clang::Parser::ParseDeclGroup(this=0x000000010d836000,
DS=0x00007fff5fbfa358, Context=0, DeclEnd=0x0000000000000000,
FRI=0x0000000000000000) + 1173 at ParseDecl.cpp:1812
frame #23: 0x00000001039cb5a2
clang`clang::Parser::ParseDeclOrFunctionDefInternal(this=0x000000010d836000,
attrs=0x00007fff5fbfa8c8, DS=0x00007fff5fbfa358, AS=AS_none) + 1346 at
Parser.cpp:984
frame #24: 0x00000001039cac02
clang`clang::Parser::ParseDeclarationOrFunctionDefinition(this=0x000000010d836000,
attrs=0x00007fff5fbfa8c8, DS=0x0000000000000000, AS=AS_none) + 194 at
Parser.cpp:1000
frame #25: 0x00000001039c9d5c
clang`clang::Parser::ParseExternalDeclaration(this=0x000000010d836000,
attrs=0x00007fff5fbfa8c8, DS=0x0000000000000000) + 3484 at Parser.cpp:852
frame #26: 0x00000001039c8a85
clang`clang::Parser::ParseTopLevelDecl(this=0x000000010d836000,
Result=0x00007fff5fbfaa20) + 1045 at Parser.cpp:628
frame #27: 0x00000001038dbd33 clang`clang::ParseAST(S=0x000000010d833200,
PrintStats=false, SkipFunctionBodies=false) + 931 at ParseAST.cpp:147
frame #28: 0x00000001024de495
clang`clang::ASTFrontendAction::ExecuteAction(this=0x000000010d30bd60) + 485 at
FrontendAction.cpp:557
frame #29: 0x00000001024dd560
clang`clang::FrontendAction::Execute(this=0x000000010d30bd60) + 112 at
FrontendAction.cpp:458
frame #30: 0x0000000102418366
clang`clang::CompilerInstance::ExecuteAction(this=0x000000010d30aea0,
Act=0x000000010d30bd60) + 2278 at CompilerInstance.cpp:871
frame #31: 0x0000000102574f45
clang`clang::ExecuteCompilerInvocation(Clang=0x000000010d30aea0) + 6021 at
ExecuteCompilerInvocation.cpp:249
frame #32: 0x000000010001624a clang`cc1_main(Argv=ArrayRef<const char *> @
0x00007fff5fbfc130, Argv0="/Users/vvassilev/workspace/llvm-git/obj/bin/clang",
MainAddr=0x00000001000021d0) + 4906 at cc1_main.cpp:221
frame #33: 0x000000010000616e clang`ExecuteCC1Tool(argv=ArrayRef<const char
*> @ 0x00007fff5fbfcfd8, Tool=(Data = "", Length = 0)) + 622 at driver.cpp:299
frame #34: 0x00000001000033cf clang`main(argc_=29,
argv_=0x00007fff5fbff7b8) + 4383 at driver.cpp:380
frame #35: 0x00007fff82fea5ad libdyld.dylib`start + 1
frame #36: 0x00007fff82fea5ad libdyld.dylib`start + 1
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161123/b1ad748e/attachment-0001.html>
More information about the llvm-bugs
mailing list