summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Synchronize code-completion cursor kinds with indexing cursorDouglas Gregor2010-09-031-0/+6
| | | | | | | kinds. How shameful that this code was duplicated! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113033 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow anonymous and local types. The support was already in place for these,Chandler Carruth2010-09-032-3/+6
| | | | | | | but this makes them work even as an extension in C++98. This resolves PR8077. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113011 91177308-0d34-0410-b5e6-96231b3b80d8
* Use getSpelling to get original text of theFariborz Jahanian2010-09-031-9/+2
| | | | | | | c++ operator token. (radar 8328250). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112977 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a quick-and-dirty hack to give a better diagnostic for [class.protected]John McCall2010-09-031-0/+2
| | | | | | | | | | | | restrictions. The note's not really on the right place given its wording, but putting a second note on the call site (or muddying the wording) doesn't appeal. There are corner cases where this can be wrong, but I'm not concerned. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112950 91177308-0d34-0410-b5e6-96231b3b80d8
* Devirtualize Sema, kill off DeleteExpr and DeleteStmt, and reformat.John McCall2010-09-031-876/+812
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112945 91177308-0d34-0410-b5e6-96231b3b80d8
* Add symantic support for the Pascal calling convention viaDawn Perchik2010-09-035-2/+16
| | | | | | | | "__attribute((pascal))" or "__pascal" (and "_pascal" under -fborland-extensions). Support still needs to be added to llvm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112939 91177308-0d34-0410-b5e6-96231b3b80d8
* Patch to allow alternative representation of c++Fariborz Jahanian2010-09-031-1/+9
| | | | | | | | | operators (and, or, etc.) to be used as selectors to match g++'s behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112935 91177308-0d34-0410-b5e6-96231b3b80d8
* Add optional record of "location" SVals in the environment. When we ↵Ted Kremenek2010-09-032-1/+14
| | | | | | analyzing loads/stores, we lose the location SVal, which makes it difficult to recover in some cases (e.g., for post diagnostics). This is prep for pending changes to GRExprEngine. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112930 91177308-0d34-0410-b5e6-96231b3b80d8
* Add GRState::getSimplifiedSVal(), which provides an API hook for doing ↵Ted Kremenek2010-09-031-2/+9
| | | | | | | | symbol -> constant folding. This isn't used yet, but is prep for some pending optimizations in GRExprEngine. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112929 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix enum: CallEnter/CallExit are StmtPointsTed Kremenek2010-09-031-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112928 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of the "functions declared 'noreturn' should have a 'void' result ↵Anders Carlsson2010-09-031-3/+0
| | | | | | | | | | | type" warning. The rationale behind this is that it is normal for callback functions to have a non-void return type and it should still be possible to mark them noreturn. (JavaScriptCore is a good example of this). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112918 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for Borland extensions via option -fborland-extensionsDawn Perchik2010-09-023-1/+6
| | | | | | | (original patch r112791 was reverted due to a bug). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112915 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply 112850 and 112839 with a constructor for the BinaryOperatorData ↵Tom Care2010-09-021-0/+3
| | | | | | struct. Clang would zero out the enum and pointer in the struct in some conditions, but GCC would never zero out the values. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112909 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a couple of FIXMEs. The types of palignr are different here than in GCC.Bill Wendling2010-09-021-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112891 91177308-0d34-0410-b5e6-96231b3b80d8
* sabre points out that the timing here is pretty pessimal; I'll retry theJohn McCall2010-09-022-4/+3
| | | | | | | | experiment in a few days. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112882 91177308-0d34-0410-b5e6-96231b3b80d8
* Experimentally move the tautological comparison warnings from -Wsign-compareJohn McCall2010-09-022-3/+4
| | | | | | | | | to -Wtautological-compare. This implies that they're now on by default. If this causes chaos, I'll figure something else out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112877 91177308-0d34-0410-b5e6-96231b3b80d8
* Reorder the MMX builtins to be in their own ostracized group.Bill Wendling2010-09-021-67/+73
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112872 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate CXXBindReferenceExpr, which was used in a ton ofDouglas Gregor2010-09-024-66/+0
| | | | | | | well-intentioned but completely unused code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112868 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverting 112850 and 112839 due to test failures on some systemsTom Care2010-09-021-3/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112857 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach RecursiveASTVisitor to optionally visit bodies of instantiations.John McCall2010-09-021-9/+143
| | | | | | | | Based on a patch by Francois Pichet! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112848 91177308-0d34-0410-b5e6-96231b3b80d8
* Improved error reporting in IdempotentOperationCheckerTom Care2010-09-021-0/+3
| | | | | | | | | - SourceRange highlighting is only given for the relevant side of the operator (assignments give both) - Added PostVisitBinaryOperator hook to retrieve the ExplodedNode for an operator - Added a BugReporterVisitor to display the last store to every VarDecl in a Stmt - Changed bug reporting to use the new BugReporterVisitor git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112839 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid implicit string construction.Benjamin Kramer2010-09-021-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112820 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverting rev 112791 - apparently -fborland-extensions is on all the time?!Dawn Perchik2010-09-023-6/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112797 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for Borland extensions via option -fborland-extensionsDawn Perchik2010-09-023-1/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112791 91177308-0d34-0410-b5e6-96231b3b80d8
* For GRExprEngine::EvalBind() (and called visitors), unifiy StoreE and ↵Ted Kremenek2010-09-022-10/+7
| | | | | | AssignE. Now StoreE (const Stmt*) represents the expression where the store took place, which is the assignment expression if it takes place in an assignment. This removes some conceptual dissidence as well as removes an extra parameter from the Checker::PreVisitBind() visitor. It also improves ranges and source location information in analyzer diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112789 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixes a warning when compiling Clang (Sema has virtual methods but a ↵Zhanyong Wan2010-09-021-1/+1
| | | | | | non-virtual dtor). Reviewed by chandlerc and nlewycky. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112786 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce a new libclang function,Douglas Gregor2010-09-022-1/+32
| | | | | | | | | | | clang_getSpecializedCursorTemplate(), which determines the template (or member thereof) that the given cursor specializes or from which it was instantiated. This routine can be used to establish a link between templates and their instantiations/specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112780 91177308-0d34-0410-b5e6-96231b3b80d8
* Make RecursiveASTVisitor not crash when a TemplateArgumentLoc object has a ↵Zhanyong Wan2010-09-011-2/+5
| | | | | | NULL TypeSourceInfo*. This fixes the symptom of http://llvm.org/PR8043. Reviewed by csilvers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112777 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some MMX builtins to correspond with the intrinsics now accepted byBill Wendling2010-09-011-0/+16
| | | | | | | | LLVM. This will be used by the mmintrin.h header, but that bit still needs to be worked out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112776 91177308-0d34-0410-b5e6-96231b3b80d8
* Update the docstring to say FriendTemplateDecl is not actually used.Craig Silverstein2010-09-011-1/+4
| | | | | | | Based on discussion with rjmccall and dgregor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112762 91177308-0d34-0410-b5e6-96231b3b80d8
* Make some docstring clarifications, after discussion with dgregor.Craig Silverstein2010-09-011-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112759 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the source-range information for an EnumConstantDecl; previously,Douglas Gregor2010-09-011-0/+2
| | | | | | | it did not include the initializer expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112739 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement libclang support for using declarations. Clang actually usesDouglas Gregor2010-09-012-16/+17
| | | | | | | | | | | | | | | | | | three different kinds of AST nodes to represent using declarations: UsingDecl, UnresolvedUsingValueDecl, and UnresolvedUsingTypenameDecl. These three are collapsed into a single cursor kind for using declarations, since libclang clients don't need the distinction. Several related changes here: - Cursor visitation of the three AST nodes for using declarations - Proper source-range computation for these AST nodes - Using declarations have no USRs, since they don't actually declare any entities. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112730 91177308-0d34-0410-b5e6-96231b3b80d8
* Make it clear that libclang does not modify the command-line argumentsDouglas Gregor2010-09-011-3/+3
| | | | | | | it is given. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112717 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement libclang support for using directives (cursor + visitation +Douglas Gregor2010-09-012-34/+21
| | | | | | | | | suppressing USRs). Also, fix up the source location information for using directives so that the declaration location refers to the namespace name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112693 91177308-0d34-0410-b5e6-96231b3b80d8
* Split ObjCInterfaceDecl::ReferencedProtocols into two lists: ↵Ted Kremenek2010-09-011-5/+31
| | | | | | | | | | | | | ReferencedProtocols and AllReferencedProtocols. ReferencedProtocols (and thus protocol_begin(), protocol_end()) now only contains the list of protocols that were directly referenced in an @interface declaration. 'all_referenced_protocol_[begin,end]()' now returns the set of protocols that were referenced in both the @interface and class extensions. The latter is needed for semantic analysis/codegen, while the former is needed to maintain the lexical information of the original source. Fixes <rdar://problem/8380046>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112691 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve location information in the representation of namespaceDouglas Gregor2010-09-011-23/+16
| | | | | | | | | | | | | | | | | aliases. Previously, the location of the alias was at the "namespace" keyword. Now, it's on the identifier being declared (as is the custom for Clang), and we keep a separate source location for the "namespace" keyword. Also, added a getSourceRange() member function to NamespaceAliasDecl to correctly compute the source range. Finally, removed a bunch of setters from NamespaceAliasDecl and gave ASTReaderDecl friendship so that it could set the corresponding fields directly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112681 91177308-0d34-0410-b5e6-96231b3b80d8
* Add libclang support for namespace aliases (visitation + USRs) alongDouglas Gregor2010-08-311-3/+8
| | | | | | | | | | | | | with a new cursor kind for a reference to a namespace. There's still some oddities in the source location information for NamespaceAliasDecl that I'll address with a separate commit, so the source locations displayed in the load-namespaces.cpp test will change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112676 91177308-0d34-0410-b5e6-96231b3b80d8
* Add convenience accessors for determining whether template declarations are ↵John McCall2010-08-312-0/+18
| | | | | | definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112656 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new libclang function clang_getTemplateCursorKind(), whichDouglas Gregor2010-08-311-1/+21
| | | | | | | | | | | | determines the kind of declaration that would be generated if the given template were instantiated. This allows a client to distinguish among class/struct/union templates and function/member function/static member function templates. Also, teach clang_CXXMethod_isStatic() about function templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112655 91177308-0d34-0410-b5e6-96231b3b80d8
* Make inline namespace not be transparent after all. The concept simply ↵Sebastian Redl2010-08-311-4/+4
| | | | | | doesn't fit. Instead, special-case the few places where transparent contexts have the desired behavior for inline namespaces. Fixes a redeclaration issue in inline namespaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112637 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend libclang with a new cursor kind that indicates a reference to aDouglas Gregor2010-08-311-1/+6
| | | | | | | | | | template. Such cursors occur, for example, in template specialization types such as vector<int>. Note that we do not handle the super-interesting case where the template name is unresolved, e.g., within a template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112636 91177308-0d34-0410-b5e6-96231b3b80d8
* Add libclang support for class template partial specializations,Douglas Gregor2010-08-311-1/+3
| | | | | | | including a cursor kind, visitation, and USRs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112629 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a libclang cursor kind, visitation support and USR support for C++Douglas Gregor2010-08-311-1/+4
| | | | | | | class templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112627 91177308-0d34-0410-b5e6-96231b3b80d8
* AST work to support [C++] [IRgen] for ?: with missing LHSFariborz Jahanian2010-08-311-9/+17
| | | | | | | | This is also pr7726 and wip. No change in functionality at this time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112612 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement basic support for indexing function templates inDouglas Gregor2010-08-312-1/+16
| | | | | | | | | | | | | | | libclang. This includes: - Cursor kind for function templates, with visitation logic - Cursor kinds for template parameters, with visitation logic - Visitation logic for template specialization types, qualified type locations - USR generation for function templates, template specialization types, template parameter types. Also happens to fix PR7804, which I tripped across while testing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112604 91177308-0d34-0410-b5e6-96231b3b80d8
* libclang indexing support for C++ constructors, destructors, andDouglas Gregor2010-08-311-2/+7
| | | | | | | | | conversion functions. This introduces new cursor kinds for these three C++ entities, and reworks visitation of function declarations so that we get type-source information for the names. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112600 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable inline namespaces in C++03 as an extension.Sebastian Redl2010-08-311-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112566 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable inline namespaces in the AST.Sebastian Redl2010-08-312-11/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112564 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename DeclContext::getLookupContext to getRedeclContext and change its ↵Sebastian Redl2010-08-312-19/+30
| | | | | | semantics slightly. No functionality change in the absence of inline namespaces. Also, change a few places where inline namespaces actually make a difference to be prepared for them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112563 91177308-0d34-0410-b5e6-96231b3b80d8