| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
class, SwitchCase.
llvm-svn: 171483
|
| |
|
|
|
|
|
|
|
|
| |
modules when getting the decls for a namespace or translation unit.
Otherwise the code-completion results will not be complete.
rdar://12889089
llvm-svn: 170596
|
| |
|
|
|
|
|
|
|
|
|
|
| |
copy-list-initialization (and doesn't add an additional copy step):
Fill in the ListInitialization bit when creating a CXXConstructExpr. Use it
when instantiating initializers in order to correctly handle instantiation of
copy-list-initialization. Teach TreeTransform that function arguments are
initializations, and so need this special treatment too. Finally, remove some
hacks which were working around SubstInitializer's shortcomings.
llvm-svn: 170489
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
per review discussion in r170365
This does limit these typedefs to being sequences, but no current usage
requires them to be contiguous (we could expand this to a more general
iterator pair range concept at some point).
Also, it'd be nice if SmallVector were constructible directly from an ArrayRef
but this is a bit tricky since ArrayRef depends on SmallVectorBaseImpl for the
inverse conversion. (& generalizing over all range-like things, while nice,
would require some nontrivial SFINAE I haven't thought about yet)
llvm-svn: 170482
|
| |
|
|
|
|
| |
Add OpenCL images as clang builtin types.
llvm-svn: 170432
|
| |
|
|
|
|
| |
these files to Windows style.
llvm-svn: 170431
|
| |
|
|
| |
llvm-svn: 170428
|
| |
|
|
|
|
|
|
|
|
|
|
| |
don't crash when loading a PCH with the older format.
The introduction of the control block broke compatibility with PCHs from
older versions. This patch allows loading (and rejecting) PCHs from an older
version and allows newer PCHs to be rejected from older clang versions as well.
rdar://12821386
llvm-svn: 170150
|
| |
|
|
|
|
| |
This became redundant after we removed the stat cache.
llvm-svn: 169830
|
| |
|
|
|
|
|
|
|
| |
entries of the same file.
This can happen because the file was "included" multiple times and is
referenced by multiple SLocEntries.
llvm-svn: 169829
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the cases where we can't determine whether special members would be trivial
while building the class, we eagerly declare those special members. The impact
of this is bounded, since it does not trigger implicit declarations of special
members in classes which merely *use* those classes.
In order to determine whether we need to apply this rule, we also need to
eagerly declare move operations and destructors in cases where they might be
deleted. If a move operation were supposed to be deleted, it would instead
be suppressed, and we could need overload resolution to determine if we fall
back to a trivial copy operation. If a destructor were implicitly deleted,
it would cause the move constructor of any derived classes to be suppressed.
As discussed on cxx-abi-dev, C++11's selected constructor rules are also
retroactively applied as a defect resolution in C++03 mode, in order to
identify that class B has a non-trivial copy constructor (since it calls
A's constructor template, not A's copy constructor):
struct A { template<typename T> A(T &); };
struct B { mutable A a; };
llvm-svn: 169673
|
| |
|
|
|
|
|
|
| |
properly, rather than faking it up by pretending that a reference member makes
the default constructor non-trivial. That leads to rejects-valids when putting
such types inside unions.
llvm-svn: 169662
|
| |
|
|
|
|
| |
that was skipped by the parser.
llvm-svn: 169531
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
uncovered.
This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.
I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.
llvm-svn: 169237
|
| |
|
|
|
|
|
|
|
| |
PreprocessingRecord and into its own class, PPConditionalDirectiveRecord.
Decoupling allows a client to use the functionality of PPConditionalDirectiveRecord
without needing a PreprocessingRecord.
llvm-svn: 169229
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
module, provide a module import stack similar to what we would get for
an include stack, e.g.,
In module 'DependsOnModule' imported from build-fail-notes.m:4:
In module 'Module' imported from DependsOnModule.framework/Headers/DependsOnModule.h:1:
Inputs/Module.framework/Headers/Module.h:15:12: note: previous definition is here
@interface Module
<rdar://problem/12696425>
llvm-svn: 169042
|
| |
|
|
|
|
| |
files are loaded.
llvm-svn: 169027
|
| |
|
|
|
|
| |
functionality change.
llvm-svn: 168977
|
| |
|
|
|
|
|
| |
constructor/assignment operator with a const-qualified parameter type. The
prior method for determining this incorrectly used overload resolution.
llvm-svn: 168775
|
| |
|
|
|
|
|
|
|
|
|
| |
allocated using the allocator associated with an ASTContext.
Use this inside CXXRecordDecl::DefinitionData instead of an UnresolvedSet to
avoid a potential memory leak.
rdar://12761275
llvm-svn: 168771
|
| |
|
|
|
|
| |
instead of messing with virtual files.
llvm-svn: 168062
|
| |
|
|
|
|
| |
as the include location of the main file of an imported module.
llvm-svn: 168061
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the related comma pasting extension.
In certain cases, we used to get two diagnostics for what is essentially one
extension. This change suppresses the first diagnostic in certain cases
where we know we're going to print the second diagnostic. The
diagnostic is redundant, and it can't be suppressed in the definition
of the macro because it points at the use of the macro, so we want to
avoid printing it if possible.
The implementation works by detecting constructs which look like comma
pasting at the time of the definition of the macro; this information
is then used when the macro is used. (We can't actually detect
whether we're using the comma pasting extension until the macro is
actually used, but we can detecting constructs which will be comma
pasting if the varargs argument is elided.)
<rdar://problem/12292192>
llvm-svn: 167907
|
| |
|
|
|
|
|
| |
for completeness and use it in CompilerInstance::InitializeSourceManager if
the input is a memory buffer.
llvm-svn: 167628
|
| |
|
|
|
|
| |
viceversa). No functionality change.
llvm-svn: 167591
|
| |
|
|
|
|
| |
module in place. <rdar://problem/10138913>
llvm-svn: 167539
|
| |
|
|
|
|
|
|
|
| |
Spent longer than reasonable looking for a nice way to test this & decided to
give up for now. Open to suggestions/requests. Richard Smith suggested adding
something to ASTMatchers but it wasn't readily apparent how to test this with
that.
llvm-svn: 167507
|
| |
|
|
|
|
| |
the validation of an AST file against a specific set of options.
llvm-svn: 167504
|
| |
|
|
| |
llvm-svn: 167426
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
reference instead of relying on computing it.
In general, if storage is no issue, it is preferable to deserialize info from
the PCH instead of trying to recompute it after the PCH was loaded.
The incentive to change this now was due to r155303 changing how friend template
classes in dependent contexts are handled; such classes can now be chained to
a previous template class but the computed InjectedClassNameType may be different
due to the extra template parameters from the dependent context.
The new handling requires more investigation but, in the meantime, writing out
InjectedClassNameType fixes PCH issue in rdar://12627738.
llvm-svn: 167425
|
| |
|
|
|
|
| |
is getting converted to a global PreprocessedEntityID.
llvm-svn: 167280
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The stat cache became essentially useless ever since we started
validating all file entries in the PCH.
But the motivating reason for removing it now is that it also affected
correctness in this situation:
-You have a header without include guards (using "#pragma once" or #import)
-When creating the PCH:
-The same header is referenced in an #include with different filename cases.
-In the PCH, of course, we record only one file entry for the header file
-But we cache in the PCH file the stat info for both filename cases
-Then the source files are updated and the header file is updated in a way that
its size and modification time are the same but its inode changes
-When using the PCH:
-We validate the headers, we check that header file and we create a file entry with its current inode
-There's another #include with a filename with different case than the previously created file entry
-In order to get its stat info we go through the cached stat info of the PCH and we receive the old inode
-because of the different inodes, we think they are different files so we go ahead and include its contents.
Removing the stat cache will potentially break clients that are attempting to use the stat cache
as a way of avoiding having the actual input files available. If that use case is important, patches are welcome
to bring it back in a way that will actually work correctly (i.e., emit a PCH that is self-contained, coping with
literal strings, line/column computations, etc.).
This fixes rdar://5502805
llvm-svn: 167172
|
| |
|
|
|
|
|
| |
MaybeAddSystemRootToFilename doesn't need to return anything, it modifies
its argument.
llvm-svn: 166988
|
| |
|
|
|
|
|
|
|
| |
diagnostic states; make sure the ASTReader sets the diagnostic state
properly instead of always recreating it.
Fixes rdar://12581618 & http://llvm.org/PR14181
llvm-svn: 166987
|
| |
|
|
|
|
|
| |
replaced by the more efficient, cleaner preprocessor-option version
that occurs earlier in PCH validation.
llvm-svn: 166654
|
| |
|
|
|
|
| |
checking, and disable the old predefines-buffer-diff'ing code path.
llvm-svn: 166653
|
| |
|
|
|
|
|
| |
predefines. We're not quite ready to cut over to these suggested
predefines yet, however.
llvm-svn: 166648
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the macros that are #define'd or #undef'd on the command line. This
checking happens much earlier than the current macro-definition
checking and is far cleaner, because it does a direct comparison
rather than a diff of the predefines buffers. Moreover, it allows us
to use the result of this check to skip over PCH files within a
directory that have non-matching -D's or -U's on the command
line. Finally, it improves the diagnostics a bit for mismatches,
fixing <rdar://problem/8612222>.
The old predefines-buffer diff'ing will go away in a subsequent commit.
llvm-svn: 166641
|
| |
|
|
|
|
| |
-include'd files, etc.
llvm-svn: 166614
|
| |
|
|
| |
llvm-svn: 166586
|
| |
|
|
| |
llvm-svn: 166577
|
| |
|
|
| |
llvm-svn: 166572
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
ReadSLocEntry(). No functionality change.
llvm-svn: 166447
|
| |
|
|
|
|
|
|
| |
file corruption, compiler version mismatch, target/language
configuration mismatch, out-of-date AST file. No functionality change
yet.
llvm-svn: 166446
|
| |
|
|
| |
llvm-svn: 166442
|
| |
|
|
|
|
|
|
|
|
| |
manager block and input-file information in the control block. The
source manager entries now point back into the control block. Input
files are now lazily deserialized (if validation is disabled). Reduces
Cocoa's PCH by the ~70k I added when I introduced the redundancy in
r166251.
llvm-svn: 166429
|
| |
|
|
| |
llvm-svn: 166257
|
| |
|
|
| |
llvm-svn: 166252
|