summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* The variable 'ReusedDecl' is written but never read.Ted Kremenek2011-01-141-2/+0
| | | | | | Remove this variable (found by clang static analyzer). llvm-svn: 123484
* The variable 'isTemplateSpecialization' is no longerTed Kremenek2011-01-141-6/+3
| | | | | | used; nuke all assignments and its declaration. llvm-svn: 123483
* Remove unused store to variable 'Name'. Found by clang static analyzer.Ted Kremenek2011-01-141-1/+0
| | | | llvm-svn: 123482
* Driver: tweak handling of '--analyze' to invokeTed Kremenek2011-01-141-10/+25
| | | | | | | | | | analyzer -cc1 options that are tailored to the input type. If the input type is "C++", we should only run the dead stores checker (for now). Similarly, checks specific to Objective-C should only run on Objective-C Code. llvm-svn: 123481
* Teach PackExpansionExpr to keep track of the number of pack expansionsDouglas Gregor2011-01-147-19/+25
| | | | | | it will expand to, if known. Propagate this information throughout Sema. llvm-svn: 123470
* Properly propagate #pragma diagnostic mappings from PCH but not command-line ↵Argyrios Kyrtzidis2011-01-144-26/+49
| | | | | | | | warning flags. Addresses rdar://8435969&8852495 llvm-svn: 123462
* Rename 'RemoveDeadBindings()' to 'removeDeadBindings()'Ted Kremenek2011-01-148-28/+28
| | | | llvm-svn: 123460
* Rename 'EnterStackFrame()' to 'enterStackFrame()'.Ted Kremenek2011-01-144-6/+6
| | | | llvm-svn: 123459
* Teach RegionStore::EnterStackFrame() to handleTed Kremenek2011-01-141-4/+7
| | | | | | | | | | | the case where the called function has fewer formal arguments than actual arguments. This fixes a crash in the analyzer when doing function call inlining. Patch by Zhenbo Xu! llvm-svn: 123458
* When we're instantiating a direct variable initializer that has a packDouglas Gregor2011-01-141-6/+6
| | | | | | | | expansion in it, we may end up instantiating to an empty expression-list. In this case, the variable is uninitialized; tweak the instantiation logic to handle this case. Fixes PR8977. llvm-svn: 123449
* Keep track of the number of expansions to be produced from a type packDouglas Gregor2011-01-1410-52/+94
| | | | | | | | | | | | | | | | | | | | | | | expansion, when it is known due to the substitution of an out parameter pack. This allows us to properly handle substitution into pack expansions that involve multiple parameter packs at different template parameter levels, even when this substitution happens one level at a time (as with partial specializations of member class templates and the signatures of member function templates). Note that the diagnostic we provide when there is an arity mismatch between an outer parameter pack and an inner parameter pack in this case isn't as clear as the normal diagnostic for an arity mismatch. However, this doesn't matter because these cases are very, very rare and (even then) only typically occur in a SFINAE context. The other kinds of pack expansions (expression, template, etc.) still need to support optional tracking of the number of expansions, and we need the moral equivalent of SubstTemplateTypeParmPackType for substituted argument packs of template template and non-type template parameters. llvm-svn: 123448
* Support the zero-initialization of VLAs when that really means a zeroJohn McCall2011-01-141-8/+20
| | | | | | | bit-pattern. Continue punting on zero-initializing VLAs with a nonzero pattern. llvm-svn: 123439
* When simplifying a cleanup's entry by merging it into a single predecessor,John McCall2011-01-141-0/+4
| | | | | | | | replace all uses of the entry with the predecessor. There are no cleanups relying on this right now, but if we ever want a cleanup with a phi inside it, this will be important. llvm-svn: 123438
* Fix a few warnings stemming from my inability to properly fill outDouglas Gregor2011-01-142-0/+33
| | | | | | switch() statements. llvm-svn: 123429
* Start implementing support for substitution into pack expansions thatDouglas Gregor2011-01-1411-4/+163
| | | | | | | | | | | | | | | | | involve template parameter packs at multiple template levels that occur within the signatures members of class templates (and partial specializations thereof). This is a work-in-progress that is deficient in several ways, notably: - It only works for template type parameter packs, but we need to also support non-type template parameter packs and template template parameter packs. - It doesn't keep track of the lengths of the substituted argument packs in the expansion, so it can't properly diagnose length mismatches. However, this is a concrete step in the right direction. llvm-svn: 123425
* Replace a literal '8' with getCharWidth().Ken Dyck2011-01-141-1/+2
| | | | llvm-svn: 123421
* Save getObjCGCAttrKind and use it in two placesFariborz Jahanian2011-01-131-2/+3
| | | | | | | for efficiancy (still part of //rdar://8761767). Per John's comment. llvm-svn: 123401
* Rename 'CheckDeadStores.cpp' to 'DeadStoresChecker.cpp'.Ted Kremenek2011-01-132-1/+1
| | | | llvm-svn: 123395
* Remove warning in dead stores checker forTed Kremenek2011-01-131-6/+5
| | | | | | | | dead stores within nested assignments. I have never seen an actual bug found by this specific warning, and it can lead to many false positives. llvm-svn: 123394
* Generate write-barriers for global objcFariborz Jahanian2011-01-131-1/+9
| | | | | | assigns. // rdar://8761767 llvm-svn: 123391
* Move name mangling support from CodeGen to AST. In thePeter Collingbourne2011-01-1322-1593/+1485
| | | | | | | | | | | | | | process, perform a number of refactorings: - Move MiscNameMangler member functions to MangleContext - Remove GlobalDecl dependency from MangleContext - Make MangleContext abstract and move Itanium/Microsoft functionality to their own classes/files - Implement ASTContext::createMangleContext and have CodeGen use it No (intended) functionality change. llvm-svn: 123386
* Only apply the parameter pack matching of C++0x [temp.arg.template]p3Douglas Gregor2011-01-131-1/+2
| | | | | | | | | when we're actually matching a template template argument to a template template parameter. Otherwise, use strict matching. Fixes <rdar://problem/8859985> clang++: variadics and out-of-line definitions. llvm-svn: 123385
* When your comments and your code are out-of-sync, the test case is wrong.Douglas Gregor2011-01-131-1/+1
| | | | llvm-svn: 123379
* Add tests for name mangling of variadic templates.Douglas Gregor2011-01-131-5/+6
| | | | llvm-svn: 123378
* CXXBaseObjectRegion is like FieldRegion. Need to blast through it whenZhongxing Xu2011-01-131-0/+1
| | | | | | getting the base region. This makes the RemoveDeadBindings() correct. llvm-svn: 123375
* Support inlining base initializers. We still haven't got it completely right,Zhongxing Xu2011-01-132-12/+39
| | | | | | | since the bindings are purged after they are set up. Need to investigate RemoveDeadBindings algorithm. llvm-svn: 123374
* Fix a corner case in RegionStore where we assignTed Kremenek2011-01-131-2/+27
| | | | | | | | | | | | | a struct value to a symbolic index into array. RegionStore can't actually reason about this, so we were getting bogus warnings about loading uninitialized values from the array. The solution is invalidate the entire array when we cannot represent the binding explicitly. Fixes <rdar://problem/8848957> llvm-svn: 123368
* Rename 'HasGeneratedNode' to 'hasGeneratedNode'Ted Kremenek2011-01-133-24/+21
| | | | | | | | | and 'getBasePredecessor()' to 'getPredecessor()'. Also remove a unneeded save-and-restore of node builder's tag field. llvm-svn: 123363
* Remove unnecessary save-and-restore of theTed Kremenek2011-01-133-3/+1
| | | | | | node builder's 'HasGeneratedNode' field. llvm-svn: 123362
* Remove CheckerContext's dependence on settingTed Kremenek2011-01-131-2/+1
| | | | | | | the node builder's "tag" ivar (which we would like to remove). llvm-svn: 123361
* Ensure an insertion point at the end of a statement-expression.John McCall2011-01-133-6/+9
| | | | | | Fixes PR8967. llvm-svn: 123360
* optimize out a temporary sys::PathChris Lattner2011-01-131-3/+2
| | | | llvm-svn: 123359
* Only add unnamed_addr to definitions.Rafael Espindola2011-01-132-2/+3
| | | | llvm-svn: 123354
* Allow us to transform pack expansion expressions.Douglas Gregor2011-01-131-2/+8
| | | | llvm-svn: 123349
* Implement C++0x [temp.arg.template]p3, which allows slightly fuzzyDouglas Gregor2011-01-131-23/+76
| | | | | | | | matching of variadic template template parameters to template arguments. This paragraph was the subject of ISO C++ committee document N2555: Extending Variadic Template Template Parameters. llvm-svn: 123348
* replace all uses of PathV1::IsSymlink with PathV2::is_symlink.Michael J. Spencer2011-01-121-1/+2
| | | | llvm-svn: 123344
* Refactor and simplify Sema::TemplateParameterListsAreEqual. We had aDouglas Gregor2011-01-121-133/+106
| | | | | | bunch of duplicated checks for parameter pack/non-pack mismatches. llvm-svn: 123343
* Add the location of the right parenthesis of a C++ named castDouglas Gregor2011-01-124-14/+25
| | | | | | | (static_cast, dynamic_cast, reinterpret_cast, or const_cast) to improve source-location information. Fixes PR8960. llvm-svn: 123336
* Add IR generation support for SizeOfPackExpr.Douglas Gregor2011-01-121-0/+5
| | | | llvm-svn: 123332
* wint_t is defined as 'unsigned int' on Linux. Fixes PR8938.Douglas Gregor2011-01-121-0/+1
| | | | llvm-svn: 123320
* Teach TreeTransform how to transform a pack expansion type intoDouglas Gregor2011-01-122-12/+49
| | | | | | | | | another pack expansion type. This can happen when rebuilding types in the current instantiation. Fixes <rdar://problem/8848837> (Clang crashing on libc++ <functional>). llvm-svn: 123316
* PR3558: mark "logically const" accessor methods in ASTContext as const,Jay Foad2011-01-1213-188/+208
| | | | | | | and mark the fields they use as mutable. This allows us to remove a few const_casts. llvm-svn: 123314
* Add some documentation for C++ static analyzer.Zhongxing Xu2011-01-121-0/+22
| | | | llvm-svn: 123313
* Fix a latent bug where, after emitting an expression statement, we wouldJohn McCall2011-01-123-27/+52
| | | | | | | | | | | | | | delete the block we began emitting into if it had no predecessors. We never want to do this, because there are several valid cases during statement emission where an existing block has no known predecessors but will acquire some later. The case in my test case doesn't inherently fall into this category, because we could safely emit the case-range code before the statement body, but there are examples with labels that can't be fallen into that would also demonstrate this bug. rdar://problem/8837067 llvm-svn: 123303
* Driver: Change -dumpversion to return a GCC compatible answer.Daniel Dunbar2011-01-121-1/+7
| | | | | | - See comment for why. llvm-svn: 123296
* Slight bugfix to the attribute-distribution logic for GC attributes.John McCall2011-01-122-19/+25
| | | | | | Slight optimization of getObjCGCAttrKind. llvm-svn: 123295
* Set unnamed_addr in every type info.Rafael Espindola2011-01-111-4/+2
| | | | llvm-svn: 123293
* Add a comment for r123231.Francois Pichet2011-01-111-0/+2
| | | | llvm-svn: 123291
* Add TemplateArgument::CreatePackCopy() to create a new parameter packDouglas Gregor2011-01-114-21/+26
| | | | | | | in ASTContext-allocated memory, copying the provided template arguments. Use this new routine where we can. No functionality change. llvm-svn: 123289
* Set unnamed_addr in VTTs.Rafael Espindola2011-01-111-0/+1
| | | | llvm-svn: 123280
OpenPOWER on IntegriCloud