- Jul 07, 2011
-
-
Douglas Gregor authored
throw-expressions, such that we don't consider the NRVO when the non-volatile automatic object comes from outside the innermost try scope (C++0x [class.copymove]p13). In C++98/03, our ASTs were incorrect but it didn't matter because IR generation doesn't actually apply the NRVO here. In C++0x, however, we were moving from an object when in fact we should have copied from it. Fixes PR10142 / <rdar://problem/9714312>. llvm-svn: 134548
-
- Jul 06, 2011
-
-
Fariborz Jahanian authored
llvm-svn: 134529
-
Fariborz Jahanian authored
classes which are incompatible with weak references. // rdar://9693477 llvm-svn: 134522
-
Douglas Gregor authored
declaration with dependent type. Fixes PR10232 / <rdar://problem/9700653>. llvm-svn: 134515
-
Chandler Carruth authored
Special detail is added for uninitialized variable analysis as this has serious performance problems than need to be tracked. Computing some of this data is expensive, for example walking the CFG to determine its size. To avoid doing that unless the stats data is going to be used, we thread a bit into the Sema object to track whether detailed stats should be collected or not. This bit is used to avoid computations whereever the computations are likely to be more expensive than checking the state of the flag. Thus, counters are in some cases unconditionally updated, but the more expensive (and less frequent) aggregation steps are skipped. With this patch, we're able to see that for 'gcc.c': *** Analysis Based Warnings Stats: 232 functions analyzed (0 w/o CFGs). 7151 CFG blocks built. 30 average CFG blocks per function. 1167 max CFG blocks per function. 163 functions analyzed for uninitialiazed variables 640 variables analyzed. 3 average variables per function. 94 max variables per function. 96409 block visits. 591 average block visits per function. 61546 max block visits per function. And for the reduced testcase in PR10183: *** Analysis Based Warnings Stats: 98 functions analyzed (0 w/o CFGs). 8526 CFG blocks built. 87 average CFG blocks per function. 7277 max CFG blocks per function. 68 functions analyzed for uninitialiazed variables 1359 variables analyzed. 19 average variables per function. 1196 max variables per function. 2540494 block visits. 37360 average block visits per function. 2536495 max block visits per function. That last number is the somewhat scary one that indicates the problem in PR10183. llvm-svn: 134494
-
Rafael Espindola authored
instantiating functions. Fixes PR10272. llvm-svn: 134491
-
John McCall authored
variadic argument pack expansions as having changed, rather than doing it for each changed expansion, which leaves out zero-argument packs with catastrophic consequences. Fixes PR10260. llvm-svn: 134483
-
John McCall authored
as scope specifiers; diagnose the attempt, rather than letting it go to an assert. The rest of PR10264. llvm-svn: 134479
-
John McCall authored
structure to hold inferred information, then propagate each invididual bit down to -cc1. Separate the bits of "supports weak" and "has a native ARC runtime"; make the latter a CodeGenOption. The tool chain is still driving this decision, because it's the place that has the required deployment target information on Darwin, but at least it's better-factored now. llvm-svn: 134453
-
Fariborz Jahanian authored
passed to it, and unknown selectors causing potential leak. // rdar://9659270 llvm-svn: 134449
-
- Jul 05, 2011
-
-
Douglas Gregor authored
instantiated function template was written with a prototype or via some kind of typedef. Fixes PR10273 / <rdar://problem/9723679>. llvm-svn: 134426
-
Douglas Gregor authored
ActOnDeclarator can return NULL. Fixes PR10270, from Hans Wennborg! llvm-svn: 134416
-
Benjamin Kramer authored
llvm-svn: 134403
-
- Jul 04, 2011
-
-
Anders Carlsson authored
llvm-svn: 134377
-
- Jul 02, 2011
-
-
Nick Lewycky authored
llvm-svn: 134305
-
Douglas Gregor authored
over "= 0". Fixes <rdar://problem/9714386>. llvm-svn: 134302
-
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
-