summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Explicitly track the condition variable within an "if" statement,Douglas Gregor2009-11-237-5/+52
| | | | | | | | | rather than burying it in a CXXConditionDeclExpr (that occassionally hides behind implicit conversions). Similar changes for switch, while, and do-while will follow, then the removal of CXXConditionDeclExpr. This commit is the canary. llvm-svn: 89717
* Add clang -cc1 parsing of diagnostic options.Daniel Dunbar2009-11-232-39/+60
| | | | llvm-svn: 89716
* After performing a bounds check in ArrayBoundChecker, record the fact that a ↵Ted Kremenek2009-11-231-0/+6
| | | | | | bounds check succeeded by transitioning the ExplodedGraph. llvm-svn: 89712
* Clean up the Checker API a little more, resolving some hidden bugsTed Kremenek2009-11-2319-49/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | along the way. Important changes: 1) To generate a sink node, use GenerateSink(); GenerateNode() is for generating regular transitions. This makes the API clearer and also allows us to use the 'bool' option to GenerateNode() for a different purpose. 2) GenerateNode() now automatically adds the generated node to the destination ExplodedNodeSet (autotransition) unless the client specifies otherwise with a bool flag. Several checkers did not call 'addTransition()' after calling 'GenerateNode()', causing the simulation path to be prematurely culled when a non-fail stop bug was encountered. 3) Add variants of GenerateNode()/GenerateSink() that take neither a Stmt* or a GRState*; most callers of GenerateNode() just pass in the same Stmt* as provided when the CheckerContext object is created; we can just use that the majority of the time. This cleanup also allows us to potentially coelesce the APIs for evaluating branches and end-of-paths (which currently directly use builders). 4) addTransition() no longer needs to be called except for a few cases. We now have a variant of addTransition() that takes a GRState*; this allows one to propagate the updated state without caring about generating a new node explicitly. This nicely cleaned up a bunch of cases that called autoTransition() with a bunch of conditional logic surround the call (that common logic has now been swallowed up by addTransition() itself). llvm-svn: 89707
* Don't try to treat an enum constant as an lvalue.Anders Carlsson2009-11-231-1/+8
| | | | llvm-svn: 89705
* Convert the && and || operands to bool using standard conversions. Fixes PR5593.Anders Carlsson2009-11-231-9/+31
| | | | llvm-svn: 89704
* Fixe a crash in encoding of SEL type caused by recent changes.Fariborz Jahanian2009-11-231-4/+5
| | | | llvm-svn: 89696
* Handle converting member pointers to bool.Anders Carlsson2009-11-233-2/+38
| | | | llvm-svn: 89692
* Fix a recent regression probably caused by addition of altivec-styleFariborz Jahanian2009-11-232-1/+5
| | | | | | type-casts in the parser. llvm-svn: 89691
* Provide out-of-line definition for destructor of Checker.Ted Kremenek2009-11-232-0/+19
| | | | llvm-svn: 89688
* Tweak UndefBranchChecker to register the most nested "undefined" expression ↵Ted Kremenek2009-11-231-3/+4
| | | | | | with bugreporter::registerTrackNullOrUndefValue instead of the condition itself. llvm-svn: 89682
* Make 'SEL' pointer to a builtin type and not anFariborz Jahanian2009-11-232-1/+2
| | | | | | | objective-c pointer type. This was a serious mishap and luckily, Ted's test caught that (and patch fixes the test case). llvm-svn: 89680
* Cleanup title/description of "undefined branch" BugType and add some test ↵Ted Kremenek2009-11-231-2/+1
| | | | | | cases for this check. llvm-svn: 89679
* Handle base-to-derived casts. Will land test case shortly.Anders Carlsson2009-11-235-51/+153
| | | | llvm-svn: 89678
* Put back hard-coded paths for win32 until I figure out what happened to ↵John Thompson2009-11-231-0/+19
| | | | | | failed tests. llvm-svn: 89677
* Intercept sizeof and alignof references before they get into ASTContext ↵Sebastian Redl2009-11-233-13/+41
| | | | | | methods. This fixes a crash when writing sizeof(Incomplete&), and lets ASTContext's methods do the right thing for CodeGen, which fixes PR5590. llvm-svn: 89668
* Reorder the header search a bit so that it matches gcc exactly:Rafael Espindola2009-11-231-5/+7
| | | | | | | *) the ../backward dir is the last in libstdc++ to be searched *) If compiling c++, the c++ headers are searched first llvm-svn: 89661
* Let using directives refer to namespace aliases. Fixes PR5479.Sebastian Redl2009-11-233-19/+27
| | | | llvm-svn: 89657
* Require a class type to be complete before probing its conversionDouglas Gregor2009-11-231-0/+7
| | | | | | | functions for a switch condition's conversion to integral or enumeration type. llvm-svn: 89656
* Implement conversion from a switch condition with class type to anDouglas Gregor2009-11-231-32/+98
| | | | | | integral or enumeration type (vi user-defined conversions). Fixes PR5518. llvm-svn: 89655
* Canonical template arguments that are template template parameters byDouglas Gregor2009-11-231-2/+12
| | | | | | | their template parameter depth and position, so that we can match redeclarations appropriately. Fixes PR5527 and PR5528. llvm-svn: 89654
* Improve type-checking of templates by distinguishing between membersDouglas Gregor2009-11-231-6/+2
| | | | | | | of the current instantiation and members of an unknown specialization when type-checking a qualified-if expression. llvm-svn: 89653
* Do not mark declarations as used when performing overload resolution. Fixes ↵Douglas Gregor2009-11-233-4/+21
| | | | | | PR5541 llvm-svn: 89652
* Tolerate extraneous "template<>" headers better, downgrading theDouglas Gregor2009-11-231-4/+16
| | | | | | | | | | complaint to a warning and providing a helpful node in the case where the "template<>" header is redundant because the corresponding template-id refers to an explicit specialization. C++0x might still change this behavior, and existing practice is all over the place on the number of "template<>" headers actually needed. llvm-svn: 89651
* Fix CMake buildDouglas Gregor2009-11-231-0/+1
| | | | llvm-svn: 89650
* Centralize and complete the computation of value- and type-dependence for ↵Douglas Gregor2009-11-239-91/+74
| | | | | | DeclRefExprs llvm-svn: 89649
* UndefBranchChecker: more bug reporter helper information emit.Zhongxing Xu2009-11-232-90/+54
| | | | llvm-svn: 89643
* Initial refactor of UndefBranchChecker. We still use GRBranchNodeBuilderZhongxing Xu2009-11-234-41/+99
| | | | | | in the checker directly. But I don't have a better approach for now. llvm-svn: 89640
* Encapsulate "an array of TemplateArgumentLocs and two angle bracket ↵John McCall2009-11-2316-475/+299
| | | | | | | | | | locations" into a new class. Use it pervasively throughout Sema. My fingers hurt. llvm-svn: 89638
* Teach CodeGenFunction::EmitDecl to ignore Using and UsingShadow decls.Daniel Dunbar2009-11-231-2/+6
| | | | llvm-svn: 89633
OpenPOWER on IntegriCloud