| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
only with modules, when two disjoint modules #define the same
identifier to different token sequences.
llvm-svn: 165746
|
| |
|
|
|
|
| |
associated with deserializing macro history for an identifier.
llvm-svn: 165729
|
| |
|
|
| |
llvm-svn: 165727
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
is no longer necessary, as well as the little bit of infrastructure in
the AST writer that used it.
llvm-svn: 165684
|
| |
|
|
| |
llvm-svn: 165683
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
macro history.
When deserializing macro history, we arrange history such that the
macros that have definitions (that haven't been #undef'd) and are
visible come at the beginning of the list, which is what the
preprocessor and other clients of Preprocessor::getMacroInfo()
expect. If additional macro definitions become visible later, they'll
be moved toward the front of the list. Note that it's possible to have
ambiguities, but we don't diagnose them yet.
There is a partially-implemented design decision here that, if a
particular identifier has been defined or #undef'd within the
translation unit, that definition (or #undef) hides any macro
definitions that come from imported modules. There's still a little
work to do to ensure that the right #undef'ing happens.
Additionally, we'll need to scope the update records for #undefs, so
they only kick in when the submodule containing that update record
becomes visible.
llvm-svn: 165682
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This more accurately reflects its use: this flag is set when a method
matches the getter or setter name for a property in the same class,
and does not actually specify whether or not the definition of the method
will be synthesized (either implicitly or explicitly with @synthesize).
This renames the setter and backing field as well, and changes the
(soon-to-be-obsolete?) XML dump format to use 'property_accessor'
instead of 'synthesized'.
llvm-svn: 165626
|
| |
|
|
|
|
|
| |
an invalid location if the location points to the synthetic buffer
for the module input.
llvm-svn: 165592
|
| |
|
|
|
|
| |
This means the main file for modules will always be a virtual one.
llvm-svn: 165591
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MacroInfo*. Instead of simply dumping an offset into the current file,
give each macro definition a proper ID with all of the standard
modules-remapping facilities. Additionally, when a macro is modified
in a subsequent AST file (e.g., #undef'ing a macro loaded from another
module or from a precompiled header), provide a macro update record
rather than rewriting the entire macro definition. This gives us
greater consistency with the way we handle declarations, and ties
together macro definitions much more cleanly.
Note that we're still not actually deserializing macro history (we
never were), but it's far easy to do properly now.
llvm-svn: 165560
|
| |
|
|
|
|
| |
deterministic.
llvm-svn: 165515
|
| |
|
|
|
|
|
|
|
|
| |
whether that function/method already has a body (loaded from some
other AST file), as introduced in r165137. Delay this check until
after the redeclaration chains have been wired up.
While I'm here, make the loading of method bodies lazy.
llvm-svn: 165513
|
| |
|
|
|
|
|
|
|
|
|
|
| |
write out the macro history for that macro. Similarly, we need to cope
with reading a macro definition that has been #undef'd.
Take advantage of this new ability so that global code-completion
results can refer to #undef'd macros, rather than losing them
entirely. For multiply defined/#undef'd macros, we will still get the
wrong result, but it's better than getting no result.
llvm-svn: 165502
|
| |
|
|
|
|
| |
that are associated with a (sub)module.
llvm-svn: 165279
|
| |
|
|
| |
llvm-svn: 165259
|
| |
|
|
|
|
| |
decision about whether we need to call tryAddTopLevelDecl or not. That call should be made when the DeclContext's redeclaration context is the translation unit.
llvm-svn: 165215
|
| |
|
|
|
|
|
| |
which is neither correct nor necessary. The use of this routine was
eliminated by r165137.
llvm-svn: 165139
|
| |
|
|
| |
llvm-svn: 165138
|
| |
|
|
|
|
|
| |
the ASTReader doesn't attach a body to a function that is already
defined elsewhere.
llvm-svn: 165137
|
| |
|
|
|
|
|
|
| |
ImportDecl's module ID was not written out and the reader accepted as module ID
the serialized:
Record.push_back(!IdentifierLocs.empty());
llvm-svn: 165087
|
| |
|
|
|
|
| |
of a module file.
llvm-svn: 165086
|
| |
|
|
|
|
|
| |
as key instead of a SLocEntry pointer. This allows the array of
file sorted declarations in a PCH/module to be deterministic.
llvm-svn: 165047
|
| |
|
|
|
|
| |
declarations of the current primary module.
llvm-svn: 165046
|
| |
|
|
|
|
| |
entities of the current primary module.
llvm-svn: 165023
|
| |
|
|
|
|
| |
resulted in an automatic module import.
llvm-svn: 165022
|
| |
|
|
|
|
|
|
| |
the merging should have set it correctly.
This is especially relevant for templatedDecls that might be injected (and thus have their DeclContext set to) somewhere completely different.
llvm-svn: 165005
|
| |
|
|
|
|
| |
the ASTConsumer.
llvm-svn: 165001
|
| |
|
|
|
|
|
|
|
|
|
| |
Check whether a pending instantiation needs to be instantiated (or whether an instantiation already exists).
Verify the size of the PendingInstantiations record (was only checking size of existing PendingInstantiations).
Migrate Obj-C++ part of redecl-merge into separate test, now that this is growing.
templates.mm: test that CodeGen has seen exactly one definition of template instantiations.
redecl-merge.m: use "@" specifier for expected-diagnostics.
llvm-svn: 164993
|
| |
|
|
|
|
|
|
| |
Clang will now honor the FP_CONTRACT pragma and emit LLVM
fmuladd intrinsics for expressions of the form A * B + C (when they occur in a
single statement).
llvm-svn: 164989
|
| |
|
|
|
|
|
|
| |
Lookup can nevertheless find them due to the serialized lookup table.
For instance when reading a template decl's templatedDecl, it will search for existing decls that it could be a redeclaration of, and find the half-read template decl.
Thus there is no point in asserting the names of decls.
llvm-svn: 164932
|
| |
|
|
|
|
| |
Don't require specializations (of existing and read template) to be unique.
llvm-svn: 164931
|
| |
|
|
|
|
|
|
|
| |
specialization was written, which is non-canonical at the time of reading: force the reading of the ClassTemplateDecl if it was written.
The easiest way out is to store whether the decl was canonical at the time of writing.
Add test.
llvm-svn: 164927
|
| |
|
|
|
|
|
|
|
|
|
|
| |
enough information so we can mangle them correctly in cases involving
dependent parameter types. (This specifically impacts cases involving
null pointers and cases involving parameters of reference type.)
Fix the mangler to use this information instead of trying to scavenge
it out of the parameter declaration.
<rdar://problem/12296776>.
llvm-svn: 164656
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
latest macro definition. Needs more work.
Summary: Passes all tests (+ the new one with code completion), but needs a thorough review in part related to modules.
Reviewers: doug.gregor
Reviewed By: alexfh
CC: cfe-commits, rsmith
Differential Revision: http://llvm-reviews.chandlerc.com/D41
llvm-svn: 164610
|
| |
|
|
|
|
|
| |
the fact. Test cases will come when we're actually (de-)serializing
macro history.
llvm-svn: 164549
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
but not
external visible decls, call DeclContext::setMustBuildLookupTable so that the
"lazy decls" bit of the LookupPtr is set.
Previously, in non-C++, if there were no new declarations causing the "lazy decls" bit
to be set, then DeclContext::lookups_begin() would fail to return the decls from the PCH.
Fixes rdar://12316296.
llvm-svn: 164351
|
| |
|
|
| |
llvm-svn: 164335
|
| |
|
|
|
|
|
|
| |
clang has recently started to warn about the enum compares:
lib/Serialization/ASTWriter.cpp:2760:31: warning: comparison of literal 256 with expression of type
'clang::DeclarationName::NameKind' is always true [-Wtautological-constant-out-of-range-compare]
llvm-svn: 164220
|
| |
|
|
|
|
|
|
| |
definition info; it needs to be there because the mangler needs to
access it before we're finished defining the lambda class.
PR12808.
llvm-svn: 164186
|
| |
|
|
|
|
| |
changes.
llvm-svn: 164106
|
| |
|
|
| |
llvm-svn: 163983
|
| |
|
|
| |
llvm-svn: 163863
|
| |
|
|
|
|
|
| |
parameter packs where the reference is not being expanded but the pack has
been. Previously, Clang would segfault in such cases.
llvm-svn: 163672
|
| |
|
|
|
|
| |
Unfortunately, no test case. rdar://11960120
llvm-svn: 163566
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
unexpanded parameter pack is a pack expansion. Thus, as with a non-type template
parameter which is a pack expansion, it needs to be expanded early into a fixed
list of template parameters.
Since the expanded list of template parameters is not itself a parameter pack,
it is permitted to appear before the end of the template parameter list, so also
remove that restriction (for both template template parameter pack expansions and
non-type template parameter pack expansions).
llvm-svn: 163369
|
| |
|
|
| |
llvm-svn: 163149
|
| |
|
|
|
|
| |
Also a minor fix to __except printing in StmtPrinter.cpp. Thanks to Aaron Ballman for review.
llvm-svn: 163083
|
| |
|
|
| |
llvm-svn: 163032
|
| |
|
|
|
|
| |
instead of aliasing to "struct" which had some incorrect behaviour. Patch by David Robins.
llvm-svn: 163013
|