Skip to content

Duplicate "no template named" error #24786

@dnovillo

Description

@dnovillo
Bugzilla Link 24412
Version unspecified
OS All

Extended Description

The following code snippet generates two instances of the same error message. This happens with Clang trunk as of today.

$ ./clang++ --version
clang version 3.8.0 (trunk 244446) (llvm/trunk 244449)
Target: x86_64-unknown-linux-gnu
Thread model: posix

$ cat dup.cpp

namespace x82 {
template <int, typename x94>
void WithArgs(x94);
}
void x123() { WithArgs<1>(x123); }
$ ./clang++ -c -std=c++11 dup.cpp
dup.cpp:5:15: error: no template named 'WithArgs'; did you mean 'x82::WithArgs'?
void x123() { WithArgs<1>(x123); }
              ^~~~~~~~
              x82::WithArgs
dup.cpp:3:6: note: 'x82::WithArgs' declared here
void WithArgs(x94);
     ^
dup.cpp:5:15: error: no template named 'WithArgs'; did you mean 'x82::WithArgs'?
void x123() { WithArgs<1>(x123); }
              ^~~~~~~~
              x82::WithArgs
dup.cpp:3:6: note: 'x82::WithArgs' declared here
void WithArgs(x94);
     ^
2 errors generated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions