| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Refactor VariantMatcher to use an interface underneath.
It supports "Single" and "Polymorphic". Will support more in the future.
Reviewers: klimek
CC: cfe-commits, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D1446
llvm-svn: 189032
|
| |
|
|
|
|
| |
I was bound to screw this up somehow.
llvm-svn: 189029
|
| |
|
|
| |
llvm-svn: 189028
|
| |
|
|
|
|
|
|
|
|
| |
Thanks for pointing this out, Stephen. I think this is right now -- I
attempted to try all four valid combinations with both the autoconf and
CMake builds.
See also LLVM changes to the configure script.
llvm-svn: 189027
|
| |
|
|
|
|
|
|
|
|
| |
required as these types may never end up emitting the full class data
This might be able to be optimized further by only doing this in the
absence of a key function, but it doesn't look like GCC is doing that so
I'm not rushing to do it just yet.
llvm-svn: 189022
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this patch, braced lists (with more than 3 elements are formatted in a
column layout if possible). E.g.:
static const uint16_t CallerSavedRegs64Bit[] = {
X86::RAX, X86::RDX, X86::RCX, X86::RSI, X86::RDI,
X86::R8, X86::R9, X86::R10, X86::R11, 0
};
Required other changes:
- FormatTokens can now have a special role that contains extra data and can do
special formattings. A comma separated list is currently the only
implementation.
- Move penalty calculation entirely into ContinuationIndenter (there was a last
piece still in UnwrappedLineFormatter).
Review: http://llvm-reviews.chandlerc.com/D1457
llvm-svn: 189018
|
| |
|
|
|
|
|
|
| |
more principled approach (the 'requires complete type' callback)
No functionality change intended.
llvm-svn: 189013
|
| |
|
|
|
|
| |
This reverts commit 606f5d7a99b11957e057e4cd1f55f931f66a42c7.
llvm-svn: 189004
|
| |
|
|
|
|
|
|
| |
to turn on this warning in Visual C++ - sorry!*"
This reverts commit d01d0b63d87ac465f15ce1d6b56bf3faf4525769.
llvm-svn: 189003
|
| |
|
|
| |
llvm-svn: 188996
|
| |
|
|
|
|
|
|
| |
changing Parameter from MutableArrayRef to
ArrayRef.
No functionality change intended.
llvm-svn: 188994
|
| |
|
|
|
|
|
| |
This tests warning flags, so no need to test for specific alignment which is
platform-dependent.
llvm-svn: 188993
|
| |
|
|
| |
llvm-svn: 188992
|
| |
|
|
| |
llvm-svn: 188991
|
| |
|
|
| |
llvm-svn: 188989
|
| |
|
|
|
|
| |
the context in couple other functions that are called from creation functions.
llvm-svn: 188986
|
| |
|
|
|
|
| |
the context in couple other functions that are called from creation functions.
llvm-svn: 188985
|
| |
|
|
| |
llvm-svn: 188984
|
| |
|
|
|
|
| |
on this warning in Visual C++ - sorry!*
llvm-svn: 188979
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Specifically, the following features are not included in this commit:
- any sort of capturing within generic lambdas
- nested lambdas
- conversion operator for captureless lambdas
- ensuring all visitors are generic lambda aware
As an example of what compiles:
template <class F1, class F2>
struct overload : F1, F2 {
using F1::operator();
using F2::operator();
overload(F1 f1, F2 f2) : F1(f1), F2(f2) { }
};
auto Recursive = [](auto Self, auto h, auto ... rest) {
return 1 + Self(Self, rest...);
};
auto Base = [](auto Self, auto h) {
return 1;
};
overload<decltype(Base), decltype(Recursive)> O(Base, Recursive);
int num_params = O(O, 5, 3, "abc", 3.14, 'a');
Please see attached tests for more examples.
Some implementation notes:
- Add a new Declarator context => LambdaExprParameterContext to
clang::Declarator to allow the use of 'auto' in declaring generic
lambda parameters
- Augment AutoType's constructor (similar to how variadic
template-type-parameters ala TemplateTypeParmDecl are implemented) to
accept an IsParameterPack to encode a generic lambda parameter pack.
- Add various helpers to CXXRecordDecl to facilitate identifying
and querying a closure class
- LambdaScopeInfo (which maintains the current lambda's Sema state)
was augmented to house the current depth of the template being
parsed (id est the Parser calls Sema::RecordParsingTemplateParameterDepth)
so that Sema::ActOnLambdaAutoParameter may use it to create the
appropriate list of corresponding TemplateTypeParmDecl for each
auto parameter identified within the generic lambda (also stored
within the current LambdaScopeInfo). Additionally,
a TemplateParameterList data-member was added to hold the invented
TemplateParameterList AST node which will be much more useful
once we teach TreeTransform how to transform generic lambdas.
- SemaLambda.h was added to hold some common lambda utility
functions (this file is likely to grow ...)
- Teach Sema::ActOnStartOfFunctionDef to check whether it
is being called to instantiate a generic lambda's call
operator, and if so, push an appropriately prepared
LambdaScopeInfo object on the stack.
- Teach Sema::ActOnStartOfLambdaDefinition to set the
return type of a lambda without a trailing return type
to 'auto' in C++1y mode, and teach the return type
deduction machinery in SemaStmt.cpp to process either
C++11 and C++14 lambda's correctly depending on the flag.
- various tests were added - but much more will be needed.
A greatful thanks to all reviewers including Eli Friedman,
James Dennett and the ever illuminating Richard Smith. And
yet I am certain that I have allowed unidentified bugs to creep in;
bugs, that I will do my best to slay, once identified!
Thanks!
llvm-svn: 188977
|
| |
|
|
| |
llvm-svn: 188975
|
| |
|
|
| |
llvm-svn: 188974
|
| |
|
|
|
|
| |
least one bug, as it does not respect the variable template specialization hierarchy well.
llvm-svn: 188969
|
| |
|
|
|
|
|
|
|
| |
Basically, isInMainFile considers line markers, and isWrittenInMainFile
doesn't. Distinguishing between the two is useful when dealing with
files which are preprocessed files or rewritten with -frewrite-includes
(so we don't, for example, print useless warnings).
llvm-svn: 188968
|
| |
|
|
|
|
| |
return types
llvm-svn: 188962
|
| |
|
|
|
|
| |
No intended functionality change.
llvm-svn: 188959
|
| |
|
|
|
|
| |
Patch thanks to Christian Wailes!
llvm-svn: 188940
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The original idea was to implement it all on the driver, but to do that the
driver needs to know the sse level and to do that it has to know the default
features of a cpu.
Benjamin Kramer pointed out that if one day we decide to implement support for
' __attribute__ ((__target__ ("arch=core2")))', then the frontend needs to
keep its knowledge of default features of a cpu.
To avoid duplicating which part of clang handles default cpu features,
it is probably better to handle -mfpmath in the frontend.
For ARM this patch is just a small improvement. Instead of a cpu list, we
check if neon is enabled, which allows us to reject things like
-mcpu=cortex-a9 -mfpu=vfp -mfpmath=neon
For X86, since LLVM doesn't support an independent ssefp feature, we just
make sure the selected -mfpmath matches the sse level.
llvm-svn: 188939
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Adds support for %I, %I32 and %I64.
Reviewers: hans, jordan_rose, rnk, majnemer
Reviewed By: majnemer
CC: cfe-commits, cdavis5x
Differential Revision: http://llvm-reviews.chandlerc.com/D1456
llvm-svn: 188937
|
| |
|
|
|
|
| |
Patch thanks to Christian Wailes!
llvm-svn: 188934
|
| |
|
|
| |
llvm-svn: 188931
|
| |
|
|
|
|
|
|
|
|
|
| |
With r185721, calling mangleCXXRTTIName on C code will cause crashes.
This commit fixes crashes on C testing cases when turning on struct-path TBAA.
For C code, we simply use the Decl name without the context. This can
cause two different structs having the same name, and may cause inaccurate but
conservative alias results.
llvm-svn: 188930
|
| |
|
|
| |
llvm-svn: 188929
|
| |
|
|
|
|
| |
as reported by static analyer API with CF_CONSUMED.
llvm-svn: 188922
|
| |
|
|
|
|
| |
recovering by adding empty parenthesis. Fixes PR16676!
llvm-svn: 188920
|
| |
|
|
|
|
| |
literals.
llvm-svn: 188918
|
| |
|
|
|
|
|
| |
setter/getter implementations, migrate them to
nonatomic properties.
llvm-svn: 188914
|
| |
|
|
|
|
|
| |
setFeatureEnabled is never called with "32" or "64". The driver never passes it
and mips' getDefaultFeatures sets the Features map directly.
llvm-svn: 188913
|
| |
|
|
|
|
|
| |
This is a partial revert of r188817 now that the driver handles -target-feature
in a single place.
llvm-svn: 188910
|
| |
|
|
|
|
| |
CodeGenFunction::InitializeVTablePointer[s]
llvm-svn: 188909
|
| |
|
|
|
|
|
| |
No functionality change other than changing the order of -target-feature
relative to other -cc1 command line arguments.
llvm-svn: 188906
|
| |
|
|
| |
llvm-svn: 188905
|
| |
|
|
|
|
| |
Thanks for Craig Topper for noticing it.
llvm-svn: 188902
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
1. We now print the return type of lambdas and return type deduced functions
as "auto". Trailing return types with decltype print the underlying type.
2. Use the lambda or block scope for the PredefinedExpr type instead of the
parent function. This fixes PR16946, a strange mismatch between type of the
expression and the actual result.
3. Verify the type in CodeGen.
4. The type for blocks is still wrong. They are numbered and the name is not
known until CodeGen.
llvm-svn: 188900
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
if (!aaaaaaaaaa( // break
aaaaa)) {
}
After:
if (!aaaaaaaaaa( // break
aaaaa)) {
}
Also cleaned up formatting using clang-format.
llvm-svn: 188891
|
| |
|
|
|
|
| |
implement them for -cxx-abi microsoft
llvm-svn: 188870
|
| |
|
|
| |
llvm-svn: 188867
|
| |
|
|
|
|
| |
escape code.
llvm-svn: 188863
|
| |
|
|
| |
llvm-svn: 188862
|
| |
|
|
| |
llvm-svn: 188861
|