]> granicus.if.org Git - clang/commit
Initial step toward supporting qualification conversions (C++ 4.4).
authorDouglas Gregor <dgregor@apple.com>
Tue, 21 Oct 2008 23:43:52 +0000 (23:43 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 21 Oct 2008 23:43:52 +0000 (23:43 +0000)
commit98cd599ee8a9b259ed7388ee2921a20d97658864
treea03f423533e8e714dacd90d133e4e72f9edd81b5
parentcabeeed9cc2bfca73e3d629fd263e697164aa453
Initial step toward supporting qualification conversions (C++ 4.4).

Changes:
  - Sema::IsQualificationConversion determines whether we have a qualification
    conversion.
  - Sema::CheckSingleAssignment constraints now follows the C++ rules in C++,
    performing an implicit conversion from the right-hand side to the type of
    the left-hand side rather than checking based on the C notion of
    "compatibility". We now rely on the implicit-conversion code to
    determine whether the conversion can happen or
    not. Sema::TryCopyInitialization has an ugly reference-related
    hack to cope with the initialization of references, for now.
  - When building DeclRefExprs, strip away the reference type, since
    there are no expressions whose type is a reference. We'll need to
    do this throughout Sema.
  - Expr::isLvalue now permits functions to be lvalues in C++ (but not
  in C).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57935 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Type.h
lib/AST/Expr.cpp
lib/Sema/Sema.h
lib/Sema/SemaExpr.cpp
lib/Sema/SemaOverload.cpp
lib/Sema/SemaType.cpp
test/SemaCXX/decl-expr-ambiguity.cpp
test/SemaCXX/qualification-conversion.cpp [new file with mode: 0644]