| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
we have a redeclarable type, and only use the new virtual versions
(getPreviousDeclImpl() and getMostRecentDeclImpl()) when we don't have
that type information. This keeps us from penalizing users with strict
type information (and is the moral equivalent of a "final" method).
Plus, settle on the names getPreviousDecl() and getMostRecentDecl()
throughout.
llvm-svn: 148187
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
APValue::Array and APValue::MemberPointer. All APValue values can now be emitted
as constants.
Add new CGCXXABI entry point for emitting an APValue MemberPointer. The other
entrypoints dealing with constant member pointers are no longer necessary and
will be removed in a later change.
Switch codegen from using EvaluateAsRValue/EvaluateAsLValue to
VarDecl::evaluateValue. This performs caching and deals with the nasty cases in
C++11 where a non-const object's initializer can refer indirectly to
previously-initialized fields within the same object.
Building the intermediate APValue object incurs a measurable performance hit on
pathological testcases with huge initializer lists, so we continue to build IR
directly from the Expr nodes for array and record types outside of C++11.
llvm-svn: 148178
|
|
|
|
|
|
|
|
| |
With that, centralize the way we merge visibility, always preferring explicit over
implicit and then picking the most restrictive one.
Fixes pr10113 and pr11690.
llvm-svn: 148163
|
|
|
|
|
|
|
| |
memcmp, strncmp,..) out of Sema and into FunctionDecl so that the logic
could be reused in the analyzer.
llvm-svn: 148142
|
|
|
|
|
|
|
| |
go through a central allocation routine
Decl::AllocateDeserializedDecl(). No actual functionality change (yet).
llvm-svn: 147614
|
|
|
|
| |
llvm-svn: 147575
|
|
|
|
|
|
|
|
|
|
|
|
| |
the AST reader doesn't actually perform a merge, because name lookup
knows how to merge identical typedefs together.
As part of this, teach C/Objective-C name lookup to return multiple
results in all cases, rather than first digging through the attributes
to see if the value is overloadable. This way, we'll catch ambiguous
lookups in C/Objective-C.
llvm-svn: 147498
|
|
|
|
|
|
| |
@import identifier [. identifier]* ;
llvm-svn: 147452
|
|
|
|
| |
llvm-svn: 147424
|
|
|
|
|
|
| |
ObjCProtocolDecl modules forward declarations properly.
llvm-svn: 147415
|
|
|
|
|
|
| |
take precedence over command line options. Fixes PR10113.
llvm-svn: 147405
|
|
|
|
| |
llvm-svn: 147401
|
|
|
|
|
|
|
|
|
| |
when using -fvisibility-inlines-hidden. This matches gcc's behavior and
documentation.
Fixes PR11642.
llvm-svn: 147295
|
|
|
|
|
|
|
|
| |
- constexpr function template instantiations
- variables of reference type
- constexpr variables
llvm-svn: 147031
|
|
|
|
|
|
| |
http://llvm.org/docs/CodingStandards.html#ll_virtual_anch
llvm-svn: 146959
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
variable is initialized by a non-constant expression, and pass in the variable
being declared so that earlier-initialized fields' values can be used.
Rearrange VarDecl init evaluation to make this possible, and in so doing fix a
long-standing issue in our C++ constant expression handling, where we would
mishandle cases like:
extern const int a;
const int n = a;
const int a = 5;
int arr[n];
Here, n is not initialized by a constant expression, so can't be used in an ICE,
even though the initialization expression would be an ICE if it appeared later
in the TU. This requires computing whether the initializer is an ICE eagerly,
and saving that information in PCH files.
llvm-svn: 146856
|
|
|
|
|
|
|
| |
implicitly generated in a translation unit. Modules will need this
information to identify the actual imports that occurred.
llvm-svn: 145734
|
|
|
|
|
|
|
| |
implicit ImportDecl in the translation unit to record the presence of
the import.
llvm-svn: 145727
|
|
|
|
|
|
|
|
| |
__import_module__ std.vector;
in the AST.
llvm-svn: 145725
|
|
|
|
|
|
|
|
| |
in type signatures have external linkage.
Fixes rdar://10058317.
llvm-svn: 145551
|
|
|
|
|
|
|
|
|
| |
explicit template specializations (which represent actual functions somebody wrote).
Along the way, refactor some other code which similarly cares about whether or
not they are looking at a template instantiation.
llvm-svn: 145547
|
|
|
|
|
|
|
| |
literal types, as well as derived-to-base casts for lvalues and
derived-to-virtual-base casts.
llvm-svn: 144265
|
|
|
|
|
|
|
| |
but it is sometimes useful to track blocks. Do so. Also
optimize the storage of these expressions.
llvm-svn: 144263
|
|
|
|
| |
llvm-svn: 144094
|
|
|
|
|
|
|
|
| |
of a pointer.
Passing a pointer was a bad idea as it collides with the overload for void*.
llvm-svn: 141971
|
|
|
|
|
|
| |
libcalls.
llvm-svn: 141723
|
|
|
|
|
|
|
|
|
|
|
| |
- Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions,
and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert
behaviour.
- Factor out evaluation of bitfield bit widths.
- Fix a few places which would evaluate an expression twice: once to determine
whether it is a constant expression, then again to get the value.
llvm-svn: 141561
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the fields if they are already loaded, just ignore them when we are building
the chain in BuildDeclChain.
This fixes an lldb issue where fields were removed and not getting re-added
because lldb is based on ASTImporter adding decls to DeclContext and fields
were already added before by the ASTImporter.
We should really simplify the interaction between DeclContext <-> lldb
going forward..
rdar://10246067
llvm-svn: 141418
|
|
|
|
|
|
|
| |
for better self-documenting code, since the semantics
are subtly different from getDefinition().
llvm-svn: 141355
|
|
|
|
|
|
| |
bits reserved for that value in VarDecl. Fixes PR 10538.
llvm-svn: 141273
|
|
|
|
| |
llvm-svn: 140407
|
|
|
|
| |
llvm-svn: 140367
|
|
|
|
|
|
| |
Use ASTTemplateArgumentListInfo instead.
llvm-svn: 140331
|
|
|
|
| |
llvm-svn: 140268
|
|
|
|
|
|
| |
Per John's review comments for r140068.
llvm-svn: 140142
|
|
|
|
| |
llvm-svn: 140068
|
|
|
|
|
|
|
|
| |
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
|