| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
the ASTUnit itself is destroyed. Fixes <rdar://problem/7649385>.
llvm-svn: 96628
|
|
|
|
|
|
| |
try to address the msvc failures.
llvm-svn: 96624
|
|
|
|
|
|
| |
This reverts commit 4383e04c75731f8695b8355783f9966ac56b0926.
llvm-svn: 96622
|
|
|
|
|
|
| |
This reverts commit 95575005fc6409df98e6e079caf324308f62171b.
llvm-svn: 96620
|
|
|
|
|
|
| |
breaking the msvc9 builder for unknown reasons.
llvm-svn: 96618
|
|
|
|
|
|
|
| |
CIndex, so that c-index-test to use it to call
lvm::sys::PrintStackTraceOnErrorSignal().
llvm-svn: 96607
|
|
|
|
|
|
|
| |
display captured diagnostics when we can't return an invalid
CXTranslationUnit.
llvm-svn: 96606
|
|
|
|
| |
llvm-svn: 96602
|
|
|
|
| |
llvm-svn: 96600
|
|
|
|
|
|
| |
to the children of a Decl.
llvm-svn: 96599
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
we attach diagnostics to translation units and code-completion
results, so they can be queried at any time.
To facilitate this, the new StoredDiagnostic class stores a diagnostic
in a serializable/deserializable form, and ASTUnit knows how to
capture diagnostics in this stored form. CIndex's CXDiagnostic is a
thin wrapper around StoredDiagnostic, providing a C interface to
stored or de-serialized diagnostics.
I've XFAIL'd one test case temporarily, because currently we end up
storing diagnostics in an ASTUnit that's never returned to the user
(because it contains errors). I'll introduce a temporary fix for this
soon; the real fix will be to allow us to return and query invalid ASTs.
llvm-svn: 96592
|
|
|
|
|
|
| |
ranges for Attr objects, so lookup by cursor location currently doesn't work.
llvm-svn: 96571
|
|
|
|
|
|
| |
IBActionAttr and IBOutletAttr respectively.
llvm-svn: 96563
|
|
|
|
| |
llvm-svn: 96515
|
|
|
|
| |
llvm-svn: 96427
|
|
|
|
|
|
| |
instead of a 'const char *'.
llvm-svn: 96425
|
|
|
|
| |
llvm-svn: 96424
|
|
|
|
|
|
|
|
|
|
|
|
| |
namespace.
We can much more succinctly refer to these functions this way.
Also change the default behavior of createCXString(StringRef&) to duplicate the
string. This is almost always what we want. The other case is where we pass
a constant c-string, which uses the other version of createCXString().
llvm-svn: 96423
|
|
|
|
|
|
| |
this as an argument.
llvm-svn: 96316
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 94930
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
when given bad inputs.
llvm-svn: 94769
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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: 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
|