diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2013-02-12 17:27:41 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2013-02-12 17:27:41 +0000 |
commit | 1b9e8f7e0bf2c6a2857f1b2208ca5f83b567b835 (patch) | |
tree | ea1db9c56b7298bd9e936ab48620947e3f8a493a /unittests/Format/FormatTest.cpp | |
parent | 9ece2bb8499251f3e7cdf65e7a65b38aaeead0d8 (diff) |
Accept over-qualified constructor in MSVC emulation mode
MSVC accepts this:
class A {
A::A();
};
Clang accepts regular member functions with extra qualification as an MS
extension, but not constructors. This changes the parser to defer rejecting
qualified constructors so that the same Sema logic can apply to constructors as
regular member functions. This also improves the error message when MS
extensions are disabled (in my opinion). Before it was:
/Users/jason/Desktop/test.cpp:2:8: error: expected member name or ';' after declaration specifiers
A::A();
~~~~ ^
1 error generated.
After:
/Users/jason/Desktop/test.cpp:2:6: error: extra qualification on member 'A'
A::A();
~~~^
1 error generated.
Patch by Jason Haslam.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174980 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
0 files changed, 0 insertions, 0 deletions