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

missing warning for ambiguous else #11981

Closed
llvmbot opened this issue Dec 18, 2011 · 4 comments
Closed

missing warning for ambiguous else #11981

llvmbot opened this issue Dec 18, 2011 · 4 comments
Labels
bugzilla Issues migrated from bugzilla clang:frontend Language frontend issues, e.g. anything involving "Sema"

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Dec 18, 2011

Bugzilla Link 11609
Resolution FIXED
Resolved on Dec 22, 2011 17:26
Version unspecified
OS Linux
Reporter LLVM Bugzilla Contributor
CC @nico

Extended Description

gcc will warn on

void g(int);
void f(int a, int b) {
if (a)
if (b)
g(1);
else
g(2);
g(3);
}

but clang doesn't.

@nico
Copy link
Contributor

nico commented Dec 20, 2011

possible patch
Based on http://drdobbs.com/blogs/cpp/231602010

I didn't evaluate the usefulness of this warning yet.

@nico
Copy link
Contributor

nico commented Dec 20, 2011

with actual test

@nico
Copy link
Contributor

nico commented Dec 20, 2011

@nico
Copy link
Contributor

nico commented Dec 23, 2011

r147202

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang:frontend Language frontend issues, e.g. anything involving "Sema"
Projects
None yet
Development

No branches or pull requests

2 participants