summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Add clang -cc1 parsing for preprocessor output options (-E).Daniel Dunbar2009-11-251-0/+6
| | | | llvm-svn: 89854
* Don't pass -fexceptions=0 (it is the default).Daniel Dunbar2009-11-251-8/+4
| | | | llvm-svn: 89853
* Fix for Path::isSpecialFile to Path::isRegularFile API in rev 89765.Edward O'Callaghan2009-11-251-1/+1
| | | | llvm-svn: 89849
* When the condition of a switch() statement is semantically invalid,Douglas Gregor2009-11-252-9/+8
| | | | | | | still parse the body of the switch to try to avoid spurious diagnostics. Fixes PR5606. llvm-svn: 89847
* Don't crash when we re-use a template specialization node for an explicit ↵Douglas Gregor2009-11-251-5/+9
| | | | | | instantiation. lib/Support/CommandLine.cpp is our test case llvm-svn: 89845
* Refactor ActOnFinishSwitchStmt to simplify it furtherDouglas Gregor2009-11-251-14/+6
| | | | llvm-svn: 89843
* Refactor ActOnFinishSwitchStmt to simplify and reduce nestingDouglas Gregor2009-11-251-93/+106
| | | | llvm-svn: 89842
* Parse C++ member check attributes - base_check, hiding, and override.Alexis Hunt2009-11-255-50/+146
| | | | | | The attributes are currently ignored. llvm-svn: 89837
* Add VTT parameter to base ctors/dtors with virtual bases. (They aren't used ↵Anders Carlsson2009-11-255-6/+86
| | | | | | yet). llvm-svn: 89835
* Implement proper cleanup semantics for condition variables in forDouglas Gregor2009-11-251-11/+34
| | | | | | | | | | statements, e.g., for(; X x = X(); ) { ... } Daniel or Anders, please review! llvm-svn: 89832
* Add really basic support for blocks in the retain/release checker. For now, ↵Ted Kremenek2009-11-251-3/+14
| | | | | | anytime we pass a tracked object to a block call we stop tracking it. llvm-svn: 89831
* Allow building of CFGs for ASTs that contain BlockExprs.Ted Kremenek2009-11-251-3/+6
| | | | llvm-svn: 89830
* Add transfer function support for BlockExpr.Ted Kremenek2009-11-251-0/+12
| | | | llvm-svn: 89829
* Split CodeTextRegion into FunctionTextRegion and BlockTextRegion. This a ↵Ted Kremenek2009-11-256-16/+49
| | | | | | precursor to having basic static analysis support for blocks. llvm-svn: 89828
* Some fancy footwork to move the decision on how Fariborz Jahanian2009-11-254-18/+25
| | | | | | to build casted expression-list AST to Sema. llvm-svn: 89827
* Eliminate CXXConditionDeclExpr with extreme prejudice.Douglas Gregor2009-11-2518-262/+264
| | | | | | | | | | | | | | | | | All statements that involve conditions can now hold on to a separate condition declaration (a VarDecl), and will use a DeclRefExpr referring to that VarDecl for the condition expression. ForStmts now have such a VarDecl (I'd missed those in previous commits). Also, since this change reworks the Action interface for if/while/switch/for, use FullExprArg for the full expressions in those expressions, to ensure that we're emitting Note that we are (still) not generating the right cleanups for condition variables in for statements. That will be a follow-on commit. llvm-svn: 89817
* Have the parser tell sema whether a member declaration is a function ↵Sebastian Redl2009-11-244-4/+7
| | | | | | definition. This allows sema to not emit spurious diagnostics in some invalid code. llvm-svn: 89816
* For the nil-receiver checker, take into account the behavioral changes that ↵Ted Kremenek2009-11-241-6/+19
| | | | | | got introduced in Mac OS X 10.5 and later, notably return values of double, float, etc., will not be garbage. Fixes <rdar://problem/6829160>. llvm-svn: 89809
* Cleanups and fixes to the nil-receiver checker, some of it fallout theTed Kremenek2009-11-242-114/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | initial transition of the nil-receiver checker to the Checker interface as done in r89745. Some important changes include: 1) We consolidate the BugType object used for nil receiver bug reports, and don't include the type of the returned value in the BugType (which would be wrong if a nil receiver bug was reported more than once) 2) Added a new (temporary) flag to CheckerContext: DoneEvauating. This is used by GRExprEngine when evaluating message expressions to not continue evaluating the message expression if this flag is set. This flag is currently set by the nil receiver checker. This is an intermediate solution to allow the nil-receiver checker to properly work as a plug-in outside of GRExprEngine. Basically, this flag indicates that the entire message expression has been evaluated, not just a precondition (which is what the nil-receiver checker does). This flag *should not* be repurposed for general use, but just to pull more things out of GRExprEngine that already in there as we devise a better interface in the Checker class. 3) Cleaned up the logic in the nil-receiver checker, making the control-flow a lot easier to read. llvm-svn: 89804
* Refactor argument collection of constructor calls usingFariborz Jahanian2009-11-244-52/+14
| | | | | | the common routine. llvm-svn: 89802
* "Do" loops cannot have condition variables, so don't parse them.Douglas Gregor2009-11-241-4/+3
| | | | llvm-svn: 89801
* Clean up the AST for while loops and fix several problems withDouglas Gregor2009-11-246-11/+91
| | | | | | | | | | | | | | | | | cleanups for while loops: 1) Make sure that we destroy the condition variable of a while statement each time through the loop for, e.g., while (shared_ptr<WorkInt> p = getWorkItem()) { // ... } 2) Make sure that we always enter a new cleanup scope for the body of the while loop, even when there is no compound expression, e.g., while (blah) RAIIObject raii(blah+1); llvm-svn: 89800
* Handle references correctly when synthesizing copy constructors.Anders Carlsson2009-11-241-8/+28
| | | | | | | | | | | With this change, the clang-on-clang test result is now Expected Passes : 224 Unexpected Failures: 37 Which means that we can compile over 80% of clang with clang! :) llvm-svn: 89799
* Fix some major problems dealing with dependently-qualified names in implicitJohn McCall2009-11-241-4/+11
| | | | | | member-reference contexts. Fixes some clang-on-clang asserts. llvm-svn: 89796
* More cleanup of argument call collection.Fariborz Jahanian2009-11-243-20/+26
| | | | llvm-svn: 89789
* Rip out TemplateIdRefExpr and make UnresolvedLookupExpr and John McCall2009-11-2415-666/+802
| | | | | | | | | | | | DependentScopeDeclRefExpr support storing templateids. Unite the common code paths between ActOnDeclarationNameExpr and ActOnTemplateIdExpr. This gets us to a point where we don't need to store function templates in the AST using TemplateNames, which is critical to ripping out OverloadedFunction. Also resolves a few FIXMEs. llvm-svn: 89785
* Handle cases where we're constructing an array of objects and the ↵Anders Carlsson2009-11-243-36/+67
| | | | | | constructor has default arguments. llvm-svn: 89783
* Helper function for turning a TemplateName into a DeclarationName.John McCall2009-11-241-0/+16
| | | | llvm-svn: 89782
* Refactor collection of call arguments in common code.Fariborz Jahanian2009-11-243-48/+64
| | | | | | | Add support for variadic collection functions. More to do here. llvm-svn: 89781
* GNUNullExpr is a valid sentinel even though it isn't of pointer type.Anders Carlsson2009-11-241-3/+4
| | | | llvm-svn: 89778
* Explicitly store the condition variable within switch statements, andDouglas Gregor2009-11-245-2/+30
| | | | | | | make sure that this variable is destroyed when we exit the switch statement. llvm-svn: 89776
* We always need to emit the base expression of a member expression, even when ↵Anders Carlsson2009-11-241-2/+9
| | | | | | the member decl refers to an enum. Thanks to Eli for pointing this out! llvm-svn: 89775
* Fix a crash when "instantiating" VarDecls that are neither type nor value ↵Anders Carlsson2009-11-241-0/+1
| | | | | | dependent. llvm-svn: 89774
* Introduce cleanup scopes for "if" statements in two places:Douglas Gregor2009-11-242-12/+41
| | | | | | | | | | | | | | | | - Outside the "if", to ensure that we destroy the condition variable at the end of the "if" statement rather than at the end of the block containing the "if" statement. - Inside the "then" and "else" branches, so that we emit then- or else-local cleanups at the end of the corresponding block when the block is not a compound statement. To make adding these new cleanup scopes easier (and since switch/do/while will all need the same treatment), added the CleanupScope RAII object to introduce a new cleanup scope and make sure it gets cleaned up. llvm-svn: 89773
* Rename CleanupScope -> DelayedCleanupBlock. No functionality change.Douglas Gregor2009-11-243-10/+10
| | | | llvm-svn: 89769
* Un-break instantiation of if statements with conditional variablesDouglas Gregor2009-11-241-1/+10
| | | | llvm-svn: 89767
* Fix for PR5568.Edward O'Callaghan2009-11-241-0/+7
| | | | llvm-svn: 89766
* We can remove this file now.Zhongxing Xu2009-11-242-31/+0
| | | | llvm-svn: 89751
* Refactor undefined result checker. This is the last one.Zhongxing Xu2009-11-245-154/+122
| | | | llvm-svn: 89750
* Refactor NilReceiverStructRet and NilReceiverLargerThanVoidPtrRet into Zhongxing Xu2009-11-244-157/+134
| | | | | | CallAndMessageChecker. llvm-svn: 89745
* Get rid of the ugly CGCXX names and replace them with CGClass, CGExprCXX and ↵Anders Carlsson2009-11-244-7/+7
| | | | | | CGTemporaries. llvm-svn: 89742
* When mangling a ctor/dtor we need to take into consideration whether it's a ↵Anders Carlsson2009-11-241-2/+17
| | | | | | member template. llvm-svn: 89741
* Set the template specialization kind before instantiating the function ↵Anders Carlsson2009-11-241-2/+2
| | | | | | definition so that the function will have the right linkage. llvm-svn: 89740
* Teach Evaluate to handle member expressions referring to enum constants andEli Friedman2009-11-241-8/+21
| | | | | | | | static member constants. No significant visible difference at the moment because it conservatively assumes the base has side effects. I'm planning to use this for CodeGen. llvm-svn: 89738
* Ignore constructor member templates in CodeGenModule::EmitTopLevelDecl.Anders Carlsson2009-11-241-0/+4
| | | | llvm-svn: 89737
* It is common for vtables to contain pointers to functions that have either ↵Anders Carlsson2009-11-243-4/+33
| | | | | | | | incomplete return types or incomplete argument types. Handle this by returning the llvm::OpaqueType for those cases, which CodeGenModule::GetOrCreateLLVMFunction knows about, and treats as being an "incomplete function". llvm-svn: 89736
* rename UndefinedArgChecker to CallAndMessageChecker.Zhongxing Xu2009-11-243-16/+16
| | | | llvm-svn: 89735
* Rename: UndefinedArgChecker.cpp => CallAndMessageChecker.cppZhongxing Xu2009-11-242-1/+1
| | | | llvm-svn: 89734
* Enhance null dereference diagnostics by indicating what variable (if any) ↵Ted Kremenek2009-11-242-4/+27
| | | | | | was dereferenced. Addresses <rdar://problem/7039161>. llvm-svn: 89726
* Sketch the rest of the clang -cc1 option definitions, aka fun with C-x C-(.Daniel Dunbar2009-11-241-0/+21
| | | | llvm-svn: 89721
OpenPOWER on IntegriCloud