Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Most vexing parse only reported on local variables #7162

Open Quuxplusone opened 13 years ago

Quuxplusone commented 13 years ago
Bugzilla Link PR9095
Status NEW
Importance P normal
Reported by Rafael Ávila de Espíndola (rafael@espindo.la)
Reported on 2011-01-28 14:09:16 -0800
Last modified on 2014-03-11 12:00:02 -0700
Version trunk
Hardware PC All
CC akyrtzi@gmail.com, dgregor@apple.com, llvm-bugs@lists.llvm.org, manjian2006@gmail.com
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
In
-------------------
struct foo {
};

struct bar {
  bar(foo x);
};

bar y(foo());

int main(void) {
  bar x(foo());
  return 0;
}
-----------------

clang reports:
--------------------
test.cc:11:8: warning: parentheses were disambiguated as a function declarator
  bar x(foo());
       ^~~~~~~
--------------------

but no warning is printed for y.
Quuxplusone commented 13 years ago

cloned to rdar://problem/8956519