Clang error: reference to ... function could not be resolved; did you mean to call it...? (err_ovl_unresolvable)
Jump to navigation
Jump to search
Text |
(since 7.0)
(until 6.0) | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Type | Error | ||||||||||||||||
Category | Semantic Issue | ||||||||||||||||
Internal Id | err_ovl_unresolvable | ||||||||||||||||
Internal Message | reference to %select{overloaded|multiversioned}1 function could not be resolved; did you mean to call it%select{| with no arguments}0? (since 7.0)reference to overloaded function could not be resolved; did you mean to call it%select{| with no arguments}0? (until 6.0)
| ||||||||||||||||
Regular Expression | (?:error|fatal error)\: reference to (?:overloaded|multiversioned) function could not be resolved; did you mean to call it(?:| with no arguments)\?
| ||||||||||||||||
First Commit | 2010-10-12 36226621f600 Progress. |
Description
Example
Flags | -xc++
|
|
---|---|---|
Source |
struct A{}; struct B{}; // Types
template<typename T> T f(T); // Overload
int main(){true?f:A:f:B; return 0;}
| |
Compiler Output |
<source>:3:20: error: unexpected ':' in nested name specifier; did you mean '::'? <source>:3:17: error: reference to overloaded function could not be resolved; did you mean to call it? <source>:2:24: note: possible target for call <source>:3:22: error: expected ';' after expression <source>:3:21: error: no member named 'f' in 'A' <source>:3:23: warning: declaration does not declare anything [-Wmissing-declarations] |
Clang Internals (17.0.6)
Git Commit Message
Progress. llvm-svn: 116287
Used in Clang Sources
This section lists all occurrences of the diagnostic within the Clang's codebase. For each occurrence, an auto-extracted snipped from the source code is listed including key elements like control structures, functions, or classes. It should illustrate the conditions under which the diagnostic is activated.
clang/lib/Sema/SemaExpr.cpp (line 21545)
/// Check for operands with placeholder types and complain if found.
/// Returns ExprError() if there was an error and no recovery was possible.
ExprResult Sema::CheckPlaceholderExpr(Expr *E) {
// ...
// Overloaded expressions.
case BuiltinType::Overload: {
// ...
tryToRecoverWithCall(Result, PDiag(diag::err_ovl_unresolvable),
Triggered in Clang Tests
This section lists all internal Clang test cases that trigger the diagnostic.
clang/test/Sema/PR28181.c
- clang/test/Sema/PR28181.c:12:21: error: reference to overloaded function could not be resolved; did you mean to call it?