#
7f95d26e |
| 05-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Make Diagnostic reference-counted, which is simpler than juggling maybe-ownership vs. ownership.
llvm-svn: 100498
|
#
d03e823f |
| 05-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Clarify the ownership semantics of the Diagnostic object used by ASTUnit. Previously, we would end up with use-after-free errors because the Diagnostic object would be creating in one place (say, CIn
Clarify the ownership semantics of the Diagnostic object used by ASTUnit. Previously, we would end up with use-after-free errors because the Diagnostic object would be creating in one place (say, CIndex) and its ownership would not be transferred into the ASTUnit. Fixes <rdar://problem/7818608>.
llvm-svn: 100464
show more ...
|
#
a2433154 |
| 05-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Minor ASTUnit cleanups: - Rename "Diagnostics" and related to "StoredDiagnostics", to better capture what we're actually storing. - Move SourceManager and FileManager to the heap.
llvm-svn: 10
Minor ASTUnit cleanups: - Rename "Diagnostics" and related to "StoredDiagnostics", to better capture what we're actually storing. - Move SourceManager and FileManager to the heap.
llvm-svn: 100441
show more ...
|
#
e43887bd |
| 01-Apr-2010 |
Daniel Dunbar <daniel@zuster.org> |
Driver: Add support for a CLANGXX_IS_PRODUCTION build variable, which enable Clang++ support, even in "Production" mode (for testing purposes).
llvm-svn: 100119
|
#
7f6d60dc |
| 19-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Optionally store a PreprocessingRecord in the preprocessor itself, and tie its creation to a CC1 flag -detailed-preprocessing-record.
llvm-svn: 98963
|
#
065f8d11 |
| 18-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce the notion of a "preprocessing record", which keeps track of the macro definitions and macro instantiations that are found during preprocessing. Preprocessing records are *not* generated by
Introduce the notion of a "preprocessing record", which keeps track of 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
show more ...
|
#
81dfb30e |
| 17-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't "take" the file manager and source manager when ASTUnit::LoadFromCompilerInvocation() fails to create target information.
llvm-svn: 98697
|
#
a2f49450 |
| 16-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Make sure we actually override ReadHeaderFileInfo when we meant to
llvm-svn: 98655
|
#
e0fbb83b |
| 16-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Give SourceManager a Diagnostic object with which to report errors, and start simplifying the interfaces in SourceManager that can fail.
llvm-svn: 98594
|
#
78293626 |
| 05-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
The Windows build is just too weird; there's no real cost to doing the concurrency checks for ASTUnit in all builds
llvm-svn: 97840
|
#
1e1973c0 |
| 05-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Switch from NDEBUG to _DEBUG, since our Windows build is funny
llvm-svn: 97835
|
#
0c7c2f8b |
| 05-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
A little hack to identify unwanted concurrency in CIndex
llvm-svn: 97831
|
#
89a56c56 |
| 27-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
When given unsaved files in clang_createTranslationUnitFromSourceFile, copy the source buffers provided rather than referencing them directly, so that the caller can free those buffers immediately af
When given unsaved files in clang_createTranslationUnitFromSourceFile, 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
show more ...
|
#
6cb5ba4c |
| 18-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach ASTUnit to keep track of temporary files, then delete them when the ASTUnit itself is destroyed. Fixes <rdar://problem/7649385>.
llvm-svn: 96628
|
#
33cdd810 |
| 18-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Rework how CIndex handles diagnostics. Rather than using a callback, we attach diagnostics to translation units and code-completion results, so they can be queried at any time.
To facilitate this, t
Rework how CIndex handles diagnostics. Rather than using a callback, 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
show more ...
|
#
19511922 |
| 16-Feb-2010 |
Daniel Dunbar <daniel@zuster.org> |
ASTUnit: Constant fold UseBumpAllocator to true, we don't care to support this as an argument.
llvm-svn: 96316
|
#
7f21a7f7 |
| 16-Feb-2010 |
Daniel Dunbar <daniel@zuster.org> |
ASTUnit::LoadFromCompilerInvocation - Take ownership of the provided invocation.
llvm-svn: 96315
|
#
6b03ecef |
| 30-Jan-2010 |
Daniel Dunbar <daniel@zuster.org> |
ASTUnit: Ensure the CompilerInvocation object used in LoadFromCommandLine is live as long as the ASTUnit. This is useful for clients which want to maintain pointers to the LangOptions object which ul
ASTUnit: Ensure the CompilerInvocation object used in LoadFromCommandLine is live as long as the ASTUnit. This is useful for clients which want to maintain pointers to the LangOptions object which ultimately lives in the CompilerInvocation, although it would be nice to make all of this ownership stuff more explicit and obvious.
llvm-svn: 94924
show more ...
|
#
2ecf8eb2 |
| 30-Jan-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
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
|
#
fcf2d428 |
| 25-Jan-2010 |
Daniel Dunbar <daniel@zuster.org> |
ASTUnit: Don't check that input files exist when parsing ASTs from the command line -- they may be remapped (fake) files. This is useful for testing parsing entirely from memory.
llvm-svn: 94395
|
#
aa98ed9a |
| 23-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Extend clang_createTranslationUnitFromSourceFile() to support creating translation units that include unsaved files.
llvm-svn: 94258
|
#
a5a166d0 |
| 15-Dec-2009 |
Daniel Dunbar <daniel@zuster.org> |
Add -resource-dir to clang -cc1, this allows the base directory for compiler resources (e.g., /usr/lib/clang/1.1) to be passed on the command line instead of computed.
llvm-svn: 91370
|
#
8d4a202a |
| 13-Dec-2009 |
Daniel Dunbar <daniel@zuster.org> |
Lift builtin-include-path logic out of ASTUnit::LoadFromCommandLine and fix CIndex to pass in the right directory (previously it was using the path to the main executable, which generally is wrong).
Lift builtin-include-path logic out of ASTUnit::LoadFromCommandLine and fix CIndex to pass in the right directory (previously it was using the path to the main executable, which generally is wrong).
llvm-svn: 91238
show more ...
|
#
d613677e |
| 13-Dec-2009 |
Daniel Dunbar <daniel@zuster.org> |
CompilerInvocation: Move builtin-include-path logic out of CompilerInvocation::CreateFromArgs.
llvm-svn: 91237
|
#
567ae47b |
| 08-Dec-2009 |
Jeffrey Yasskin <jyasskin@google.com> |
Remove several .c_str() to be forward-compatible with StringRef.
llvm-svn: 90822
|