summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fixes synthesis of type for the object which holds info.Fariborz Jahanian2010-11-173-4/+11
| | | | | | about a __block cxx object. llvm-svn: 119411
* Fix source-range information for Objective-C properties. Previously,Douglas Gregor2010-11-171-0/+14
| | | | | | | | | | | | we were just getting a range covering only the property name, which is certainly not correct (and broke token annotation, among other things). Also, teach libclang about the relationship between @synthesize/@dynamic and @property, so we get property name and cursor-reference information for @synthesize and @dynamic. llvm-svn: 119409
* Reset the lifetime-managed flag between emission of the agg conditionalJohn McCall2010-11-172-4/+10
| | | | | | branches. Fixes PR8623. llvm-svn: 119408
* Front-end support for __attribute__((may_alias)). This is notDan Gohman2010-11-172-1/+18
| | | | | | yet hooked up to anything yet. llvm-svn: 119407
* Support compound complex operations as l-values in C++. Add a testJohn McCall2010-11-163-5/+39
| | | | | | | case based on CodeGen/volatile-1.c which tests the current C++ semantics, and note the many, many places we fall short of them. llvm-svn: 119402
* Warn about arg1 && arg2 || arg3, as GCC 4.3+ does. Fixes rdar://8659922Argyrios Kyrtzidis2010-11-161-3/+23
| | | | llvm-svn: 119381
* Use an OwningPtr for the preamble buffer in ASTUnit. This plugs a leakDouglas Gregor2010-11-161-15/+5
| | | | | | | where we failed to free this buffer along one of the paths, and detangles the code a little. llvm-svn: 119379
* turned pointers into pointers to const in function parameters in all ↵Anton Yartsev2010-11-161-175/+175
| | | | | | functions/builtins accepting pointers to a const-qualified type according to PIM and "Language Extensions for CBEA" llvm-svn: 119376
* Implements __block API for c++ objects. There is stillFariborz Jahanian2010-11-163-20/+57
| | | | | | | issue with runtime which I am discussing it with Blaine. This is wip (so no test yet). llvm-svn: 119368
* Static analyzer: Catch calls to malloc() withTed Kremenek2010-11-161-3/+54
| | | | | | | | allocation sizes of 0 bytes. Fixes PR 2899. llvm-svn: 119364
* Emit a specific diagnostic when typedefing C++ bool, mirroring gcc.Argyrios Kyrtzidis2010-11-161-2/+10
| | | | | | Fixes rdar://8365458 llvm-svn: 119359
* Add gcc-4.4.4 headers on Gentoo systems. Patch by Bertjan Broeksema!Nico Weber2010-11-161-0/+5
| | | | llvm-svn: 119348
* Remove an unintended restriction on sysroots introduced during the PathChandler Carruth2010-11-161-1/+1
| | | | | | conversion. llvm-svn: 119346
* Simplify some complex emission and implement correct semantics forJohn McCall2010-11-165-82/+119
| | | | | | | | | assignment to volatiles in C. This in effect reverts some of mjs's work in and around r72572. Basically, the C++ standard is quite clear, except that it lies about volatile behavior approximating C's, whereas the C standard is almost actively misleading. llvm-svn: 119344
* Futher reduce the includes of our builtin headers, and teach limits.h to avoidChandler Carruth2010-11-162-6/+18
| | | | | | | | include_next when not hosted or unavailable. This follows the pattern in stdint.h and allows these headers to work even in a freestanding configuration without a standard library. llvm-svn: 119343
* Reverting r119341: doesn't compile, no obvious fix.John McCall2010-11-161-1/+2
| | | | llvm-svn: 119342
* Refactored GRExprEngine::getCXXThisRegion to use CXXMethodDecl::getThisType ↵Marcin Swiderski2010-11-161-2/+1
| | | | | | instead of calculating it by hand. llvm-svn: 119341
* Fix PR8625 and correctly interpret member-calls to static members whenChandler Carruth2010-11-161-6/+10
| | | | | | | | | | | | producing warnings. This feels really fragile, and I've not audited all other argument index-based warnings. I suspect we'll grow this bug on another warning eventually. It might be nice to adjust the argument indices when building up the attribute AST node, as we already have to remember about the 'this' argument within that code to produce correct errors. llvm-svn: 119340
* Re-work the handling of implicit 'this' arguments and silly GCC-style attributeChandler Carruth2010-11-161-19/+56
| | | | | | | | | | | | | | | | argument indexes. This handles the offsets in a consistent manner for all of the attributes which I saw working with these concepts. I've also added tests for the attribute that motivated this: nonnull. I consolidated the tests for format attributes into one file, and fleshed them out a bit to trigger more of the warning cases. Also improved the quality of some of the diagnostics that occur with invalid argument indices. The only really questionable change here is supporting the implicit this argument for the ownership attribute. I'm not sure it's really a sensible concept there, but implemented the logic for consistency. llvm-svn: 119339
* Improve diagnostic for calling non-const method on const object. Fixes ↵Argyrios Kyrtzidis2010-11-161-1/+17
| | | | | | rdar://7743000 llvm-svn: 119336
* Handle member initializer in C++ ctor. Zhongxing Xu2010-11-163-14/+54
| | | | | | | | | - Add a new Kind of ProgramPoint: PostInitializer. - Still use GRStmtNodeBuilder. But special handling PostInitializer in GRStmtNodeBuilder::GenerateAutoTransition(). - Someday we should clean up the interface of GRStmtNodeBuilder. llvm-svn: 119335
* Have CXXDeleteExpr::getDestroyedType return the actual destroyed typeCraig Silverstein2010-11-161-2/+3
| | | | | | | | | | | | | | | | | | | in more situations. In particular, for code like template<class T> void Fn() { T* x; delete x; } getDestroyedType() will now return T rather than T*, as it would before this change. On the other hand, for code like this: template<class T> void Fn() { T x; delete x; } getDestroyedType() will return an empty QualType(), since it doesn't know what the actual destroyed type would be. Previously, it would return T. OKed by rjmccall llvm-svn: 119334
* Basic support for C++ in BasicStore:Marcin Swiderski2010-11-161-6/+11
| | | | | | | - CXXThisRegion treated like VarRegion and ObjCIVarRegion in various places, - Reference treated like pointer in BindDeclInternal. llvm-svn: 119333
* Now that we have reliable cast kinds, simplify scalar cast IR gen.John McCall2010-11-161-36/+3
| | | | llvm-svn: 119332
* Kill CK_Unknown and flesh out the documentation for the existing CastKinds.John McCall2010-11-168-44/+2
| | | | llvm-svn: 119331
* Teach complex compound assignment IR-generation that the RHS ofJohn McCall2010-11-161-3/+7
| | | | | | a compound assignment is always already in the computation type. llvm-svn: 119330
* Kill off the remaining places which generate CK_Unknown casts.John McCall2010-11-163-18/+36
| | | | llvm-svn: 119326
* Add an ExternalASTSource hook to complete a type on demand.John McCall2010-11-161-5/+8
| | | | llvm-svn: 119316
* Update TypePrinter::PrintVector to handle new Neon vector types.Bob Wilson2010-11-161-9/+25
| | | | llvm-svn: 119302
* Add support for "neon_vector_type" and "neon_polyvector_type" attributesBob Wilson2010-11-163-0/+71
| | | | | | | | to create the special Neon vector types. These are intended to be used in Clang's version of <arm_neon.h> to define special Neon vector types that will be mangled according to ARM's ABI. llvm-svn: 119301
* ASTContext::getVectorType should preserve the vector kind for canonical types.Bob Wilson2010-11-161-2/+1
| | | | | | | | | | This is needed for Neon types when it is most natural to define them in terms of a typedef. For example, Neon poly8_t is a typedef for "signed char", and we want to define polynomial vectors as vectors of that typedef. Without this change, the result will be a generic GCC-style vector. I think this is safe for other vector types as well, but I would appreciate a review of this. llvm-svn: 119300
* Change CXXNameMangler::mangleNeonVectorType to require the vector type to beBob Wilson2010-11-161-15/+13
| | | | | | | one of the special Neon types. We'll check for invalid Neon vectors when they are created, so there's no point in handling them when mangling. llvm-svn: 119299
* Fix a comment typo.Bob Wilson2010-11-161-1/+1
| | | | llvm-svn: 119298
* Use getTypeSize() method.Bob Wilson2010-11-161-1/+1
| | | | llvm-svn: 119297
* Add a new expression kind, OpaqueValueExpr, which is useful forJohn McCall2010-11-1510-10/+67
| | | | | | | certain internal type-checking procedures as well as for representing certain implicitly-generated operations. Uses to follow. llvm-svn: 119289
* Adds a README for the Clang static analyzer to document its design and work ↵Zhanyong Wan2010-11-151-0/+117
| | | | | | flow. The contents are taken from email notes by kremenek and xuzhongxing. llvm-svn: 119288
* Tweak libclang's heuristics for building precompiled preambles andDouglas Gregor2010-11-151-8/+3
| | | | | | | | caching global code-completion results. In particular, don't perform either operation the first time we parse, but do both after the first reparse. llvm-svn: 119285
* Remove invalid assertion from CFG builder. When building the CFG pieces for ↵Ted Kremenek2010-11-151-1/+2
| | | | | | | | | a ternary '?' expression, it is possible for the confluence block to only have a single predecessor due to calls to 'noreturn' functions. Fixes assertion failure reported in PR 8619. llvm-svn: 119284
* Add method ParentMap::addStmt().Ted Kremenek2010-11-151-0/+6
| | | | llvm-svn: 119181
* Relax assertion in SValuator so that we don't crash when analyzing a call ↵Ted Kremenek2010-11-151-1/+12
| | | | | | | | | via a function pointer that casts the return value to something completely different. While we need better reasoning here, we should definately not crash. llvm-svn: 119177
* Some cleanup of block API code.Fariborz Jahanian2010-11-153-24/+20
| | | | llvm-svn: 119174
* Fixes PR8611.Rafael Espindola2010-11-151-0/+3
| | | | | | | | Silence warning about -g not being used during linking. I couldn't find any change in behavior in gcc liking when given -g. Please open another bug if I missed something. llvm-svn: 119166
* Implement C++0x [temp.func.order]p3 (aka DR532) properly. InDouglas Gregor2010-11-151-5/+33
| | | | | | | | | | | | | particular, we only add the implement object parameter type if only one of the function templates is a non-static member function template. Moreover, since this DR differs from existing practice in C++98/03, this commit implements the existing practice (which ignores the first parameter of the function template that is not the non-static member function template) in C++98/03 mode. llvm-svn: 119145
* Silence an unused variable warning during release builds by folding theChandler Carruth2010-11-151-3/+2
| | | | | | expression into the assert. llvm-svn: 119143
* Yes, vector conversions are bitcasts.John McCall2010-11-151-3/+3
| | | | llvm-svn: 119141
* Kill CK_Unknown references in the ObjC rewriter. The actualJohn McCall2010-11-151-27/+27
| | | | | | | choice of cast doesn't matter here, but I've tried to choose the right one anyway. llvm-svn: 119140
* Fix a think-o. Fixes PR8606.Chandler Carruth2010-11-151-0/+1
| | | | llvm-svn: 119139
* Assorted work leading towards the elimination of CK_Unknown.John McCall2010-11-1514-177/+394
| | | | llvm-svn: 119138
* Add driver support for Ubuntu 9.10.Zhongxing Xu2010-11-151-4/+10
| | | | llvm-svn: 119137
* Add skeleton for handling other kinds of CFGElements.Zhongxing Xu2010-11-152-5/+32
| | | | llvm-svn: 119135
OpenPOWER on IntegriCloud