]> granicus.if.org Git - clang/commit
Add support for parsing and representing C++ constructor declarations.
authorDouglas Gregor <dgregor@apple.com>
Fri, 31 Oct 2008 09:07:45 +0000 (09:07 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 31 Oct 2008 09:07:45 +0000 (09:07 +0000)
commitb48fe3812047e84164925c8938ce82be0624c40c
tree8af13a860c7c055c80382ca3f0b1f9f2db7b7b23
parente10b0f236bc8487445bc99b8d14bd40666b1998d
Add support for parsing and representing C++ constructor declarations.

Notes:
  - Constructors are never found by name lookup, so they'll never get
    pushed into any scope. Instead, they are stored as an
    OverloadedFunctionDecl in CXXRecordDecl for easy overloading.
  - There's a new action isCurrentClassName that determines whether an
    identifier is the name of the innermost class currently being defined;
    we use this to identify the declarator-id grammar rule that refers to
    a type-name.
  - MinimalAction does *not* support parsing constructors.
  - We now handle virtual and explicit function specifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58499 91177308-0d34-0410-b5e6-96231b3b80d8
15 files changed:
include/clang/AST/Decl.h
include/clang/AST/DeclBase.h
include/clang/AST/DeclCXX.h
include/clang/Basic/DiagnosticKinds.def
include/clang/Parse/Action.h
include/clang/Parse/DeclSpec.h
lib/AST/DeclBase.cpp
lib/AST/DeclCXX.cpp
lib/Parse/DeclSpec.cpp
lib/Parse/MinimalAction.cpp
lib/Parse/ParseDecl.cpp
lib/Sema/Sema.h
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
test/SemaCXX/constructor.cpp [new file with mode: 0644]