diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-04-16 22:09:46 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-04-16 22:09:46 +0000 |
commit | d6e44a3c4193bd422bfa78c8086fb16bb2168e34 (patch) | |
tree | cb04261ecfa3a4512613d65fd851aae18dbad935 /lib/Sema/SemaChecking.cpp | |
parent | e74ef1289d5fff0a6ea573198bf354fa8cd84d51 (diff) |
Collapse the three separate initialization paths in
TryStaticImplicitCast (for references, class types, and everything
else, respectively) into a single invocation of
InitializationSequence.
One of the paths (for class types) was the only client of
Sema::TryInitializationByConstructor, which I have eliminated. This
also simplified the interface for much of the cast-checking logic,
eliminating yet more code.
I've kept the representation of C++ functional casts with <> 1
arguments the same, despite the fact that I hate it. That fix will
come soon. To satisfy my paranoia, I've bootstrapped + tested Clang
with these changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101549 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r-- | lib/Sema/SemaChecking.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index 64e0e264af..033a36c90e 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -409,9 +409,7 @@ bool Sema::SemaBuiltinAtomicOverloaded(CallExpr *TheCall) { // GCC does an implicit conversion to the pointer or integer ValType. This // can fail in some cases (1i -> int**), check for this error case now. CastExpr::CastKind Kind = CastExpr::CK_Unknown; - CXXMethodDecl *ConversionDecl = 0; - if (CheckCastTypes(Arg->getSourceRange(), ValType, Arg, Kind, - ConversionDecl)) + if (CheckCastTypes(Arg->getSourceRange(), ValType, Arg, Kind)) return true; // Okay, we have something that *can* be converted to the right type. Check |