- Jan 30, 2010
-
-
Benjamin Kramer authored
PCHReader doesn't implement classof so dyn_casting it will do really weird stuff. Use a static_cast instead. I don't know if this hack is the right fix. Doug, please take a look. llvm-svn: 94895
-
- Jan 29, 2010
-
-
Douglas Gregor authored
and fix-it information, so we can see everything in one place. Along the way, fix a few bugs with deserialization and query of diagnostics in CIndex. llvm-svn: 94768
-
- Jan 28, 2010
-
-
Douglas Gregor authored
so that CIndex can report diagnostics through the normal mechanisms even when executing Clang in a separate process. This applies both when performing code completion and when using ASTs as an intermediary for clang_createTranslationUnitFromSourceFile(). The serialized format is not perfect at the moment, because it does not encapsulate macro-instantiation information. Instead, it maps all source locations back to the instantiation location. However, it does maintain source-range and fix-it information. To get perfect fidelity from the serialized format would require serializing a large chunk of the source manager; at present, it isn't clear if this code will live long enough for that to matter. llvm-svn: 94740
-
- Jan 26, 2010
-
-
Ted Kremenek authored
Implement 'clang_getInclusions()' in CIndex. This API allows clients to walk the set of files included in a translation unit via the C API. llvm-svn: 94575
-
Douglas Gregor authored
of the tokens within a raw token stream. This does not even attempt to handle macros yet. llvm-svn: 94561
-
Douglas Gregor authored
range. The token-annotation function does nothing, yet. llvm-svn: 94551
-
- Jan 25, 2010
-
-
Douglas Gregor authored
llvm-svn: 94429
-
Douglas Gregor authored
string when given a cursor that does not have a name. Also, don't give silly names for statements and non-reference expressions. llvm-svn: 94426
-
Douglas Gregor authored
the tag kind (union, struct, class, enum) over to the name of the tag, if there is a name, since most clients want to point at the name. llvm-svn: 94424
-
Douglas Gregor authored
condition even when we've visited the condition variable, so that we'll see implicit conversions there. llvm-svn: 94423
-
- Jan 24, 2010
-
-
Chris Lattner authored
llvm-svn: 94344
-
- Jan 23, 2010
-
-
Douglas Gregor authored
explicit casts, sizeof, alignof, and compound literals. llvm-svn: 94265
-
Douglas Gregor authored
translation units that include unsaved files. llvm-svn: 94258
-
- Jan 22, 2010
-
-
Douglas Gregor authored
llvm-svn: 94211
-
Douglas Gregor authored
region of interest (if provided). Implement clang_getCursor() in terms of this traversal rather than using the Index library; the unified cursor visitor is more complete, and will be The Way Forward. Minor other tweaks needed to make this work: - Extend Preprocessor::getLocForEndOfToken() to accept an offset from the end, making it easy to move to the last character in the token (rather than just past the end of the token). - In Lexer::MeasureTokenLength(), the length of whitespace is zero. llvm-svn: 94200
-
Douglas Gregor authored
declarations that have enough source information to make such a walk useful. This includes walking into variable initializers and enum constants, the types behind typedefs, etc. llvm-svn: 94124
-
Douglas Gregor authored
a few important subkinds. Now we're cookin' with gas! llvm-svn: 94116
-
- Jan 21, 2010
-
-
Douglas Gregor authored
kinds, so that we see referenced types, protocols, classes, etc. llvm-svn: 94085
-
Douglas Gregor authored
typedefs only (for now). llvm-svn: 94078
-
- Jan 20, 2010
-
-
Douglas Gregor authored
statements, moving some of the more unnatural kinds of references (VarRef, EnumConstantRef, etc.) over to the expressions. We can now poke at arbitrary expressions and statements with, e.g., clang_getCursor() and get back useful information (e.g., source ranges). llvm-svn: 93946
-
- Jan 19, 2010
-
-
Douglas Gregor authored
API. This is a catch-all for any declaration known to Clang but not specifically part of the CIndex API. We'll use the same approach with expressions, statements, references, etc., as needed. llvm-svn: 93924
-
Douglas Gregor authored
CIndex functions that (1) map from a reference or declaration to the corresponding definition, if available, and (2) determine whether a given declaration cursor is also a definition. This eliminates a lot of duplication in the cursor kinds, and maps more closely to the Clang ASTs. This is another API + ABI breaker with no deprecation. Yay, progress. llvm-svn: 93893
-
Douglas Gregor authored
entity that a particular cursor references. llvm-svn: 93830
-
Douglas Gregor authored
cursor itself. In particular, for references this returns the source range of the reference rather than the source range of the thing it refers to. Switch c-index-test from clang_getDeclExtent (which will eventually be deprecated and removed) over to clang_getCursorExtent. The source ranges we print for references now make sense; fix up the tests appropriately. llvm-svn: 93823
-
- Jan 18, 2010
-
-
Ted Kremenek authored
Replace clang_getDeclUSR() with clang_getCursorUSR(). Also remove printing 'contexts' from c-index-test output; it wasn't helpful and was extremely brittle. llvm-svn: 93760
-
- Jan 16, 2010
-
-
Douglas Gregor authored
in CXCursor.cpp. With this sane representation, fix the class reference that is part of Objective-C category declarations so that the cursor's location matches up with the reference, not the class being referred to. llvm-svn: 93640
-
Douglas Gregor authored
previously only had a single location (the @ in @interface); now we know where the @ is (for the start of the declaration), where the class name is (that's the normal "location" now for diagnostics), and where the category name is. Also, eliminated the redundant "end" location, since ObjCContainerDecl already has better @end information. The only XFAIL'd test is temporary; will un-XFAIL-it once I've taught CIndex how to use the new locations. llvm-svn: 93639
-
Douglas Gregor authored
source locations where the protocols were referenced rather than the location of some random enclosing declaration. llvm-svn: 93637
-
Douglas Gregor authored
to CXCursor.cpp. llvm-svn: 93634
-
Ted Kremenek authored
Remove TranslateKind and centralize Decl -> CXCursorKind in GetCursorKind(). This revealed a bunch of inconsistencies in how CXCursorKinds were being computed. llvm-svn: 93618
-
- Jan 15, 2010
-
-
Douglas Gregor authored
to directly check the results of clang_getCursor(). Also, start migrating some index-test tests over to c-index test [*] and some grep-using tests over to FileCheck. llvm-svn: 93537
-
- Jan 14, 2010
-
-
Douglas Gregor authored
LookupVisibleDecls, unifying the name lookup mechanisms used by code completion and typo correction. Aside from the software-engineering improvements, this makes code-completion see through using directives and see ivars when performing unqualified name lookup in an Objective-C instance method. llvm-svn: 93397
-
Douglas Gregor authored
the "typed" text, first, then take into account nested-name-specifiers, name hiding, etc. This means that the resulting sort is actually alphabetical :) llvm-svn: 93370
-
- Jan 13, 2010
-
-
Douglas Gregor authored
llvm-svn: 93361
-
Douglas Gregor authored
provide completions for @ keywords. Previously, we only provided @-completions after an @ was actually typed, which is useful but probably not the common case. Also, make sure a few Objective-C 2.0 completions only show up when Objective-C 2.0 support is enabled (the default). llvm-svn: 93354
-
- Jan 12, 2010
-
-
Benjamin Kramer authored
llvm-svn: 93238
-
Douglas Gregor authored
embedding single space characters. <rdar://problem/7485503> llvm-svn: 93231
-
- Jan 07, 2010
-
-
Ted Kremenek authored
piece of the declaration. The '@' and the 'end' are separate tokens, and require two SourceLocations to accurately track. This change was motivated because ObjCContainerDecl::getSourceRange() would previously not return the entire range of the declaration (the 'end' would be left off). llvm-svn: 92891
-
Douglas Gregor authored
llvm-svn: 92882
-
Ted Kremenek authored
llvm-svn: 92869
-