llvm-project/clang/lib/Parse
Dmitri Gribenko d1c91f1763 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.

llvm-svn: 174980
2013-02-12 17:27:41 +00:00
..
CMakeLists.txt clang/lib: [CMake] Update tblgen'd dependencies. 2012-07-27 06:18:33 +00:00
Makefile BUILD_ARCHIVE is the default for libraries, no need to set it. 2010-07-18 00:14:47 +00:00
ParseAST.cpp Fix indent. 2012-12-21 19:43:33 +00:00
ParseCXXInlineMethods.cpp Finish semantic analysis for [[carries_dependency]] attribute. 2013-01-28 22:42:45 +00:00
ParseDecl.cpp Accept over-qualified constructor in MSVC emulation mode 2013-02-12 17:27:41 +00:00
ParseDeclCXX.cpp Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h. 2013-02-08 22:30:41 +00:00
ParseExpr.cpp Add OpenCL samplers as Clang builtin types and check sampler related restrictions. 2013-02-07 10:55:47 +00:00
ParseExprCXX.cpp Finish semantic analysis for [[carries_dependency]] attribute. 2013-01-28 22:42:45 +00:00
ParseInit.cpp s/CPlusPlus0x/CPlusPlus11/g 2013-01-02 11:42:31 +00:00
ParseObjc.cpp Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h. 2013-02-08 22:30:41 +00:00
ParsePragma.cpp Sort all of Clang's files under 'lib', and fix up the broken headers 2012-12-04 09:13:33 +00:00
ParsePragma.h Permanently end the whole "pragma got handled by the parser too early" 2012-10-04 02:36:51 +00:00
ParseStmt.cpp Implement C++11 [dcl.align]p1 and C11 6.7.5/2 rules for alignas and _Alignas. 2013-01-29 09:02:09 +00:00
ParseTemplate.cpp PR14918: Don't confuse braced-init-lists after template variable declarations 2013-01-15 06:49:38 +00:00
ParseTentative.cpp Add OpenCL samplers as Clang builtin types and check sampler related restrictions. 2013-02-07 10:55:47 +00:00
Parser.cpp Finish semantic analysis for [[carries_dependency]] attribute. 2013-01-28 22:42:45 +00:00
RAIIObjectsForParser.h Use LLVM_DELETED_FUNCTION in place of 'DO NOT IMPLEMENT' comments. 2012-09-15 20:20:27 +00:00