| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
implicit conversion sequences. In particular, model the "standard
conversion" from a class to its own type (or a base type) directly as
a standard conversion in the normal path *without* trying to determine
if there is a valid copy constructor. This appears to match the intent
of C++ [over.best.ics]p6 and more closely matches GCC and EDG.
As part of this, model non-lvalue reference initialization via
user-defined conversion in overloading the same way we handle it in
InitializationSequence, separating the "general user-defined
conversion" and "conversion to compatible class type" cases.
The churn in the overload-call-copycon.cpp test case is because the
test case was originally wrong; it assumed that we should do more
checking for copy constructors that we actually should, which affected
overload resolution.
Fixes PR7055. Bootstrapped okay.
llvm-svn: 110773
|
| |
|
|
|
|
| |
sure to clear out the LookupResult structure after looking into each class.
llvm-svn: 110615
|
| |
|
|
| |
llvm-svn: 110542
|
| |
|
|
|
|
| |
r110526.
llvm-svn: 110540
|
| |
|
|
| |
llvm-svn: 110526
|
| |
|
|
|
|
|
| |
but we were parsing the C grammar. Handle the C++ grammar
appropriately. Fixes PR7794.
llvm-svn: 110445
|
| |
|
|
|
|
| |
vectors, from Anton Yartsev!
llvm-svn: 110437
|
| |
|
|
|
|
| |
offsetof expressions.
llvm-svn: 110327
|
| |
|
|
|
|
|
|
| |
the else clause. The problem is that it's overly zealous and will respond to
uses in assignments, or after assignments. We should bring this back once we
can do it right. Fixes PR7100.
llvm-svn: 110314
|
| |
|
|
| |
llvm-svn: 110294
|
| |
|
|
|
|
|
|
|
|
| |
Apply hidden visibility to most RTTI; libstdc++ does not rely on exact
pointer equality for the type info (just the type info names). Apply
the same optimization to RTTI that we do to vtables.
Fixes PR5962.
llvm-svn: 110192
|
| |
|
|
|
|
| |
a declaration.
llvm-svn: 110175
|
| |
|
|
|
|
|
|
| |
purposes of the jump checker. Also extend Ted's iteration fix to labels.
Fixes PR7789.
llvm-svn: 110082
|
| |
|
|
|
|
| |
initializations now.
llvm-svn: 110063
|
| |
|
|
|
|
| |
Note some obvious false positives in the test case.
llvm-svn: 109986
|
| |
|
|
|
|
|
| |
will end up bizarrely mirroring CGExprConstant, but that might be the hazard of
this feature.
llvm-svn: 109984
|
| |
|
|
|
|
| |
those with initializers.
llvm-svn: 109964
|
| |
|
|
| |
llvm-svn: 109865
|
| |
|
|
|
|
| |
before looking for conversions to pointer type. Fixes <rdar://problem/8248780>.
llvm-svn: 109749
|
| |
|
|
|
|
| |
qualified name. Fixes <rdar://problem/8231724>.
llvm-svn: 109682
|
| |
|
|
| |
llvm-svn: 109537
|
| |
|
|
|
|
|
|
|
| |
when the RHS of the ||/&& is ever 0 or 1. This handles a variety of
creative idioms for "true" used in C programs and fixes many false
positives at the expense of a few false negatives. This fixes
rdar://8230351.
llvm-svn: 109314
|
| |
|
|
|
|
|
| |
fixes crashes on both valid and invalid code. The diagnostic here could
potentially be improved, but it's good enough as-is.
llvm-svn: 109257
|
| |
|
|
|
|
|
| |
__attribute__((unavailable)). I've done so, but unfortunately there's still a case
of redundant diagnostics.
llvm-svn: 109192
|
| |
|
|
|
|
|
|
|
|
|
|
| |
behavior. Note that
GCC emits a warning instead of an error when using an unavailable Objective-C protocol, so now
Clang's behavior is more strict in this case, but more consistent. We will need to see how much
this fires on real code and determine whether this case should be downgraded to a warning.
Fixes <rdar://problem/8213093>.
llvm-svn: 109033
|
| |
|
|
| |
llvm-svn: 108511
|
| |
|
|
| |
llvm-svn: 108505
|
| |
|
|
|
|
| |
that we don't warn when there isn't going to be any computation anyway.
llvm-svn: 108442
|
| |
|
|
|
|
| |
de-cv-qualification fixes.
llvm-svn: 108437
|
| |
|
|
|
|
|
|
|
| |
This flag and warning match GCC semantics. Also, move it to -Wextra as this is
a largely cosmetic issue and doesn't seem to mask problems. Subsequent fixes to
the tests which no longer by default emit the warning. Added explicit test
cases for both C and C++ behavior with the warning turned on.
llvm-svn: 108325
|
| |
|
|
|
|
|
|
|
|
|
| |
t2.c:2:12: warning: use of logical && with constant operand; switch to bitwise &
or remove constant [-Wlogical-bitwise-confusion]
return x && 4;
^ ~
wording improvement suggestions are welcome.
llvm-svn: 108260
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(e.g., a call, cast, etc.), immediately adjust the expression's type
to strip cv-qualifiers off of all non-class types (in C++) or all
types (in C). This effectively extends my previous fix for PR7463,
which was restricted to calls, to other kinds of expressions within
similar characteristics. I've audited every use of
getNonReferenceType() in the code base, switching to the newly-renamed
getNonLValueExprType() where necessary.
Big thanks to Eli for pointing out just how incomplete my original fix
for PR7463 actually was. We've been handling cv-qualifiers on rvalues
wrong for a very, very long time. Fixes PR7463.
llvm-svn: 108253
|
| |
|
|
|
|
|
|
|
|
|
|
| |
size" error for code like
new (int [size])
to a warning, add a Fix-It to remove the parentheses, and make this
diagnostic work properly when it occurs in a template
instantiation. <rdar://problem/8018245>.
llvm-svn: 108242
|
| |
|
|
|
|
|
|
|
|
|
|
| |
effect warning" by printing the qualifiers we saw and correctly
pluralizing the message, e.g.,
test/SemaCXX/conditional-expr.cpp:295:3: warning: 'const volatile' type
qualifiers on return type have no effect
const volatile Enum g2() {
^~~~~ ~~~~~~~~
llvm-svn: 108236
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
strip cv-qualifiers from the expression's type when the language calls
for it: in C, that's all the time, while C++ only does it for
non-class types.
Centralized the computation of the call expression type in
QualType::getCallResultType() and some helper functions in other nodes
(FunctionDecl, ObjCMethodDecl, FunctionType), and updated all relevant
callers of getResultType() to getCallResultType().
Fixes PR7598 and PR7463, along with a bunch of getResultType() call
sites that weren't stripping references off the result type (nothing
stripped cv-qualifiers properly before this change).
llvm-svn: 108234
|
| |
|
|
| |
llvm-svn: 108233
|
| |
|
|
|
|
| |
for awhile.
llvm-svn: 108232
|
| |
|
|
|
|
| |
C++). Fixes PR7466.
llvm-svn: 108231
|
| |
|
|
|
|
| |
function type. Fixes PR7470.
llvm-svn: 108209
|
| |
|
|
|
|
| |
block literal expression.
llvm-svn: 108019
|
| |
|
|
|
|
| |
declare nonmember or static member functions.
llvm-svn: 108018
|
| |
|
|
|
|
| |
declarations. Fixes PR7594.
llvm-svn: 107927
|
| |
|
|
|
|
| |
either integer values or other pointers. Fixes <rdar://problem/8134521>.
llvm-svn: 107905
|
| |
|
|
|
|
| |
ExtWarn to an Extension. Let the broken code propagate!
llvm-svn: 107875
|
| |
|
|
|
|
| |
suppressing copies of objects with trivial copy constructors.
llvm-svn: 107857
|
| |
|
|
|
|
| |
breaking bootstrap on Linux.
llvm-svn: 107837
|
| |
|
|
|
|
|
|
|
| |
CXXConstructExpr/CXXTemporaryObjectExpr/CXXNewExpr as
appropriate. Fixes PR7556, and provides a slide codegen improvement
when copy-initializing a POD class type from a value-initialized
temporary. Previously, we weren't eliding the copy.
llvm-svn: 107827
|
| |
|
|
| |
llvm-svn: 107574
|
| |
|
|
| |
llvm-svn: 107573
|
| |
|
|
| |
llvm-svn: 107485
|