]> granicus.if.org Git - clang/commit
Implement initialization of a reference (C++ [dcl.init.ref]) as part
authorDouglas Gregor <dgregor@apple.com>
Wed, 29 Oct 2008 00:13:59 +0000 (00:13 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 29 Oct 2008 00:13:59 +0000 (00:13 +0000)
commit27c8dc06f65d7abcf6a7e7f64a7960c9a150ca01
tree11c0cafe9243e679b669258afcbf41260033c7be
parent1b450b092a053896e96f0355cf7c7cdc9bba9eab
Implement initialization of a reference (C++ [dcl.init.ref]) as part
of copy initialization. Other pieces of the puzzle:

  - Try/Perform-ImplicitConversion now handles implicit conversions
    that don't involve references.
  - Try/Perform-CopyInitialization uses
    CheckSingleAssignmentConstraints for C. PerformCopyInitialization
    is now used for all argument passing and returning values from a
    function.
  - Diagnose errors with declaring references and const values without
    an initializer. (Uses a new Action callback, ActOnUninitializedDecl).

We do not yet have implicit conversion sequences for reference
binding, which means that we don't have any overloading support for
reference parameters yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58353 91177308-0d34-0410-b5e6-96231b3b80d8
17 files changed:
include/clang/AST/Expr.h
include/clang/Basic/DiagnosticKinds.def
include/clang/Parse/Action.h
lib/AST/Expr.cpp
lib/Parse/ParseDecl.cpp
lib/Sema/Sema.h
lib/Sema/SemaChecking.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaExprCXX.cpp
lib/Sema/SemaInherit.cpp
lib/Sema/SemaOverload.cpp
lib/Sema/SemaStmt.cpp
test/Parser/cxx-reference.cpp
test/SemaCXX/overload-call.cpp
test/SemaCXX/references.cpp