| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 98875
|
|
|
|
|
|
|
|
| |
preprocessing record. Use that link with clang_getCursorReferenced()
and clang_getCursorDefinition() to match instantiations of a macro to
the definition of the macro.
llvm-svn: 98842
|
|
|
|
|
|
| |
generated by clang_annotateTokens().
llvm-svn: 98837
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the macro definitions and macro instantiations that are found
during preprocessing. Preprocessing records are *not* generated by
default; rather, we provide a PPCallbacks subclass that hooks into the
existing callback mechanism to record this activity.
The only client of preprocessing records is CIndex, which keeps track
of macro definitions and instantations so that they can be exposed via
cursors. At present, only token annotation uses these facilities, and
only for macro instantiations; both will change in the near
future. However, with this change, token annotation properly annotates
macro instantiations that do not produce any tokens and instantiations
of macros that are later undef'd, improving our consistency.
Preprocessing directives that are not macro definitions are still
handled by clang_annotateTokens() via re-lexing, so that we don't have
to track every preprocessing directive in the preprocessing record.
Performance impact of preprocessing records is still TBD, although it
is limited to CIndex and therefore out of the path of the main compiler.
llvm-svn: 98836
|
|
|
|
|
|
|
| |
token sequence to detect macro instantiations (that produce at least
token). WIP.
llvm-svn: 98826
|
|
|
|
|
|
|
|
| |
directives while annotating tokens in CIndex. This functionality
should probably be factored out of this routine, but we're not there
yet.
llvm-svn: 98786
|
|
|
|
|
|
| |
needs better error recovery.
llvm-svn: 98667
|
|
|
|
|
|
| |
const char*.
llvm-svn: 98630
|
|
|
|
|
|
| |
and start simplifying the interfaces in SourceManager that can fail.
llvm-svn: 98594
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SourceManager's getBuffer() (and similar) operations. This abstract
can be used to force callers to cope with errors in getBuffer(), such
as missing files and changed files. Fix a bunch of callers to use the
new interface.
Add some very basic checks for file consistency (file size,
modification time) into ContentCache::getBuffer(), although these
checks don't help much until we've updated the main callers (e.g.,
SourceManager::getSpelling()).
llvm-svn: 98585
|
|
|
|
|
|
| |
(there was a missing 'C').
llvm-svn: 98554
|
|
|
|
| |
llvm-svn: 98452
|
|
|
|
|
|
|
|
| |
tmpnam calls.
This fixes linker warnings on linux.
llvm-svn: 98439
|
|
|
|
|
|
| |
instead of AST elements.
llvm-svn: 98421
|
|
|
|
|
| |
Tested: make CPPFLAGS=-m64 CXXFLAGS=-m64 -j8 && (cd tools/clang;make test)
llvm-svn: 98399
|
|
|
|
|
|
| |
unexposed AST elements.
llvm-svn: 97985
|
|
|
|
|
|
| |
of the class name.
llvm-svn: 97943
|
|
|
|
|
|
|
|
|
|
| |
Objective-C method declaration, e.g., for
- (Foo *)myMethod;
we now have TypeSourceInfo for the Foo*.
llvm-svn: 97942
|
|
|
|
|
|
|
| |
This obviates a null dereference that can occur when 'NumErrors'
is not zero.
llvm-svn: 97849
|
|
|
|
| |
llvm-svn: 97848
|
|
|
|
| |
llvm-svn: 97831
|
|
|
|
| |
llvm-svn: 97647
|
|
|
|
|
|
|
| |
underlying linkage for the entity referred to by a
CXCursor.
llvm-svn: 97646
|
|
|
|
|
|
|
|
|
|
| |
copy the source buffers provided rather than referencing them
directly, so that the caller can free those buffers immediately after
calling clang_createTranslationUnitFromSourceFile(). Otherwise, we
risk hitting those buffers later (when building source ranges, forming
diagnostics, etc.).
llvm-svn: 97296
|
|
|
|
| |
llvm-svn: 96978
|
|
|
|
|
|
|
| |
the diagnostics to a FILE*, return a CXString containing the formatted
diagnostic.
llvm-svn: 96823
|
|
|
|
|
|
|
|
| |
and the c-index-test executable end up getting different copies of
stderr, causing non-deterministic ordering of output. Fixed by
flushing the file after printing a diagnostic (only on Windows).
llvm-svn: 96754
|
|
|
|
| |
llvm-svn: 96685
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
knobs to control formatting. Eventually, I'd like to merge the
implementation of this code with the TextDiagnosticPrinter, so that
it's easy for CIndex clients to produce beautiful diagnostics like the
clang compiler does.
Use this new function to display diagnostics within c-index-test.
llvm-svn: 96603
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 96566
|
|
|
|
|
|
| |
IBActionAttr and IBOutletAttr respectively.
llvm-svn: 96563
|
|
|
|
| |
llvm-svn: 96515
|
|
|
|
| |
llvm-svn: 96439
|
|
|
|
| |
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
|