summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Documentation cleanup: use \brief, and don't repeat the identifier beingJames Dennett2013-02-161-1/+1
| | | | | | declared. llvm-svn: 175339
* libAnalysis: Add a case for TypeAliasDecl in CFGRecStmtDeclVisitor.Jordan Rose2013-02-162-2/+11
| | | | | | | | | | | Neither of the current clients of CFGRecStmtDeclVisitor are doing anything with typedefs, so I assume type aliases (C++11 "using") can be safely ignored. This was causing assertion failures in the analyzer. <rdar://problem/13228440> llvm-svn: 175335
* libclang: remove reinterpret_casts by using SourceLocation::getPtrEncodingDmitri Gribenko2013-02-161-14/+14
| | | | llvm-svn: 175333
* Remove unused forward declarationsDmitri Gribenko2013-02-161-17/+1
| | | | | | clang/AST/Decl.h is included to see the TypeSourceInfo definition anyway. llvm-svn: 175332
* Don't warn on conversion from NULL to nullptr_tDavid Blaikie2013-02-162-3/+9
| | | | llvm-svn: 175331
* Emit vtables for an extern template class as available_externally, not asRichard Smith2013-02-162-8/+36
| | | | | | | linkonce_odr. Emit construction vtables as internal in this case, since the ABI does not guarantee that they will be availble externally. llvm-svn: 175330
* [PCH] Deserializing the DeclContext of a template parameter is not safeArgyrios Kyrtzidis2013-02-165-14/+71
| | | | | | | | | | | until recursive loading is finished. Otherwise we may end up with a template trying to deserialize a template parameter that is in the process of getting loaded. rdar://13135282 llvm-svn: 175329
* Remove unused forward declarationsDmitri Gribenko2013-02-161-3/+0
| | | | llvm-svn: 175328
* Rework the visibility computation algorithm in preparationJohn McCall2013-02-165-244/+409
| | | | | | | | | | | | | | | | for distinguishing type vs. value visibility. The changes to the visibility of explicit specializations are intentional. The change to the "ugly" test case is a consequence of a sensible implementation, and I am happy to argue that this is better behavior. Other changes may or may not be intended; it is quite difficult to divine intent from some of the code I altered. I've left behind a comment which I hope explains the philosophy behind visibility computation. llvm-svn: 175326
* Add test case for r175312.Chad Rosier2013-02-151-0/+6
| | | | llvm-svn: 175313
* Add the 'target-cpu' and 'target-features' attributes to functions.Bill Wendling2013-02-1519-85/+98
| | | | | | | The back-end will use these values to reconfigure code generation for different features. llvm-svn: 175308
* libclang: add clang_getTypeSpelling(CXType CT)Dmitri Gribenko2013-02-1510-62/+156
| | | | | | | | | Adds a function clang_getTypeSpelling(CXType CT) that returns a CXString containing the underlying type. Patch by Ben Gertzfield. llvm-svn: 175299
* objective-C: Fixes a compiler crash when encodingFariborz Jahanian2013-02-153-5/+30
| | | | | | | an ivar of type pointer to a typedef'ed object. // rdar://13190095 llvm-svn: 175298
* Recognize < and > as binary expressions in builder-type calls.Daniel Jasper2013-02-152-3/+8
| | | | | | | | | | | | | | | | | The current heuristic assumes that there can't be binary operators in builder-type calls (excluding assigments). However, it also excluded < and > in general, which is wrong. Now they are only excluded if they are template parameters. Before: return aaaaaaaaaaaaaaaaa->aaaaa().aaaaaaaaaaaaa()i .aaaaaa() < aaaaaaaaaaaaaaaaaaa->aaaaa().aaaaaaaaaaaaa().aaaaaa(); After: return aaaaaaaaaaaaaaaaa->aaaaa().aaaaaaaaaaaaa().aaaaaa() < aaaaaaaaaaaaaaaaaaa->aaaaa().aaaaaaaaaaaaa().aaaaaa(); llvm-svn: 175291
* Fixed diagnostic nondeterministic order bug (pr14901).Enea Zaffanella2013-02-152-7/+23
| | | | llvm-svn: 175289
* Done break between 'operator' and '<<'.Daniel Jasper2013-02-152-1/+5
| | | | | | | | | | | | Before: ostream &operator <<(ostream &out, some::ns::SomeReallyLongType WithSomeReallyLongValue); After: ostream &operator<<(ostream &out, some::ns::SomeReallyLongType WithSomeReallyLongValue); llvm-svn: 175286
* Fix crash-on-invalid where a ParenListExpr shows up as a message receiverArgyrios Kyrtzidis2013-02-152-0/+15
| | | | | | | | while trying to do error recovery. rdar://13207886 llvm-svn: 175282
* When a statement is dropped from the AST because it was invalid, make sureArgyrios Kyrtzidis2013-02-154-7/+30
| | | | | | | we don't do the scope checks otherwise we are going to hit assertion checks since a label may not have been actually added. llvm-svn: 175281
* Re-enable ConstructorInitializerAllOnOneLineOrOnePerLine option.Daniel Jasper2013-02-152-15/+17
| | | | | | | | | This got lost and was untested as the same effect is achieved by avoiding bin packing, which is active in Google style by default. However, moving forward, we want more control over the bin packing option(s) and thus, this flag should work as expected. llvm-svn: 175277
* Sema: Unnest early exit and remove an unnecessary bad cast.Benjamin Kramer2013-02-152-13/+15
| | | | | | | cast<ObjCObjectPointerType> doesn't look through sugar, getAs does. Fixes PR15257. llvm-svn: 175272
* Abstract out emitting the vdtor calls and do it properly when using -cxx-abi ↵Timur Iskhodzhanov2013-02-156-23/+99
| | | | | | microsoft; also fix vdtor calls for the ARM ABI llvm-svn: 175271
* Make helper functions static.Benjamin Kramer2013-02-154-6/+6
| | | | llvm-svn: 175265
* Prevent only breaking before "?" in conditional expressions.Daniel Jasper2013-02-152-5/+25
| | | | | | | | | | | | | | | This is almost always more readable. Before: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? aaaaaaaaaaaaaaaaaaaaaaaaaaa : aaaaaaaaaaaaaaaaaaaaaaaaaaa; After: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? aaaaaaaaaaaaaaaaaaaaaaaaaaa : aaaaaaaaaaaaaaaaaaaaaaaaaaa; llvm-svn: 175262
* Update testcases due to Attribute sorting improvements.Bill Wendling2013-02-1514-72/+72
| | | | llvm-svn: 175253
* [analyzer] Don't assert when mixing reinterpret_cast and derived-to-base casts.Jordan Rose2013-02-152-0/+53
| | | | | | | | | | | | | | | This just adds a very simple check that if a DerivedToBase CastExpr is operating on a value with known C++ object type, and that type is not the base type specified in the AST, then the cast is invalid and we should return UnknownVal. In the future, perhaps we can have a checker that specifies that this is illegal, but we still shouldn't assert even if the user turns that checker off. PR14872 llvm-svn: 175239
* Re-apply "[analyzer] Model trivial copy/move ctors with an aggregate bind."Jordan Rose2013-02-155-17/+183
| | | | | | | | | | | | | | ...after a host of optimizations related to the use of LazyCompoundVals (our implementation of aggregate binds). Originally applied in r173951. Reverted in r174069 because it was causing hangs. Re-applied in r174212. Reverted in r174265 because it was /still/ causing hangs. If this needs to be reverted again it will be punted to far in the future. llvm-svn: 175234
* [analyzer] Cache the bindings accessible through a LazyCompoundVal.Jordan Rose2013-02-151-30/+68
| | | | | | | This means we don't have to recompute them all later for every removeDeadSymbols check. llvm-svn: 175233
* [analyzer] Scan the correct store when finding symbols in a LazyCompoundVal.Jordan Rose2013-02-151-2/+10
| | | | | | | | Previously, we were scanning the current store. Now, we properly scan the store that the LazyCompoundVal came from, which may have very different live symbols. llvm-svn: 175232
* [analyzer] Tweak LazyCompoundVal reuse check to ignore qualifiers.Jordan Rose2013-02-151-1/+1
| | | | | | This is optimization only; no behavioral change. llvm-svn: 175231
* [analyzer] Use collectSubRegionKeys to make removeDeadBindings faster.Jordan Rose2013-02-151-19/+33
| | | | | | | | | | | Previously, whenever we had a LazyCompoundVal, we crawled through the entire store snapshot looking for bindings within the LCV's region. Now, we just ask for the subregion bindings of the lazy region and only visit those. This is an optimization (so no test case), but it may allow us to clean up more dead bindings than we were previously. llvm-svn: 175230
* [analyzer] Refactor RegionStore's sub-region bindings traversal.Jordan Rose2013-02-152-46/+82
| | | | | | | | | | | This is going to be used in the next commit. While I'm here, tighten up assumptions about symbolic offset BindingKeys, and make offset calculation explicitly handle all MemRegion kinds. No functionality change. llvm-svn: 175228
* Make this test determinstic for my last patch.Fariborz Jahanian2013-02-141-18/+18
| | | | | | // rdar://13192366 llvm-svn: 175217
* objective-C: synthesize properties in order of theirFariborz Jahanian2013-02-144-16/+29
| | | | | | | | declarations to synthesize their ivars in similar determinstic order so they are laid out in a determinstic order. // rdar://13192366 llvm-svn: 175214
* libclang: remove reinterpret_casts by using SourceLocation::getFromPtrEncodingDmitri Gribenko2013-02-141-24/+12
| | | | | | directly instead of casting a pointer to an integer llvm-svn: 175206
* objective-C: When implementing custom accessor method forFariborz Jahanian2013-02-145-3/+60
| | | | | | | | a property, the -Wdirect-ivar-access should not warn when accessing the property's synthesized instance variable. // rdar://13142820 llvm-svn: 175195
* [analyzer] Try constant-evaluation for all variables, not just globals.Jordan Rose2013-02-142-21/+61
| | | | | | | | | | | | | | | | | | | | | In C++, constants captured by lambdas (and blocks) are not actually stored in the closure object, since they can be expanded at compile time. In this case, they will have no binding when we go to look them up. Previously, RegionStore thought they were uninitialized stack variables; now, it checks to see if they are a constant we know how to evaluate, using the same logic as r175026. This particular code path is only for scalar variables. Constant arrays and structs are still unfortunately unhandled; we'll need a stronger solution for those. This may have a small performance impact, but only for truly-undefined local variables, captures in a non-inlined block, and non-constant globals. Even then, in the non-constant case we're only doing a quick type check. <rdar://problem/13105553> llvm-svn: 175194
* [arcmt] Make sure the function has an associated parameter for the argumentArgyrios Kyrtzidis2013-02-142-1/+10
| | | | | | | | before checking for its attributes. rdar://13192395 llvm-svn: 175184
* Mangle extern "C" functions whose names are not simple identifiers.Rafael Espindola2013-02-142-2/+13
| | | | llvm-svn: 175166
* Fix counting of parameters so that r175162 works as expected.Daniel Jasper2013-02-143-9/+16
| | | | | | | | | | | | | | | Before: aaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa() .aaaaaaaaaaaaaaaaa()); After: aaaaaaaaaaaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa().aaaaaaaaaaaaaaaaa()); Not sure which of the formattings above is better, but we should not pick one by accident. llvm-svn: 175165
* Reduce penalty for breaking before ./-> after complex calls.Daniel Jasper2013-02-143-16/+21
| | | | | | | | | | | | | | | | | This gives a clearer separation of the context, e.g. in GMOCK statements. Before: EXPECT_CALL(SomeObject, SomeFunction(Parameter)).WillRepeatedly(Return(SomeValue)); After: EXPECT_CALL(SomeObject, SomeFunction(Parameter)) .WillRepeatedly(Return(SomeValue)); Minor format cleanups. llvm-svn: 175162
* Remove a const_cast by propagating constness to called functionsDmitri Gribenko2013-02-142-3/+3
| | | | llvm-svn: 175161
* Remove an unneeded const_castDmitri Gribenko2013-02-141-3/+2
| | | | llvm-svn: 175160
* Remove const_casts by making spec_begin()/spec_end() constDmitri Gribenko2013-02-143-19/+18
| | | | llvm-svn: 175159
* Remove the trailing whitespace of formatted lines.Daniel Jasper2013-02-142-13/+25
| | | | | | | | | | | | | | | So far, clang-format has always assumed the whitespace belonging to the subsequent token. This has the negative side-effect that when clang-format formats a line, it does not remove its trailing whitespace, as it belongs to the next token. Thus, this patch fixes most of llvm.org/PR15062. We are not zapping a file's trailing whitespace so far, as this does not belong to any token we see during formatting. We need to fix this in a subsequent patch. llvm-svn: 175152
* Get less confused by trailing comma in Google style.Daniel Jasper2013-02-142-1/+13
| | | | | | | | | | | | | | | | | The formatter can now format: void aaaaaaaaaaaaaaaaaa(int level, double *min_x, double *max_x, double *min_y, double *max_y, double *min_z, double *max_z, ) { } Although this is invalid code, it frequently happens during development and clang-format should be nicer :-). llvm-svn: 175151
* Remove accidentally committed empty test.Daniel Jasper2013-02-141-3/+0
| | | | llvm-svn: 175148
* Align superclasses for multiple inheritence.Daniel Jasper2013-02-144-2/+36
| | | | | | | | | | | | | | | | This fixes llvm.org/PR15179. Before: class ColorChooserMac : public content::ColorChooser, public content::WebContentsObserver { }; After: class ColorChooserMac : public content::ColorChooser, public content::WebContentsObserver { }; llvm-svn: 175147
* Revert accidental commit.Bill Wendling2013-02-141-13/+0
| | | | llvm-svn: 175143
* Pass the target options through to code generation.Bill Wendling2013-02-146-10/+33
| | | | | | | The code generation stuff is going to set attributes on the functions it generates. To do that it needs the target options. Pass them through. llvm-svn: 175141
* Partially revert r175117 so that we don't break assumptions about howRafael Espindola2013-02-144-9/+24
| | | | | | | static functions in extern "C" contexts are mangled. Should fix the bootstrap. llvm-svn: 175132
OpenPOWER on IntegriCloud