- Apr 17, 2010
-
-
Douglas Gregor authored
This is the last of the uses of TryImplicitConversion outside of overload resolution and InitializationSequence itself. llvm-svn: 101569
-
Douglas Gregor authored
Move Sema::PerformImplicitConversion over to where Sema::TryImplicitConversion is, for my own sanity. No functionality change llvm-svn: 101554
-
Douglas Gregor authored
llvm-svn: 101550
-
Douglas Gregor authored
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. llvm-svn: 101549
-
- Apr 16, 2010
-
-
Douglas Gregor authored
functional casts over to InitializationSequence, eliminating a caller of Sema::TryImplicitConversion. We also get access and ambiguity checking "for free". More cleanups to come in this routine. llvm-svn: 101526
-
Douglas Gregor authored
llvm-svn: 101502
-
Douglas Gregor authored
llvm-svn: 101498
-
Douglas Gregor authored
SemaOverload.cpp; no functionality change. llvm-svn: 101497
-
Douglas Gregor authored
that we aren't using ForceRValue any more? llvm-svn: 101496
-
Benjamin Kramer authored
llvm-svn: 101495
-
Douglas Gregor authored
llvm-svn: 101494
-
Douglas Gregor authored
functions. llvm-svn: 101492
-
Douglas Gregor authored
Eliminate the ForceRValue parameter from Sema::IsUserDefinedConversion. It's not the way we're going to handle this. llvm-svn: 101483
-
Douglas Gregor authored
Eliminate the default value for the UserCast parameter of Sema::IsUserDefinedConversion. No functionality change llvm-svn: 101482
-
Douglas Gregor authored
don't need it. llvm-svn: 101481
-
Anders Carlsson authored
llvm-svn: 101464
-
Eric Christopher authored
both number seen and number expected. Finishes fixing PR6501. llvm-svn: 101442
-
Eric Christopher authored
of arguments both seen and expected. Fixes PR6501. llvm-svn: 101441
-
Douglas Gregor authored
intended for redeclarations, fixing those that need it. Fixes PR6831. This uncovered an issue where the C++ type-specifier-seq parsing logic would try to perform name lookup on an identifier after it already had a type-specifier, which could also lead to spurious ambiguity errors (as in PR6831, but with a different test case). llvm-svn: 101419
-
Douglas Gregor authored
in case it ends up doing something that might trigger diagnostics (template instantiation, ambiguity reporting, access reporting). Noticed while working on PR6831. llvm-svn: 101412
-
- Apr 15, 2010
-
-
Anders Carlsson authored
llvm-svn: 101384
-
Douglas Gregor authored
llvm-svn: 101381
-
Douglas Gregor authored
ASTContext::getTypeSize() rather than ASTContext::getIntWidth() for the width of an integral type. The former includes padding for bools (to the target's size) while the latter does not, so we woud end up zero-extending bools to the target width when we shouldn't. Fixes a crash-on-valid in the included test. llvm-svn: 101372
-
Douglas Gregor authored
that have reference or const scalar members, since those members can never be initializer or modified. Fixes <rdar://problem/7804350>. llvm-svn: 101316
-
Douglas Gregor authored
ResolveAddressOfOverloadedFunction when asked to complain. Previously, we had some weird handshake where ResolveAddressOfOverloadedFunction expected its caller to handle some of the diagnostics but not others, and yet there was no way for the caller to know which case we were in. Eliminate this madness, fixing <rdar://problem/7765884>. llvm-svn: 101312
-
- Apr 14, 2010
-
-
Douglas Gregor authored
correction find names when a call failed. Fixes <rdar://problem/7853795>. llvm-svn: 101278
-
Douglas Gregor authored
generally recover from typos in keywords (since we would effectively have to mangle the token stream). However, there are still benefits to typo-correcting with keywords: - We don't make stupid suggestions when the user typed something that is similar to a keyword. - We can suggest the keyword in a diagnostic (did you mean "static_cast"?), even if we can't recover and therefore don't have a fix-it. llvm-svn: 101274
-
Douglas Gregor authored
than just a bool indicating that correction occurred. No actual functionality change (it's still always used like a bool), but this refactoring will be used to support typo correction to keywords. llvm-svn: 101259
-
Douglas Gregor authored
that adds parentheses from the main diagnostic down to a new note. This way, when the fix-it represents a choice between two options, each of the options is associted with a note. There is no default option in such cases. For example: /Users/dgregor/t.c:2:9: warning: & has lower precedence than ==; == will be evaluated first [-Wparentheses] if (x & y == 0) { ^~~~~~~~ /Users/dgregor/t.c:2:9: note: place parentheses around the & expression to evaluate it first if (x & y == 0) { ^ ( ) /Users/dgregor/t.c:2:9: note: place parentheses around the == expression to silence this warning if (x & y == 0) { ^ ( ) llvm-svn: 101249
-
Chris Lattner authored
llvm-svn: 101212
-
Douglas Gregor authored
receiver is a mis-typed class name. Previously, we would give a non-specific typo-correction diagnostic from the expression-parsing code, but there was no fix-it because it was too late to recover. Now, we give a nice diagnostic honk.m:6:4: error: unknown receiver 'Hnk'; did you mean 'Honk'? [Hnk method]; ^~~ Honk honk.m:1:1: note: 'Honk' declared here @interface Honk ^ which includes a fix-it. We still need to recover better from mis-typing "super". llvm-svn: 101211
-
John McCall authored
are invalid. Prevents a crash-on-invalid during template instantiation. I... really don't understand how this wasn't already present. llvm-svn: 101203
-
Ted Kremenek authored
measurements of '-fsyntax-only' on combine.c (403.gcc) shows no real performance change, but now the vector isn't leaked. llvm-svn: 101195
-
- Apr 13, 2010
-
-
John McCall authored
llvm-svn: 101173
-
Fariborz Jahanian authored
for non-fragile abi on darwin. llvm-svn: 101168
-
Fariborz Jahanian authored
on objc classes for Darwin. Radar 7839485. llvm-svn: 101164
-
Douglas Gregor authored
for reference binding. The code attempted to handle both the computation of the ICS and the actual conversion, but the latter is an anachronism: we now use InitializationSequence for that. Sema::CheckReferenceInit is now a static function TryReferenceInit that's only use within overload resolution, and has been simplified slightly. It still needs to be updated per C++ [over.ics.ref], by eliminating more of the lvalue/rvalue checks. llvm-svn: 101136
-
Douglas Gregor authored
return a NULL expression; return either an error or a proper expression. Fixes PR6078. llvm-svn: 101133
-
Douglas Gregor authored
direct reference binding when the source and target types are not reference-related. Fixes PR6066. llvm-svn: 101132
-
John McCall authored
members of non-templated classes. llvm-svn: 101122
-