| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
- Doug, please review.
llvm-svn: 96162
|
|
|
|
|
|
|
| |
doesn't need to be a full token.
- Doug, please review.
llvm-svn: 96161
|
|
|
|
| |
llvm-svn: 96157
|
|
|
|
| |
llvm-svn: 96156
|
|
|
|
|
|
| |
having overloaded functions with inverse semantics.
llvm-svn: 96155
|
|
|
|
| |
llvm-svn: 96145
|
|
|
|
|
|
|
|
|
| |
see it. Instead, translate the locations up-front when we create a
CXSourceRange.
- This is part of a move to make CXSourceRange a pure half-open range, which is
a more natural API for clients to deal with. More cleanups to follow.
llvm-svn: 96144
|
|
|
|
|
|
|
|
|
|
|
|
| |
std::string that is reconstructed
every time they are called:
getClangRevision()
getClangFullRepositoryVersion()
getClangFullVersion()
llvm-svn: 96033
|
|
|
|
|
|
|
| |
and CXXRecordDecl::getDefinition(); it's totally unnecessary. No
functionality change.
llvm-svn: 95836
|
|
|
|
| |
llvm-svn: 95602
|
|
|
|
|
|
| |
appropriately. Call out a few missing cases in the expression mangler.
llvm-svn: 95176
|
|
|
|
|
|
|
|
| |
side effect, this also fixes some cases on Windows where the file would end up
on a different drive, because tmpnam doesn't include the drive component. PR3837
strikes again.
llvm-svn: 95067
|
|
|
|
|
|
|
|
| |
external ASTs, and the ASTUnit fails to load.
Also, move getLocationFromExpr outside extern "C" block.
llvm-svn: 95065
|
|
|
|
|
|
| |
definition. With that in mind, rename getDefinition to getAnyInitializer (to distinguish it from getInit) and reimplement it in terms of isThisDeclarationADefinition. Update all code to use this new function.
llvm-svn: 94999
|
|
|
|
|
|
| |
have sent Ted a test case for this.
llvm-svn: 94935
|
|
|
|
| |
llvm-svn: 94930
|
|
|
|
|
|
| |
reference to a temporary LangOptions object.
llvm-svn: 94928
|
|
|
|
|
|
|
|
|
|
| |
that diagnostics with a source location should occur inside
{Begin,End}SourceFile.
Note that code completion is currently passing in an invalid LangOptions object
due to its implementation, I need to sort this out with Doug.
llvm-svn: 94927
|
|
|
|
| |
llvm-svn: 94791
|
|
|
|
|
|
| |
when given bad inputs.
llvm-svn: 94769
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
diagnostic callback mechanism, so all diagnostics now go through that
callback. Also, eliminate the displayDiagnostics flag to
clang_createIndex(), since it is no longer necessary: the client
determines whether to display diagnostics or not.
llvm-svn: 94714
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
clients can format diagnostics as they wish rather than having to
parse standard error. All of the important parts of the front end's
diagnostics are exposed: text, severity, location, source ranges, and
fix-its. The diagnostics callback is now available with
clang_createTranslationUnitFromSource() and
clang_createTranslationUnit().
As part of this change, CXSourceLocation and CXSourceRange got one
pointer larger, since we need to hold on to the SourceManager and
LangOptions structures in the source location. This is the minimum
amount of information needed for the functions that operate on source
locations and ranges (as implemented now). Previously we held on to
the ASTContext, but the diagnostics callback can end up with source
locations when there is no ASTContext (or preprocessor).
Still to do:
- Code completion needs to support the diagnostics callback, once we
have the ability to (de-)serialize diagnostics.
- Eliminate the "displayDiagnostics" argument to createIndex; we'll
always pass diagnostics to the callback and let it deal with display.
llvm-svn: 94709
|
|
|
|
| |
llvm-svn: 94668
|
|
|
|
|
|
| |
walk the set of files included in a translation unit via the C API.
llvm-svn: 94575
|
|
|
|
|
|
| |
offset parameter to clang_getInstantiationLocation().
llvm-svn: 94573
|
|
|
|
|
|
|
| |
of the tokens within a raw token stream. This does not even attempt to
handle macros yet.
llvm-svn: 94561
|
|
|
|
|
|
| |
range. The token-annotation function does nothing, yet.
llvm-svn: 94551
|
|
|
|
|
|
| |
source location in file + offset.
llvm-svn: 94497
|
|
|
|
|
|
| |
back) to a separate header file.
llvm-svn: 94462
|
|
|
|
| |
llvm-svn: 94447
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 94425
|
|
|
|
|
|
|
| |
condition even when we've visited the condition variable, so that
we'll see implicit conversions there.
llvm-svn: 94423
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
asserts in cursor construction functions to make this more obvious.
Doug, please check. c-index-test would previously crash on this code:
--
for(;;) {}
--
Do we need a custom visit of the for statement to cover the variable
declarations?
llvm-svn: 94391
|
|
|
|
| |
llvm-svn: 94379
|
|
|
|
| |
llvm-svn: 94273
|
|
|
|
|
|
| |
explicit casts, sizeof, alignof, and compound literals.
llvm-svn: 94265
|
|
|
|
|
|
| |
translation units that include unsaved files.
llvm-svn: 94258
|
|
|
|
|
|
| |
Clang version string through the CIndex API.
llvm-svn: 94242
|
|
|
|
|
|
|
|
| |
- Added more routines to manipulate/compare source locations and ranges
- Switched clang_getCursor() over to take a CXSourceLocation rather
than file/line/column.
llvm-svn: 94226
|
|
|
|
|
|
| |
weren't actually using any of its facilities.
llvm-svn: 94210
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 94126
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
a few important subkinds. Now we're cookin' with gas!
llvm-svn: 94116
|
|
|
|
|
|
|
| |
is hard to test now; tests will come when we can walk stataements and
expressions properly.
llvm-svn: 94099
|
|
|
|
|
|
| |
kinds, so that we see referenced types, protocols, classes, etc.
llvm-svn: 94085
|
|
|
|
|
|
| |
typedefs only (for now).
llvm-svn: 94078
|