| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
| |
llvm-svn: 184516
|
| |
|
|
| |
llvm-svn: 184498
|
| |
|
|
|
|
| |
This is needed to parse libstdc++ 4.7's type_traits, see PR13530.
llvm-svn: 184476
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The untemplated implementation of getParents() doesn't need to be in a
header file.
RecursiveASTVisitor.h is full of repeated macro expansion. Moving this
include to ASTContext.cpp speeds up compilation of
LambdaMangleContext.cpp, a small C++ file with few includes, from 3.7s
to 2.8s for me locally. I haven't measured a full build, but it can't
hurt.
I had to fix a few static analyzer files that were depending on
transitive includes of C++ AST headers.
Reviewers: rsmith, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D982
llvm-svn: 184075
|
| |
|
|
|
|
|
|
| |
Made significantly easier with git-clang-format.
Differential Revision: http://llvm-reviews.chandlerc.com/D947
llvm-svn: 183694
|
| |
|
|
|
|
|
|
|
| |
This reverts commit r183614.
It broke test/Sema/block-printf-attribute-1.c on non-Windows platforms,
and the fix is not trivial.
llvm-svn: 183616
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This helps preserve the type-as-written in the AST, which we need for
MSVC mangling. In particular, we need to preserve the types of array
parameters in function pointer types.
The essence of this change is:
- QualType ArgTy = Param->getType();
+ QualType ArgTy = Param->getTypeSourceInfo()->getType();
... followed by the adjustment in ActOnFunctionDeclarator().
Differential Revision: http://llvm-reviews.chandlerc.com/D883
llvm-svn: 183614
|
| |
|
|
|
|
|
|
|
| |
handle temporaries which have been lifetime-extended to static storage duration
within constant expressions. This correctly handles nested lifetime extension
(through reference members of aggregates in aggregate initializers) but
non-constant-expression emission hasn't yet been updated to do the same.
llvm-svn: 183283
|
| |
|
|
|
|
|
| |
arrays of empty structs. // rdar://14053082
(also pr13062).
llvm-svn: 183234
|
| |
|
|
|
|
|
|
|
| |
This patch ensures that APValues are deallocated with the ASTContext by
registering a deallocation function for APValues to the ASTContext.
Original version of the patch by James Dennett.
llvm-svn: 183101
|
| |
|
|
| |
llvm-svn: 182874
|
| |
|
|
|
|
|
| |
does not support large load/store of atomic objects.
// rdar://13973577
llvm-svn: 182781
|
| |
|
|
| |
llvm-svn: 182773
|
| |
|
|
|
|
|
|
| |
attach, rather than merging all comments on the declaration chain. This gives a
more faithful dump, and has the side benefit of unbreaking uses of dump() from
within AST deserialization (where the redeclaration chain may not be sane).
llvm-svn: 182350
|
| |
|
|
| |
llvm-svn: 181849
|
| |
|
|
|
|
|
| |
This prevents an overflow and assertion when the number of bits cannot be
stored in 64-bits.
llvm-svn: 181839
|
| |
|
|
|
|
|
|
|
| |
recovery form duplicate method definition error thus
preventing doc parsing to loop trying to find comment
for the invalid redefinition in a previous declaration.
// rdar://13836387
llvm-svn: 181710
|
| |
|
|
|
|
|
|
|
| |
In r181677 I removed this llvm_unreachable and it introduced a gcc
warning. Add it back.
Thanks to Patrik Hägglund for noticing it.
llvm-svn: 181704
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
we loaded from PCH, if we're building another PCH, create an update record to
patch the return type of the earlier declaration.
llvm-svn: 181659
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MSVC provides __wchar_t. This is the same as the built-in wchar_t type
from C++, but it is also available with -fno-wchar and in C.
The commit changes ASTContext to have two different types for this:
- WCharTy is the built-in type used for wchar_t in C++ and __wchar_t.
- WideCharTy is the type of a wide character literal. In C++ this is
the same as WCharTy, and in C it is an integer type compatible with
the type in <stddef.h>.
This fixes PR15815.
llvm-svn: 181587
|
| |
|
|
|
|
|
|
|
|
| |
clang would omit 'C' for 'copy' properties and '&' for 'retain' properties if
the property was also 'readonly'. Fix this, which makes clang match gcc4.2's
behavior.
Fixes PR15928.
llvm-svn: 181491
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- References to ObjC bit-field ivars are bit-field lvalues;
fixes rdar://13794269, which got me started down this.
- Introduce Expr::refersToBitField, switch a couple users to
it where semantically important, and comment the difference
between this and the existing API.
- Discourage Expr::getBitField by making it a bit longer and
less general-sounding.
- Lock down on const_casts of bit-field gl-values until we
hear back from the committee as to whether they're allowed.
llvm-svn: 181252
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch then adds all the usual platform-specific pieces for SystemZ:
driver support, basic target info, register names and constraints,
ABI info and vararg support. It also adds new tests to verify pre-defined
macros and inline asm, and updates a test for the minimum alignment change.
This version of the patch incorporates feedback from reviews by
Eric Christopher and John McCall. Thanks to all reviewers!
Patch by Richard Sandiford.
llvm-svn: 181211
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds a new common code feature that allows platform code to
request minimum alignment of global symbols. The background for this is
that on SystemZ, the most efficient way to load addresses of global symbol
is the LOAD ADDRESS RELATIVE LONG (LARL) instruction. This instruction
provides PC-relative addressing, but only to *even* addresses. For this
reason, existing compilers will guarantee that global symbols are always
aligned to at least 2. [ Since symbols would otherwise already use a
default alignment based on their type, this will usually only affect global
objects of character type or character arrays. ] GCC also allows creating
symbols without that extra alignment by using explicit "aligned" attributes
(which then need to be used on both definition and each use of the symbol).
To enable support for this with Clang, this patch adds a
TargetInfo::MinGlobalAlign variable that provides a global minimum for the
alignment of every global object (unless overridden via explicit alignment
attribute), and adds code to respect this setting. Within this patch, no
platform actually sets the value to anything but the default 1, resulting
in no change in behaviour on any existing target.
This version of the patch incorporates feedback from reviews by
Eric Christopher and John McCall. Thanks to all reviewers!
Patch by Richard Sandiford.
llvm-svn: 181210
|
| |
|
|
| |
llvm-svn: 181122
|
| |
|
|
|
|
|
| |
Missing (somewhat ironically) is support for the new deduction rules
in lambda functions, plus PCH support for return type patching.
llvm-svn: 181108
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
MSVC provides __wchar_t, either as an alias for the built-in wchar_t
type, or as a separate type depending on language (C vs C++) and flags
(-fno-wchar).
In -fms-extensions, Clang will simply accept __wchar_t as an alias for
whatever type is used for wide character literals. In -fms-compatibility, we
try to mimic MSVC's behavior by always making __wchar_t a builtin type.
This fixes PR15815.
llvm-svn: 181004
|
| |
|
|
|
|
|
| |
with no comment of their own to inherit the
comment of their aliased type. // rdar://13752382
llvm-svn: 180924
|
| |
|
|
|
|
|
|
| |
are now two distinct canonical 'AutoType's: one is the undeduced 'auto'
placeholder type, and the other is a deduced-but-dependent type. All
deduced-to-a-non-dependent-type cases are still non-canonical.
llvm-svn: 180789
|
| |
|
|
|
|
|
| |
and limit comment extraction to public c++
bases. // rdar://13647476
llvm-svn: 180646
|
| |
|
|
|
|
|
|
| |
a comment, grab the first comment found in its class
heirarchy. Also, when a category is mossing a comment,
grab comment of its primary class. // rdar://13647476
llvm-svn: 180629
|
| |
|
|
| |
llvm-svn: 180610
|
| |
|
|
|
|
|
| |
is part of the decl-specifier-seq of some other declaration,
it doesn't get comment. // rdar://12390371
llvm-svn: 179722
|
| |
|
|
|
|
|
|
| |
overridden_methods_begin/overridden_methods_end directly.
This avoids unnecessary Decl::getASTContext() invocations.
llvm-svn: 179653
|
| |
|
|
|
|
|
|
|
|
|
| |
This reverts commit r179436.
Due to caching, it was possible that we could miss overridden methods that
were introduced by categories later on.
Along with reverting the commit I also included a test case that would have caught this.
llvm-svn: 179547
|
| |
|
|
|
|
|
| |
Use an newly introduce ASTContext::getBaseObjCCategoriesAfterInterface() which caches its
results instead of re-calculating the categories multiple times.
llvm-svn: 179436
|
| |
|
|
|
|
| |
Patch by Amin Shali.
llvm-svn: 179180
|
| |
|
|
|
|
| |
member inside a class template) when loading a PCH file or module.
llvm-svn: 178496
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This also relaxes the requirement on Windows that the member pointer
class type be a complete type (http://llvm.org/PR12070). We still ask
for a complete type to instantiate any templates (MSVC does this), but
if that fails we continue as normal, relying on any inheritance
attributes on the declaration.
Reviewers: rjmccall
CC: triton, timurrrr, cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D568
llvm-svn: 178283
|
| |
|
|
|
|
|
|
|
| |
enum return type to be converted to blocks with any integer type
of the same size.
rdar://13463504
llvm-svn: 177613
|
| |
|
|
|
|
|
|
|
| |
This reverts commit r177158.
I'm blindly reverting this because it appears to be breaking numerous
buildbots. I'll reapply if it doesn't turn out to be the culprit.
llvm-svn: 177165
|
| |
|
|
|
|
|
|
|
| |
FindNodeOrInsertPos() is called 10 lines earlier already, and the function
early-returns there if the result is != 0. InsertPos isn't recomputed after
that check, so this assert is always trivially true. (And it has nothing to
do with if T is canonical or not.)
llvm-svn: 177158
|
| |
|
|
|
|
|
|
|
|
|
| |
namespace {
struct X {};
}
extern "C" {
X b = X();
}
llvm-svn: 176866
|
| |
|
|
|
|
| |
No (intended) functionality change.
llvm-svn: 176726
|
| |
|
|
|
|
|
|
| |
MaxAtomicPromoteWidth. Fix a ton of terrible bugs with
_Atomic types and (non-intrinsic-mediated) loads and stores
thereto.
llvm-svn: 176658
|
| |
|
|
|
|
| |
PrintTemplateArgumentList.
llvm-svn: 175894
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
commands
Add an ability to specify custom documentation block comment commands via a new
class CommentOptions. The intention is that this class will hold future
customizations for comment parsing, including defining documentation comments
with specific numbers of parameters, etc.
CommentOptions instance is a member of LangOptions.
CommentOptions is controlled by a new command-line parameter
-fcomment-block-commands=Foo,Bar,Baz.
llvm-svn: 175892
|
| |
|
|
|
|
| |
Post-commit CR feedback from Jordan Rose regarding r175594.
llvm-svn: 175679
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The TypeLoc hierarchy used the llvm::cast machinery to perform undefined
behavior by casting pointers/references to TypeLoc objects to derived types
and then using the derived copy constructors (or even returning pointers to
derived types that actually point to the original TypeLoc object).
Some context is in this thread:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-December/056804.html
Though it's spread over a few months which can be hard to read in the mail
archive.
llvm-svn: 175462
|