- Jul 02, 2011
-
-
Chandler Carruth authored
SemaDeclAttr to the first argument. This makes them follow the very consistent policy elsewhere in Sema for helper functions. Original patch by Caitlin Sadowski, with some tweaking by me. llvm-svn: 134290
-
Chandler Carruth authored
recommendations before adding more of them. Patch by Caitlin Sadowski. llvm-svn: 134289
-
Chandler Carruth authored
conventional in the rest of Clang's codebase, and closer to the current style recommendations. It also makes the code more internally consistent as FD, VD, etc are used frequently for particular decl variables. Patch by Caitlin Sadowski. llvm-svn: 134288
-
Argyrios Kyrtzidis authored
-Remove unnecessary 'return'. -Remove unnecessary 'if' check (llvm_unreachable make sure attrStr will be non-null) -Add a test of transferring ownership to a reference cast type. llvm-svn: 134285
-
Argyrios Kyrtzidis authored
llvm-svn: 134278
-
Argyrios Kyrtzidis authored
llvm-svn: 134277
-
Argyrios Kyrtzidis authored
llvm-svn: 134276
-
Argyrios Kyrtzidis authored
cast type has no ownership specified, implicitly "transfer" the ownership of the cast'ed type to the cast type: id x; (NSString**)&x; // Casting as (__strong NSString**). llvm-svn: 134275
-
Argyrios Kyrtzidis authored
newly introduced Sema::BuildVectorLiteral. -Make Sema::ActOnCastExpr handle a vector initializer both when the cast'ed expression is a ParenListExpr and when it is a ParenExpr. -Ultimately make Sema::ActOnParenOrParenListExpr independent of what the cast type was. llvm-svn: 134274
-
Argyrios Kyrtzidis authored
cast type has no ownership specified, implicitly "transfer" the ownership of the cast'ed type to the cast type: id x; static_cast<NSString**>(&x); // Casting as (__strong NSString**). This currently only works for C++ named casts, C casts to follow. llvm-svn: 134273
-
Argyrios Kyrtzidis authored
Break Sema::GetTypeForDeclarator in 2 functions, one for DeclSpec processing and another for the rest. No functionality change. llvm-svn: 134272
-
Argyrios Kyrtzidis authored
Introduce Declarator::ObjCCatchContext, this will result in correct error for 'auto' in obj-c catch. llvm-svn: 134271
-
- Jul 01, 2011
-
-
Douglas Gregor authored
"_Bool" (depending on dialect), but not both, since they have the same edit distance from "Bool". llvm-svn: 134263
-
Richard Trieu authored
Fix for PR7410. Allow functions in a derived class that improperly overwrite a virtual function in the base class to be inserted into the derived class function list to prevent extra errors every time the derived class is used. llvm-svn: 134251
-
Richard Smith authored
Fix AST representations of alias-declarations which define tag types. Inside classes, the tag types need to have an associated access specifier, and inside function definitions, they need to be included in the declarations of the DeclStmt. These issues manifested as assertions during template instantiation, and also in a WIP constexpr patch. llvm-svn: 134250
-
Douglas Gregor authored
type/expression/template argument/etc. is instantiation-dependent if it somehow involves a template parameter, even if it doesn't meet the requirements for the more common kinds of dependence (dependent type, type-dependent expression, value-dependent expression). When we see an instantiation-dependent type, we know we always need to perform substitution into that instantiation-dependent type. This keeps us from short-circuiting evaluation in places where we shouldn't, and lets us properly implement C++0x [temp.type]p2. In theory, this would also allow us to properly mangle instantiation-dependent-but-not-dependent decltype types per the Itanium C++ ABI, but we aren't quite there because we still mangle based on the canonical type in cases like, e.g., template<unsigned> struct A { }; template<typename T> void f(A<sizeof(sizeof(decltype(T() + T())))>) { } template void f<int>(A<sizeof(sizeof(int))>); and therefore get the wrong answer. llvm-svn: 134225
-
- Jun 30, 2011
-
-
John McCall authored
and the RHS of .*. Noticed by Enea Zaffanella! llvm-svn: 134170
-
Chandler Carruth authored
a constructor or destructor. Patch by Hans Wennborg. llvm-svn: 134138
-
John McCall authored
for a template template parameter. Uses to follow. I've also made the uniquing of SubstTemplateTemplateParmPacks use a ContextualFoldingSet as a minor space efficiency. llvm-svn: 134137
-
Chandler Carruth authored
Patch by Caitlin Sadowski. Unfortunately, this attribute doesn't seem to have a single test. It is only mentioned in comments in one test, and as a string literal in a copy of some Clang code checked in as a test for the Indexer. =[ It dates from 2009 r74280 as part of OpenCL 1.0. llvm-svn: 134136
-
- Jun 29, 2011
-
-
Douglas Gregor authored
initialized via initializer lists. Fixes <rdar://problem/9694686>. llvm-svn: 134099
-
Douglas Gregor authored
replace the existing declaration appropriately. Patch by Jordy Rose, fixes PR10013 / <rdar://problem/9584157>. llvm-svn: 134097
-
Chandler Carruth authored
to the same declaration when correcting typos. This is done by essentially sorting the corrections as they're added. Original patch by Kaelyn Uhrain, but modified for style and correctness by accounting for more than just the textual spelling. This still is a bit of a WIP hack to make this deterministic. Kaelyn (and myself) are working on a more principled solution going forward. llvm-svn: 134038
-
- Jun 28, 2011
-
-
Chandler Carruth authored
up several places where we never expect to have NULL pointers to assert early. This fixes a valgrind error within CorrectTypo, but not the non-determinism. llvm-svn: 134032
-
Eric Christopher authored
Fixes rdar://9281377 llvm-svn: 134016
-
Douglas Gregor authored
don't rely on the existence of a copy constructor. llvm-svn: 134009
-
Douglas Gregor authored
vector<int> to std::vector<int> Patch by Kaelyn Uhrain, with minor tweaks + PCH support from me. Fixes PR5776/<rdar://problem/8652971>. Thanks Kaelyn! llvm-svn: 134007
-
Argyrios Kyrtzidis authored
from Sema::GetTypeForDeclarator. No functionality change. llvm-svn: 133987
-
Argyrios Kyrtzidis authored
Sema::GetTypeForDeclarator and remove its 'OwnedDecl' out parameter. No functionality change. llvm-svn: 133986
-
Argyrios Kyrtzidis authored
Centralize the check for a tag definition in a Declarator::PrototypeContext inside GetTypeForDeclarator. No functionality change. llvm-svn: 133985
-
Argyrios Kyrtzidis authored
No functionality change. llvm-svn: 133984
-
Fariborz Jahanian authored
// rdar://7811841 llvm-svn: 133970
-
John McCall authored
only to pointers to locals. But it should work inside blocks, too. llvm-svn: 133969
-
- Jun 27, 2011
-
-
John McCall authored
llvm-svn: 133943
-
Fariborz Jahanian authored
functions with arguments of transparent unions type. // rdar://9584012 llvm-svn: 133941
-
Douglas Gregor authored
for the '(' and ')' around the initializer unless we actually have an initializer. Fixes PR10197, an issue where we were value-initializing rather than default-initializing. llvm-svn: 133913
-
Chandler Carruth authored
a pointer to void. llvm-svn: 133912
-
Chandler Carruth authored
of a single if block. This is really annoying to track down and test. Silly changes to the test case caused it to stop showing up. I wish there were a more concrete way of asserting that a note attaches to the intended diagnostic. This fixes PR10195. llvm-svn: 133907
-
Chandler Carruth authored
arithmetic into a couple of common routines. Use these to make the messages more consistent in the various contexts, especially in terms of consistently diagnosing binary operators with invalid types on both the left- and right-hand side. Also, improve the grammar and wording of the messages some, handling both two pointers and two (different) types. The wording of function pointer arithmetic diagnostics still strikes me as poorly phrased, and I worry this makes them slightly more awkward if more consistent. I'm hoping to fix that with a follow-on patch and test case that will also make them more helpful when a typedef or template type parameter makes the type completely opaque. Suggestions on better wording are very welcome, thanks to Richard Smith for some initial help on that front. llvm-svn: 133906
-
Richard Smith authored
Fix PR10187: when diagnosing a two-phase-lookup-related failure, don't assert that any names we find are valid candidates for the call. llvm-svn: 133898
-