| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
builtin types (When requested). This is another step toward making
ASTUnit build the ASTContext as needed when loading an AST file,
rather than doing so after the fact. No actual functionality change (yet).
llvm-svn: 138985
|
| |
|
|
| |
llvm-svn: 137896
|
| |
|
|
| |
llvm-svn: 137653
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Microsoft mode. A new AST node is introduced: ClassScopeFunctionSpecialization. This node holds a FunctionDecl that is not yet specialized; then during the class template instantiation the ClassScopeFunctionSpecialization will spawn the actual function specialization.
Example:
template <class T>
class A {
public:
template <class U> void f(U p) { }
template <> void f(int p) { } // <== class scope specialization
};
This extension is necessary to parse MSVC standard C++ headers, MFC and ATL code.
BTW, with this feature in, clang can parse (-fsyntax-only) all the MSVC 2010 standard header files without any error.
llvm-svn: 137573
|
| |
|
|
| |
llvm-svn: 136963
|
| |
|
|
|
|
|
|
| |
FunctionDecl::setParams.
EndRangeLoc should always be set to at least the ending paren or brace.
llvm-svn: 136573
|
| |
|
|
|
|
|
|
|
| |
declarations was
broken because the end location of the parameter was the end location of the default arg,
resulting in a source range that could begin in one file and end in another.
llvm-svn: 136572
|
| |
|
|
|
|
|
|
| |
LLVM.h imports
them into the clang namespace.
llvm-svn: 135852
|
| |
|
|
|
|
| |
neither was inline. Fixes bug introduced in r135377.
llvm-svn: 135380
|
| |
|
|
|
|
| |
Fixes PR10233!
llvm-svn: 135377
|
| |
|
|
|
|
|
|
|
|
|
| |
to allow clients to specify that they've already (correctly) loaded
declarations, and that no further action is needed.
Also, make sure that we clear the "has external lexical declarations"
bit before calling FindExternalLexicalDecls(), to avoid infinite
recursion.
llvm-svn: 135306
|
| |
|
|
|
|
| |
so roll it out.
llvm-svn: 134638
|
| |
|
|
|
|
| |
function. Fixes PR10233!
llvm-svn: 134634
|
| |
|
|
|
|
| |
for explicit specializations with their own explicit visibility.
llvm-svn: 133958
|
| |
|
|
| |
llvm-svn: 133528
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MaterializeTemporaryExpr captures a reference binding to a temporary
value, making explicit that the temporary value (a prvalue) needs to
be materialized into memory so that its address can be used. The
intended AST invariant here is that a reference will always bind to a
glvalue, and MaterializeTemporaryExpr will be used to convert prvalues
into glvalues for that binding to happen. For example, given
const int& r = 1.0;
The initializer of "r" will be a MaterializeTemporaryExpr whose
subexpression is an implicit conversion from the double literal "1.0"
to an integer value.
IR generation benefits most from this new node, since it was
previously guessing (badly) when to materialize temporaries for the
purposes of reference binding. There are likely more refactoring and
cleanups we could perform there, but the introduction of
MaterializeTemporaryExpr fixes PR9565, a case where IR generation
would effectively bind a const reference directly to a bitfield in a
struct. Addresses <rdar://problem/9552231>.
llvm-svn: 133521
|
| |
|
|
|
|
| |
getLVForNamespaceScopeDecl(). // rdar://9609649
llvm-svn: 133182
|
| |
|
|
|
|
| |
include a specific variable.
llvm-svn: 133102
|
| |
|
|
| |
llvm-svn: 132878
|
| |
|
|
| |
llvm-svn: 132460
|
| |
|
|
|
|
|
|
| |
The general out-of-line case (including explicit instantiation mostly
works except that the definition is being lost somewhere between the AST
and CodeGen, so the definition is never emitted.
llvm-svn: 131933
|
| |
|
|
|
|
| |
build.
llvm-svn: 131390
|
| |
|
|
|
|
|
|
| |
placement allocation or deallocation functions. These functions cannot be
replaced by the user and are exempt from the normal requirements on
allocation functions (e.g. that they must return unaliased memory).
llvm-svn: 131386
|
| |
|
|
|
|
|
|
|
|
| |
that the destructor body is trivial and that all member variables also have either
trivial destructors or trivial destructor bodies, we don't need to initialize the
vtable pointers since no virtual member functions will be called on the destructor.
Fixes PR9181.
llvm-svn: 131368
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- New isDefined() function checks for deletedness
- isThisDeclarationADefinition checks for deletedness
- New doesThisDeclarationHaveABody() does what
isThisDeclarationADefinition() used to do
- The IsDeleted bit is not propagated across redeclarations
- isDeleted() now checks the canoncial declaration
- New isDeletedAsWritten() does what it says on the tin.
- isUserProvided() now correct (thanks Richard!)
This fixes the bug that we weren't catching
void foo() = delete;
void foo() {}
as being a redefinition.
llvm-svn: 131013
|
| |
|
|
|
|
| |
structs. // rdar://8823265
llvm-svn: 130783
|
| |
|
|
| |
llvm-svn: 130696
|
| |
|
|
|
|
|
| |
devirtualize Decl (because bits can't get laid out in base
classes if the base is POD).
llvm-svn: 130632
|
| |
|
|
|
|
| |
// rdar://8823265 - wip.
llvm-svn: 130451
|
| |
|
|
|
|
|
|
|
| |
function definitions are parsed at the end of the translation unit only if it is required by an actual instantiation. As such all the symbols of the TU are available during name lookup.
Using this flag is necessary for compatibility with Microsoft template code.
This also provides some parsing speed improvement.
llvm-svn: 130022
|
| |
|
|
| |
llvm-svn: 129823
|
| |
|
|
| |
llvm-svn: 129567
|
| |
|
|
|
|
| |
function template from a previous PCH. Fixes the only crasher when using massive chains on Clang's Sema component. We still have some incomplete codegen there.
llvm-svn: 129516
|
| |
|
|
|
|
|
|
|
| |
platform implies default visibility. To achieve these, refactor our
lookup of explicit visibility so that we search for both an explicit
VisibilityAttr and an appropriate AvailabilityAttr, favoring the
VisibilityAttr if it is present.
llvm-svn: 128336
|
| |
|
|
|
|
|
| |
a function template decl's pattern, which was suddenly exposed by my
last patch.
llvm-svn: 128073
|
| |
|
|
| |
llvm-svn: 127876
|
| |
|
|
| |
llvm-svn: 127330
|
| |
|
|
|
|
| |
range for declarations using postfix types.
llvm-svn: 127251
|
| |
|
|
| |
llvm-svn: 127242
|
| |
|
|
| |
llvm-svn: 127237
|
| |
|
|
| |
llvm-svn: 127225
|
| |
|
|
| |
llvm-svn: 127119
|
| |
|
|
| |
llvm-svn: 127094
|
| |
|
|
|
|
|
|
|
| |
computing for a nested decl with explicit visibility. This is all part
of the general philosophy of explicit visibility attributes, where
any information that was obviously available at the attribute site
should probably be ignored. Fixes PR9371.
llvm-svn: 126992
|
| |
|
|
| |
llvm-svn: 126952
|
| |
|
|
| |
llvm-svn: 126939
|
| |
|
|
| |
llvm-svn: 126489
|
| |
|
|
|
|
|
| |
tag definitions. Also, add support for template instantiation of
NestedNameSpecifierLocs.
llvm-svn: 126470
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
UnresolvedUsingValueDecl to use NestedNameSpecifierLoc rather than the
extremely-lossy NestedNameSpecifier/SourceRange pair it used to use,
improving source-location information.
Various infrastructure updates to support NestedNameSpecifierLoc:
- AST/PCH (de-)serialization
- Recursive AST visitor
- libclang traversal (including the first tests of this
functionality)
llvm-svn: 126459
|
| |
|
|
|
|
|
|
|
|
|
| |
I tried to add test cases for these, but I can't because variables
aren't warned on the way functions are and the codegen layer appears to
use different logic for determining that 'a' and 'g' in the test case
should receive C mangling. I've included the test so that if we ever
switch the codegen layer to use these functions, we won't regress due to
latent bugs.
llvm-svn: 126453
|