Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template variables could use a -Wvexing-parse diagnostic #34924

Open
TNorthover opened this issue Dec 8, 2017 · 0 comments
Open

Template variables could use a -Wvexing-parse diagnostic #34924

TNorthover opened this issue Dec 8, 2017 · 0 comments
Labels
bugzilla Issues migrated from bugzilla c++

Comments

@TNorthover
Copy link
Contributor

Bugzilla Link 35576
Version trunk
OS All
CC @dwblaikie,@DougGregor,@zygoloid

Extended Description

Consider:

template<typename T> int junk1(T::junk);
template<typename T> int junk2(typename T::junk);

The first of these (in C++14 onwards) declares a template variable initialized by T::junk, the second declares a template function taking T::junk as a parameter. They are disturbingly similar.

So Richard Smith suggested I should file a bug report to get some kind of warning in place under -Wvexing-parse.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla c++
Projects
None yet
Development

No branches or pull requests

1 participant