|  | Commit message (Collapse) | Author | Age | Files | Lines | 
|---|
| ... |  | 
| | 
| 
| 
| 
| 
| | -fdelayed-template-parsing mode. Patch by Will Wilson!
llvm-svn: 187916 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | This field is just IsDefaulted && !IsDeleted; in all places it's used,
a simple check for isDefaulted() is superior anyway, and we were forgetting
to set it in a few cases.
Also eliminate CXXDestructorDecl::IsImplicitlyDefined, for the same reasons.
No intended functionality change.
llvm-svn: 187891 | 
| | 
| 
| 
| 
| 
| | fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention...
llvm-svn: 187762 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | No functionality change.
In Sema helper functions:
 * renamed isTypeName as HasTypenameKeyword
In UsingDecl:
 * renamed get/setUsingLocation to get/setUsingLoc
 * renamed is/setTypeName as has/setTypename
llvm-svn: 186816 | 
| | 
| 
| 
| 
| 
| | Requested by Richard Smith in post-commit review of r186262
llvm-svn: 186266 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | numbers as we deserialize class template partial specializations. We can't
assume that the old sequence numbers will work.
The sequence numbers are still deterministic, but are now a lot less
predictable for class template partial specializations in modules/PCH.
llvm-svn: 184811 | 
| | 
| 
| 
| | llvm-svn: 184417 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | John noticed that the fix for pr15930 (r181981) didn't handle indirect
uses of local types. For example, a pointer to local struct, or a
function that returns it.
One way to implement this would be to recursively look for local
types. This would look a lot like the linkage computation itself for
types.
To avoid code duplication and utilize the existing linkage cache, this
patch just makes the computation of "type with no linkage but
externally visible because it is from an inline function"  part of the
linkage computation itself.
llvm-svn: 182711 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | This patch renames getLinkage to getLinkageInternal. Only code that
needs to handle UniqueExternalLinkage specially should call this.
Linkage, as defined in the c++ standard, is provided by
getFormalLinkage. It maps UniqueExternalLinkage to ExternalLinkage.
Most places in the compiler actually want isExternallyVisible, which
handles UniqueExternalLinkage as internal.
llvm-svn: 181677 | 
| | 
| 
| 
| | llvm-svn: 181113 | 
| | 
| 
| 
| 
| 
| | consistency with ObjCInterfaceDecl::getSuperClassLoc()
llvm-svn: 181064 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Add serialization for captured statements and captured decls.  Also add
a const_capture_iterator to CapturedStmt.
Test contributed by Wei Pan
Differential Revision: http://llvm-reviews.chandlerc.com/D727
llvm-svn: 181048 | 
| | 
| 
| 
| 
| 
| | provided.
llvm-svn: 181039 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Add CapturedDecl to be the DeclContext for CapturedStmt, and perform semantic
analysis. Currently captures all variables by reference.
TODO: templates
Author: Ben Langmuir <ben.langmuir@intel.com>
Differential Revision: http://llvm-reviews.chandlerc.com/D433
llvm-svn: 179618 | 
| | 
| 
| 
| 
| 
| 
| 
| | references thereto.
Patch by Tong Shen!
llvm-svn: 179585 | 
| | 
| 
| 
| 
| 
| | the AST.
llvm-svn: 179447 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb went back green
before it processed the reverted 178663, so it could not have been the culprit.
Revert "Revert 178663."
This reverts commit 4f8a3eb2ce5d4ba422483439e20c8cbb4d953a41.
llvm-svn: 178682 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | Looks like it broke http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb
Revert "Don't compute a patched/semantic storage class."
This reverts commit 8f187f62cb0487d31bc4afdfcd47e11fe9a51d05.
llvm-svn: 178681 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | For variables and functions clang used to store two storage classes. The one
"as written" in the code and a patched one, which, for example, propagates
static to the following decls.
This apparently is from the days clang lacked linkage computation. It is now
redundant and this patch removes it.
llvm-svn: 178663 | 
| | 
| 
| 
| | llvm-svn: 177705 | 
| | 
| 
| 
| 
| 
| 
| | Report and suggested fix by Tom Honermann!
http://llvm.org/bugs/show_bug.cgi?id=13020
llvm-svn: 177330 | 
| | 
| 
| 
| 
| 
| 
| 
| | Introduce a new AST Decl node "EmptyDecl" to model empty-declaration. Have attributes from attribute-declaration appertain
to the EmptyDecl node by creating the AST representations of these attributes and attach them to the EmptyDecl node so these
attributes can be sema checked just as attributes attached to "normal" declarations.
llvm-svn: 175900 | 
| | 
| 
| 
| 
| 
| 
| 
| | the linkage of functions and variables while merging declarations from modules,
and we don't necessarily have enough of the rest of the AST loaded at that
point to allow us to compute linkage, so serialize it instead.
llvm-svn: 174943 | 
| | 
| 
| 
| | llvm-svn: 174050 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Title: [PR9027] volatile struct bug: member is not loaded at -O;
This is caused by last flag passed to @llvm.memcpy being false, 
not honoring that aggregate has at least one 'volatile' data member 
(even though aggregate itself has not been qualified as 'volatile'. 
As a result, optimization optimizes away the memcpy altogether.
Patch review by John MaCall (I still need to fix up a test though).
llvm-svn: 173535 | 
| | 
| 
| 
| 
| 
| 
| 
| | never key functions.  We did not implement that rule for the
iOS ABI, which was driven by what was implemented in gcc-4.2.
However, implement it now for other ARM-based platforms.
llvm-svn: 173515 | 
| | 
| 
| 
| 
| 
| 
| | kind indicates that it can never be redeclared. Good for a 1% speedup,
and redeclaration searching drops off the profile.
llvm-svn: 173054 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | consider (sub)module visibility.
The bulk of this change replaces myriad hand-rolled loops over the
linked list of Objective-C categories/extensions attached to an
interface declaration with loops using one of the four new category
iterator kinds:
  visible_categories_iterator: Iterates over all visible categories
  and extensions, hiding any that have their "hidden" bit set. This is
  by far the most commonly used iterator.
  known_categories_iterator: Iterates over all categories and
  extensions, ignoring the "hidden" bit. This tends to be used for
  redeclaration-like traversals.
  visible_extensions_iterator: Iterates over all visible extensions,
  hiding any that have their "hidden" bit set.
  known_extensions_iterator: Iterates over all extensions, whether
  they are visible to normal name lookup or not.
The effect of this change is that any uses of the visible_ iterators
will respect module-import visibility. See the new tests for examples.
Note that the old accessors for categories and extensions are gone;
there are *Raw() forms for some of them, for those (few) areas of the
compiler that have to manipulate the linked list of categories
directly. This is generally discouraged.
Part two of <rdar://problem/10634711>.
 
llvm-svn: 172665 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | 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 | 
| | 
| 
| 
| 
| 
| | 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 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | 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 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | has ivars that require destruction, but none that require anything
except zero-initialization.  This is common in ARC and (when true
throughout a class hierarchy) permits the elimination of an
unnecessary message-send during allocation.
llvm-svn: 166088 | 
| | 
| 
| 
| | llvm-svn: 165788 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | 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 | 
| | 
| 
| 
| 
| 
| 
| 
| | 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 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | 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 | 
| | 
| 
| 
| | llvm-svn: 164335 | 
| | 
| 
| 
| | llvm-svn: 163863 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | 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 | 
| | 
| 
| 
| 
| 
| 
| 
| | previous ResetObjCLayout calls since this is now handled in Sema.
Part of rdar://11842763
llvm-svn: 160527 | 
| | 
| 
| 
| 
| 
| 
| | static_assert fails when parsing the template, don't diagnose it again on every
instantiation.
llvm-svn: 160088 | 
| | 
| 
| 
| | llvm-svn: 159925 | 
| | 
| 
| 
| 
| 
| 
| | initialization, and use that information to produce the right kind of
initialization during template instantiation.
llvm-svn: 158288 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | reserving a bit
in ObjCMethodDecl to indicate whether the method does not override any other method,
which is the majority of cases.
That way we can avoid unnecessary work doing lookups, especially when PCH is involved.
rdar://11360082
llvm-svn: 156476 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | of templates by using the newly introduce FoldingSetVector. This
preserves insertion order for all iteration of specializations.
I've also included a somewhat terrifying testcase that rapidly builds up
a large number of functions. This is enough that any system with ASLR
will have non-deterministic debug information generated for the test
case without the fix here as the debug information is generated in part
by walking these specializations.
llvm-svn: 156133 | 
| | 
| 
| 
| | llvm-svn: 154676 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | make sure to fully load its external lexical and visible declarations before
re-writing it.
rdar://10914192
llvm-svn: 153254 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Reintroduce lazy name lookup table building, ensuring that the lazy building step
produces the same lookup table that would be built by the eager step.
Avoid building a lookup table for the translation unit outside C++, even in cases
where we can't recover the contents of the table from the declaration chain on
the translation unit, since we're not going to perform qualified lookup into it
anyway. Continue to support lazily building such lookup tables for now, though,
since ASTMerge uses them.
In my tests, this performs very similarly to ToT with r152608 backed out, for C,
Obj-C and C++, and does not suffer from PR10447.
llvm-svn: 152905 | 
| | 
| 
| 
| 
| 
| 
| 
| | scoped enumeration members. Later uses of an enumeration temploid as a nested
name specifier should cause its instantiation. Plus some groundwork for
explicit specialization of member enumerations of class templates.
llvm-svn: 152750 |