| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
check each of the files within that directory to determine if any of
them is an AST file that matches the language and target options. If
so, the first matching AST file is loaded. This fixes a longstanding
discrepency with GCC's precompiled header implementation.
llvm-svn: 166469
|
|
|
|
|
|
|
|
|
|
| |
failures they know how to tolerate, e.g., out-of-date input files or
configuration/version mismatches. Suppress the corresponding
diagnostics if the client can handle it.
No clients actually use this functionality, yet.
llvm-svn: 166449
|
|
|
|
|
|
|
|
| |
file corruption, compiler version mismatch, target/language
configuration mismatch, out-of-date AST file. No functionality change
yet.
llvm-svn: 166446
|
|
|
|
|
|
|
| |
target options around so they can be accessed at any point (rather
than keeping them transient).
llvm-svn: 166072
|
|
|
|
|
|
| |
created.
llvm-svn: 165943
|
|
|
|
|
|
|
|
|
| |
The ASTUnit needs to initialize an ASTWriter at the beginning of
parsing to fully handle serialization of a translation unit that
imports modules. Do this by introducing an option to enable it, which
corresponds to CXTranslationUnit_ForSerialization on the C API side.
llvm-svn: 165717
|
|
|
|
|
|
|
| |
an invalid location if the location points to the synthetic buffer
for the module input.
llvm-svn: 165592
|
|
|
|
| |
llvm-svn: 165161
|
|
|
|
| |
llvm-svn: 165083
|
|
|
|
|
|
| |
declarations of the current primary module.
llvm-svn: 165046
|
|
|
|
|
|
| |
entities of the current primary module.
llvm-svn: 165023
|
|
|
|
|
|
| |
results for a macro name, not CXCursor_NotImplemented.
llvm-svn: 164740
|
|
|
|
|
|
| |
Removes a dependency of ASTUnit to clang-c/Index.h.
llvm-svn: 164704
|
|
|
|
|
|
| |
an environment variable for debugging purposes.
llvm-svn: 163958
|
|
|
|
|
|
|
|
| |
to the target info.
Related to rdar://12069503.
llvm-svn: 163931
|
|
|
|
|
|
|
| |
-fcatch-undefined-behavior. Don't try to fit 34 different flags
into 32 bits. Also, don't use 32-bit signed left shifts for this.
llvm-svn: 161830
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
as "volatile", meaning there's a high enough chance that they may
change while we are trying to use them.
This flag is only enabled by libclang.
Currently "volatile" source files will be stat'ed immediately
before opening them, because the file size stat info
may not be accurate since when we got it (e.g. from the PCH).
This avoids crashes when trying to reference mmap'ed memory
from a file whose size is not what we expect.
Note that there's still a window for a racing issue to occur
but the window for it should be way smaller than before.
We can consider later on to avoid mmap completely on such files.
rdar://11612916
llvm-svn: 160074
|
|
|
|
|
|
|
|
|
| |
may be destroying an ASTUnit while cleanupOnDiskMapAtExit is
getting called.
rdar://11781241
llvm-svn: 159664
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
attached to a declaration in the completion string.
Since extracting comments isn't free, a new code completion option is
introduced.
A new code completion option that enables including brief comments
into CodeCompletionString should be a, err, code completion option.
But because ASTUnit caches global declarations during parsing before
even completion consumer is created, the option is duplicated as a
translation unit option (in both libclang and ASTUnit, like the option
to cache code completion results).
llvm-svn: 159539
|
|
|
|
|
|
|
|
| |
that does not exist.
rdar://11607033
llvm-svn: 158193
|
|
|
|
|
|
|
|
| |
arguments, force use of clang frontend for the driver.
Fixes rdar://11356765.
llvm-svn: 157205
|
|
|
|
| |
llvm-svn: 154739
|
|
|
|
| |
llvm-svn: 154584
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
make sure to
output the errors that occurred even if we did not get an AST (e.g. because the
PCH failed to load).
Also honor displayDiagnostics in clang_indexSourceFile().
rdar://11203489
llvm-svn: 154472
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
code-completion related strings specific to a translation unit (ASTContext and related data)
CodeCompletionAllocator does such limited caching, by caching the name assigned
to a DeclContext*, but that is not the appropriate place since that object has
a lifetime that can extend beyond that of an ASTContext.
Introduce CodeCompletionTUInfo which will be always tied to a translation unit
to do this kind of caching and move the caching of CodeCompletionAllocator into this
object, and propagate it to all the places where it will be needed.
The plan is to extend the caching where appropriate, using CodeCompletionTUInfo,
to avoid re-calculating code-completion strings.
Part of rdar://10796159.
llvm-svn: 154408
|
|
|
|
|
|
|
|
| |
clear the error from raw_fd_ostream, otherwise we will crash.
rdar://10976410
llvm-svn: 152605
|
|
|
|
|
|
|
|
|
|
| |
(Lex to AST).
The member variable is always "LangOpts" and the member function is always "getLangOpts".
Reviewed by Chris Lattner
llvm-svn: 152536
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
compiler errors or not.
-Control whether ASTReader should reject such a PCH by a boolean flag at ASTReader's creation time.
By default, such a PCH file will be rejected with an error when trying to load it.
[libclang] Allow clang_saveTranslationUnit to create a PCH file even if compiler errors
occurred.
-Have libclang API calls accept a PCH that had compiler errors.
The general idea is that we want libclang to stay functional even if a PCH had a compiler error.
rdar://10976363.
llvm-svn: 152192
|
|
|
|
|
|
| |
ctor.
llvm-svn: 151752
|
|
|
|
|
|
|
|
| |
it can only bring pain when dealing with preprocessor abuse (see: boost).
rdar://10898986
llvm-svn: 151427
|
|
|
|
|
|
|
| |
The class name is long enough without the llvm:: added.
Also bring in RefCountedBase and RefCountedBaseVPTR.
llvm-svn: 150958
|
|
|
|
|
|
|
| |
(I was going to fix the TODO about DenseMap too, but
that would break self-host right now. See PR11922.)
llvm-svn: 149799
|
|
|
|
| |
llvm-svn: 149798
|
|
|
|
|
|
| |
a SourceManager that has already been deleted, rdar://10768346.
llvm-svn: 149532
|
|
|
|
|
|
| |
target-specific module requirements.
llvm-svn: 149224
|
|
|
|
|
|
| |
results in libclang.
llvm-svn: 149200
|
|
|
|
|
|
|
| |
the front end into its own class, FrontendInputFile, to make it easier
to introduce new per-input data. No functionality change.
llvm-svn: 148546
|
|
|
|
| |
llvm-svn: 148319
|
|
|
|
|
|
| |
ObjCProtocolDecl modules forward declarations properly.
llvm-svn: 147415
|
|
|
|
|
|
|
|
|
| |
features needed for a particular module to be available. This allows
mixed-language modules, where certain headers only work under some
language variants (e.g., in C++, std.tuple might only be available in
C++11 mode).
llvm-svn: 147387
|
|
|
|
|
|
|
| |
covers both declarations (@class) and definitions (@interface) of an
Objective-C class.
llvm-svn: 147299
|
|
|
|
| |
llvm-svn: 147260
|
|
|
|
|
|
|
|
|
| |
library, since modules cut across all of the libraries. Rename
serialization::Module to serialization::ModuleFile to side-step the
annoying naming conflict. Prune a bunch of ModuleMap.h includes that
are no longer needed (most files only needed the Module type).
llvm-svn: 145538
|
|
|
|
|
|
| |
writer. No functionality change.
llvm-svn: 145479
|
|
|
|
| |
llvm-svn: 145412
|
|
|
|
|
|
|
|
| |
after
indexing, honor all the TU options.
llvm-svn: 145229
|
|
|
|
| |
llvm-svn: 145228
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
file region
inside an objc container that "contains" other file-level declarations.
When getting the array of file-level declarations that overlap with a file region,
we failed to report that the region overlaps with an objc container, if
the container had other file-level declarations declared lexically inside it.
Fix this by marking such declarations as "isTopLevelDeclInObjCContainer" in the AST
and handling them appropriately.
llvm-svn: 145109
|
|
|
|
|
|
| |
parsing or false to abort parsing.
llvm-svn: 144943
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
object. I discovered that llvm::RefCountedBase<T> has
a bug where the reference count is copied in the copy constructor, which means that there were cases when the CompilerInvocation
objects created by ASTUnit were actually leaked. When I fixed that bug locally, it showed that a whole bunch of code assumed
that the LangOptions object that was part of CompilerInvocation was still alive. By making it heap-allocated and reference counted,
we can keep it around after the CompilerInvocation object goes away.
As part of this change, change CompilerInvocation:getLangOptions() to return a pointer, acting as another clue that this
object may outlive the CompilerInvocation object.
This commit doesn't fix the CompilerInvocation leak itself. That will come when I commit the fix to llvm::RefCountedBase<T> to
mainline LLVM.
llvm-svn: 144930
|