summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Fix attribute between function decl ')' and '{' or '=0'John Thompson2009-11-253-0/+17
| | | | llvm-svn: 89894
* Add FIXME.Ted Kremenek2009-11-251-0/+2
| | | | llvm-svn: 89892
* Implement the rules in C++ [basic.link] and C99 6.2.2 for computingDouglas Gregor2009-11-256-10/+240
| | | | | | | | | | | the linkage of a declaration. Switch the lame (and completely wrong) NamedDecl::hasLinkage() over to using the new NamedDecl::getLinkage(), along with the "can this declaration be a template argument?" check that started all of this. Fixes -fsyntax-only for PR5597. llvm-svn: 89891
* Add post-visit Checker support in GRExprEngine for BlockExpr.Ted Kremenek2009-11-252-1/+8
| | | | llvm-svn: 89890
* Add a new RetainReleaseChecker class (that subclasses CheckerVisitor) to ↵Ted Kremenek2009-11-251-0/+22
| | | | | | extend the functionality of the retain/release checker using the new Checker interface. Pieces of CFRefCount will gradually be migrated to this new class over time. llvm-svn: 89889
* Move RegisterChecks() to the end of the file. No functionality change.Ted Kremenek2009-11-251-57/+59
| | | | llvm-svn: 89888
* Call GRExprEngine::setTransferFunctions() after registering all Checkers. ↵Ted Kremenek2009-11-251-2/+2
| | | | | | This allows GRTransferFuncs::RegisterChecks() to always be called after all checkers have been registered. llvm-svn: 89887
* Consolidate logic in ActionInlineCall by having it call ActionGRExprEngine ↵Ted Kremenek2009-11-251-19/+3
| | | | | | instead of replicating most of its logic (and missing pieces). llvm-svn: 89886
* Better diagnostic on deleted constructor when noFariborz Jahanian2009-11-251-2/+5
| | | | | | initializer name is available. llvm-svn: 89885
* Make RegisterInternalChecks() part of GRExprEngine's private implementation ↵Ted Kremenek2009-11-253-33/+32
| | | | | | by making it a static function within GRExprEngine.cpp. llvm-svn: 89884
* Register internal checks with GRExprEngine when it is constructed, not ↵Ted Kremenek2009-11-252-3/+5
| | | | | | manually in AnalysisConsumer.cpp. llvm-svn: 89883
* When dispatching to Checker objects in GRExprEngine::CheckerVisit(),Ted Kremenek2009-11-251-4/+12
| | | | | | | | | only stop processing the checkers after all the nodes for a current check have been processed. This (I believe) handles the case where PredSet (the input nodes) contains more than one node due to state bifurcation. Zhongxing: can you review this? llvm-svn: 89882
* Tweak expected error to match what should happen, once using declarations workDouglas Gregor2009-11-251-3/+2
| | | | llvm-svn: 89876
* Tweak expected error message, although we still fail this testDouglas Gregor2009-11-251-1/+1
| | | | llvm-svn: 89875
* Implement support for default template arguments of function templates.Douglas Gregor2009-11-256-18/+136
| | | | llvm-svn: 89874
* Diagnose ill-formed uses of default template arguments inDouglas Gregor2009-11-256-8/+139
| | | | | | | | | | | function templates (in C++98), friend function templates, and out-of-line definitions of members of class templates. Also handles merging of default template arguments from previous declarations of function templates, for C++0x. However, we don't yet make use of those default template arguments. llvm-svn: 89872
* Use StringRef (again) in DebugInfo interface.Devang Patel2009-11-251-18/+18
| | | | llvm-svn: 89867
* Fix a thinko where we weren't always performing unary conversions on the ↵Douglas Gregor2009-11-251-4/+4
| | | | | | switch condition, fixing PR5612 llvm-svn: 89864
* What the FIXMEs want, the FIXMEs shall have.Daniel Dunbar2009-11-253-57/+32
| | | | llvm-svn: 89861
* Add an arg_iterator, for iterating over a subset of arguments in an ArgList.Daniel Dunbar2009-11-253-78/+119
| | | | llvm-svn: 89860
* Add a missing include <cstdio>Daniel Dunbar2009-11-251-0/+1
| | | | llvm-svn: 89859
* Fix some uses of fprintf/stderr without a prototype.Daniel Dunbar2009-11-251-2/+2
| | | | llvm-svn: 89858
* Add clang -cc1 parsing for frontend options.Daniel Dunbar2009-11-252-1/+136
| | | | llvm-svn: 89856
* Add ParseSourceLocation::FromString, and simplify.Daniel Dunbar2009-11-251-27/+22
| | | | llvm-svn: 89855
* 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
* This patch streamlines CheckerVisitor.def so that it follows the usual ↵Kovarththanan Rajaratnam2009-11-251-6/+10
| | | | | | | | | | | | | | '#ifndef foo' pattern: #ifndef foo #define foo(parm1) #endif foo(parm1) parm1 ... #undef foo llvm-svn: 89851
* 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-253-10/+19
| | | | | | | 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-259-52/+176
| | | | | | The attributes are currently ignored. llvm-svn: 89837
* Don't try to install .dir files.Daniel Dunbar2009-11-251-2/+2
| | | | llvm-svn: 89836
* Add VTT parameter to base ctors/dtors with virtual bases. (They aren't used ↵Anders Carlsson2009-11-256-6/+103
| | | | | | yet). llvm-svn: 89835
* UndefResults is not needed.Zhongxing Xu2009-11-251-11/+0
| | | | llvm-svn: 89834
* Implement proper cleanup semantics for condition variables in forDouglas Gregor2009-11-252-12/+40
| | | | | | | | | | 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-252-5/+49
| | | | | | 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-252-0/+15
| | | | llvm-svn: 89829
* Split CodeTextRegion into FunctionTextRegion and BlockTextRegion. This a ↵Ted Kremenek2009-11-258-39/+115
| | | | | | precursor to having basic static analysis support for blocks. llvm-svn: 89828
* Some fancy footwork to move the decision on how Fariborz Jahanian2009-11-256-23/+31
| | | | | | to build casted expression-list AST to Sema. llvm-svn: 89827
* Qualify the name of the llvm::cast template. I am somewhat amazed that GCC ↵Douglas Gregor2009-11-251-1/+2
| | | | | | parsed this llvm-svn: 89822
* Don't try to parse LinkAllParses.h for nowDouglas Gregor2009-11-251-1/+1
| | | | llvm-svn: 89820
* Tweak the code-generation-for-condition-variables test case to get to what ↵Douglas Gregor2009-11-251-3/+3
| | | | | | we want to test llvm-svn: 89818
* Eliminate CXXConditionDeclExpr with extreme prejudice.Douglas Gregor2009-11-2527-329/+388
| | | | | | | | | | | | | | | | | 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-246-7/+10
| | | | | | definition. This allows sema to not emit spurious diagnostics in some invalid code. llvm-svn: 89816
* Convert test case to FileCheck to test the behavior of the nil-receiver ↵Ted Kremenek2009-11-241-2/+16
| | | | | | checker when the code is targetted for either Tiger or Leopard. llvm-svn: 89810
* For the nil-receiver checker, take into account the behavioral changes that ↵Ted Kremenek2009-11-242-8/+21
| | | | | | 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-247-127/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud