- Jan 25, 2011
-
-
Ted Kremenek authored
handling all CFGElement kinds. While writing the test case, it turned out that return-noreturn.cpp wasn't actually testing anything since it has the wrong -W flag. That uncovered another regression with the handling of destructors marked noreturn. WIP. llvm-svn: 124238
-
Douglas Gregor authored
for reference binding (C++ [over.rank.ics]p3b1sb4), so that we prefer the binding of an lvalue reference to a function lvalue over the binding of an rvalue reference. This change resolves the ambiguity with std::forward and lvalue references to function types in a way that seems consistent with the original rvalue references proposal. My proposed wording for this change is shown in isBetterReferenceBindingKind(); we'll try to get this change adopted in the C++0x working paper as well. llvm-svn: 124236
-
Jeffrey Yasskin authored
authors to write class __attribute__((forbid_temporaries)) Name { ... }; when they want to force users to name all variables of the type. This protects people from doing things like creating a scoped_lock that only lives for a single statement instead of an entire scope. The warning produced by this attribute can be disabled by -Wno-forbid-temporaries. llvm-svn: 124217
-
Douglas Gregor authored
(C++0x [over.ics.rank]p3) when one binding is an lvalue reference and the other is an rvalue reference that binds to an rvalue. In particular, we were using the predict "is an rvalue reference" rather than "is an rvalue reference that binds to an rvalue", which was incorrect in the one case where an rvalue reference can bind to an lvalue: function references. This particular issue cropped up with std::forward, where Clang was picking an std::forward overload while forwarding an (lvalue) reference to a function. However (and unfortunately!), the right answer for this code is that the call to std::forward is ambiguous. Clang now gets that right, but we need to revisit the std::forward implementation in libc++. llvm-svn: 124216
-
Ted Kremenek authored
about uninitialized variables captured by blocks. llvm-svn: 124213
-
Douglas Gregor authored
generate meaningful [*] template argument location information. [*] Well, as meaningful as possible, given that this entire code path is a hack for when we've lost type-source information. llvm-svn: 124211
-
Anders Carlsson authored
llvm-svn: 124201
-
Douglas Gregor authored
during template instantiation. This code needs to eventually die, but this little tweak fixes PR8629, where bad location information slipped through to the location of a class template instantiation. llvm-svn: 124199
-
Douglas Gregor authored
T) when taking the address of an overloaded function or matching a specialization to a template (C++0x [temp.deduct.type]p10). Fixes PR9044. llvm-svn: 124197
-
Douglas Gregor authored
derived-to-base conversion, set the cast kind and base path appropriately. llvm-svn: 124189
-
John McCall authored
attributes for the benefit of the static analyzer. llvm-svn: 124174
-
Eric Christopher authored
llvm-svn: 124153
-
- Jan 24, 2011
-
-
Anton Yartsev authored
llvm-svn: 124146
-
Nick Lewycky authored
as useful in a templated context as it is without templates. Fixes PR8755! llvm-svn: 124136
-
Douglas Gregor authored
Wennborg! Fixes PR8295. llvm-svn: 124135
-
Anders Carlsson authored
llvm-svn: 124122
-
Douglas Gregor authored
implementation used by overload resolution to support rvalue references. The original commits caused PR9026 and some hard-to-reproduce self-host breakage. The only (crucial!) difference between this commit and the previous commits is that we now properly check the SuppressUserConversions flag before attempting to perform a second user-defined conversion in reference binding, breaking the infinite recursion chain of user-defined conversions. Rvalue references should be working a bit better now. llvm-svn: 124121
-
- Jan 23, 2011
-
-
Anders Carlsson authored
llvm-svn: 124087
-
Anders Carlsson authored
llvm-svn: 124083
-
Ted Kremenek authored
error: no super class declared in @interface for 'XXX' to be: error: 'X' cannot use 'super' because it is a root class The latter explains what the user actually did wrong. Fixes: <rdar://problem/8904409> llvm-svn: 124074
-
Ted Kremenek authored
clang's -Wuninitialized-experimental warning. While these don't look like real bugs, clang's -Wuninitialized-experimental analysis is stricter than GCC's, and these fixes have the benefit of being general nice cleanups. llvm-svn: 124072
-
- Jan 22, 2011
-
-
Anders Carlsson authored
llvm-svn: 124047
-
Anders Carlsson authored
llvm-svn: 124040
-
Anders Carlsson authored
llvm-svn: 124039
-
Anders Carlsson authored
llvm-svn: 124036
-
Anders Carlsson authored
llvm-svn: 124035
-
Rafael Espindola authored
llvm-svn: 124033
-
Anders Carlsson authored
llvm-svn: 124032
-
Anders Carlsson authored
llvm-svn: 124031
-
Douglas Gregor authored
reinterpret_cast and const_cast using rvalue references. llvm-svn: 124007
-
Douglas Gregor authored
llvm-svn: 124006
-
- Jan 21, 2011
-
-
Ted Kremenek authored
for floats, and also check if 'nil' is declared when suggesting it for initializing ObjC pointers. llvm-svn: 124004
-
Douglas Gregor authored
as an rvalue per C++0x [class.copy]p33. If that fails, try again with the original subexpression. llvm-svn: 124002
-
Douglas Gregor authored
llvm-svn: 123996
-
Ted Kremenek authored
to suggest initializations for pointer and ObjC pointer types. llvm-svn: 123995
-
Ted Kremenek authored
to issue the warning at an uninitialized variable's declaration, but to issue notes at possible uninitialized uses (which could be multiple). llvm-svn: 123994
-
Douglas Gregor authored
when returning an NRVO candidate expression. For example, this properly picks the move constructor when dealing with code such as MoveOnlyType f() { MoveOnlyType mot; return mot; } The previously-XFAIL'd rvalue-references test case now works, and has been moved into the appropriate paragraph-specific test case. llvm-svn: 123992
-
Douglas Gregor authored
llvm-svn: 123983
-
Douglas Gregor authored
NRVO candidate for a return statement, to Sema::getCopyElisionCandidate(), and teach it enough to also determine the NRVO candidate for a throw expression. We still don't use the latter information, however. Along the way, implement core issue 1148, which eliminates copy elision from catch parameters and clarifies that copy elision cannot occur from function parameters (which we already implemented). llvm-svn: 123982
-
Douglas Gregor authored
f(T&) and f(T&&). llvm-svn: 123981
-