Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

LLVM 4.0 #14

Merged
merged 2,440 commits into from
Mar 15, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
2440 commits
Select commit Hold shift + click to select a range
918a07d
Add warning flag for "partial specialization is not more specialized …
zygoloid Dec 27, 2016
7d56d0a
DebugInfo: Don't include size/alignment on class declarations
dwblaikie Dec 27, 2016
2a7adec
Update test that relies on the optimizer to match new output.
mkuperst Dec 28, 2016
c673702
DR1315: a non-type template argument in a partial specialization is p…
zygoloid Dec 28, 2016
ea5d486
Mark 'auto' as dependent when instantiating the type of a non-type te…
zygoloid Dec 28, 2016
7542435
[CodeGen] Unique constant CompoundLiterals.
gburgessiv Dec 28, 2016
0922a53
[ThinLTO] Add missing FileCheck invocation
teresajohnson Dec 28, 2016
2b63cb5
Revert "Driver: switch Windows to static RelocModel"
rnk Dec 28, 2016
0c0969d
Fix format. NFC
kkwli Dec 28, 2016
a8961ec
[ThinLTO] No need to rediscover imports in distributed backend
teresajohnson Dec 28, 2016
5924534
Mention devirtualization in release notes
prazek Dec 28, 2016
b9a778b
Revert "Mention devirtualization in release notes"
prazek Dec 28, 2016
715c2ef
[ItaniumABI] NFC changes
prazek Dec 28, 2016
a7c050e
[ADT] Delete RefCountedBaseVPTR.
Dec 29, 2016
1008244
[OpenMP] Sema and parsing for 'target teams distribute parallel for’ …
kkwli Dec 29, 2016
fd7e956
Remove bogus assertion and add testcase that triggers it.
zygoloid Dec 30, 2016
904c878
Allow lexer to handle string_view literals. Patch from Anton Bikineev.
EricWF Dec 30, 2016
ac2b77e
CodeGen: use a StringSwitch instead of cascasding ifs
compnerd Dec 30, 2016
e8932e5
[clang] Minor fix to libASTMatcherTutorial
madsravn Dec 30, 2016
f9f8435
Wdocumentation fix
RKSimon Dec 30, 2016
de64666
Typo fix in AST matcher documentation: s/aribtrary/arbitrary/
jdennett Dec 31, 2016
ff65ccf
Remove redundant assertion.
zygoloid Dec 31, 2016
021fcf9
[clang] Fix clean build of generate-order-file
alexander-shaposhnikov Dec 31, 2016
2faed1c
[c++17] Implement P0522R0 as written. This allows a template template…
zygoloid Dec 31, 2016
dbfc80e
Fix typo in test case. NFC
kkwli Dec 31, 2016
b63fa9e
CodeGen: update comment about RTTI field
compnerd Jan 1, 2017
f34626d
Address post-commit review comments.
zygoloid Jan 2, 2017
1c79362
DR1391: Check for implicit conversion sequences for non-dependent fun…
zygoloid Jan 2, 2017
60fb868
Revert "DR1391: Check for implicit conversion sequences for non-depen…
rengolin Jan 2, 2017
74e1e75
[OpenMP] Add test cases for the proc_bind and schedule clauses with '…
kkwli Jan 2, 2017
6f68cf4
Remove isIgnored()-test that is more expensive than the analysis behi…
djasper-gh Jan 2, 2017
c064de9
Add testcase for the regression introduced in r290808.
zygoloid Jan 2, 2017
be92cc3
[OpenMP] Sema and parsing for 'target teams distribute parallel for s…
kkwli Jan 3, 2017
8940798
[CodeCompletion] Autocomplete NS_DESIGNATED_INITIALIZER in initializers
hyp Jan 3, 2017
a2c5a55
Handle FriendDecl in DeclContextPrinter
hyp Jan 3, 2017
550e0fa
Handle UsingDecl and UsingShadowDecl in DeclContextPrinter
hyp Jan 3, 2017
4e71c53
Handle EmptyDecl in DeclContextPrinter
hyp Jan 3, 2017
7fd9da9
Handle ClassTemplateSpecializationDecl in DeclContextPrinter
hyp Jan 3, 2017
44df50d
Handle AccessSpecDecl in DeclContextPrinter
hyp Jan 3, 2017
d26625b
Handle VarTemplateDecl in DeclContextPrinter
hyp Jan 3, 2017
48194d1
Handle StaticAssertDecl in DeclContextPrinter
hyp Jan 3, 2017
fb9bfee
[clang-tidy] Add check name to YAML export
alexfh Jan 3, 2017
f5be8ba
[OPENMP] Private, firstprivate, and lastprivate clauses for distribut…
Jan 3, 2017
046076f
[OpenMP] Code cleanup for NVPTX OpenMP codegen
arpith-jacob Jan 3, 2017
4c4d0ce
[Win64] Don't widen integer literal zero arguments to unprototyped fu…
rnk Jan 3, 2017
fd845a5
Relax CHECK line from r290906
rnk Jan 3, 2017
d49e17b
Re-add objectsize function/incomplete type checks.
gburgessiv Jan 3, 2017
ae1bed5
Add -plugin-opt=sample-profile for thinLTO build.
danielcdh Jan 4, 2017
e5eb147
Extend -Wtautological-overlap-compare to more cases.
Weverything Jan 4, 2017
08f2fcf
Fix template argument deduction when only some of a parameter pack is…
zygoloid Jan 4, 2017
6471f5e
Remove accidentally-added lines in r290923 test, and add another test…
zygoloid Jan 4, 2017
ac00ead
Change clang-format's Chromium JavaScript defaults
nico Jan 4, 2017
44ea0c4
Fix deduction of pack elements after a braced-init-list.
zygoloid Jan 4, 2017
a8ae85f
[clang] Update lit config in utils/perf-training
alexander-shaposhnikov Jan 4, 2017
8bd2b99
clang-format: [JS] avoid indent after ambient function declarations.
mprobst Jan 4, 2017
8fca6cf
Add -f[no-]strict-return flag that can be used to avoid undefined beh…
hyp Jan 4, 2017
c9c73f6
Fix a buildbot failure introduced by r290960.
hyp Jan 4, 2017
4f271b8
Accept and ignore -Wa,-mbig-obj on COFF targets for gas compatibility
rnk Jan 4, 2017
75198e1
[CUDA] Pre-include sm_60 and sm_61 headers.
Artem-B Jan 4, 2017
54598be
[OpenMP] Update target codegen for NVPTX device.
arpith-jacob Jan 4, 2017
1b7423d
Use -### so the mbig-obj.c test passes when there is no registered x8…
rnk Jan 4, 2017
e56476e
Reverting commit r290983 while debugging test failure on windows.
arpith-jacob Jan 4, 2017
05ecdd8
Support -fno-delayed-template-parsing in clang-cl.exe
rnk Jan 4, 2017
2c7a72a
[Sema] Replace remove_if+erase with erase_if. NFC.
gburgessiv Jan 4, 2017
cb6c378
Factor out duplicated code and simplify.
zygoloid Jan 4, 2017
2124289
Revert accidentally-committed file.
zygoloid Jan 4, 2017
88fb408
Fix failure to treat overloaded function in braced-init-list as a non…
zygoloid Jan 4, 2017
e50c4ef
Remove use of intrusive ref count ownership acquisition
dwblaikie Jan 4, 2017
d3ccc21
Fix for LLVM Bitcode API change (to use std::shared_ptr)
dwblaikie Jan 4, 2017
5465b0d
[Parse] Don't ignore attributes after a late-parsed attr.
gburgessiv Jan 4, 2017
809bd28
Bail out if we try to build a DeclRefExpr naming an invalid declaration.
zygoloid Jan 4, 2017
485c70d
Only instantiate members of nested classes in local classes once, rat…
zygoloid Jan 4, 2017
952bd43
[gtest] The way EXPECT_TEST now works after upgrading gtest triggers an
chandlerc Jan 4, 2017
b0c114c
Correct Vectorcall Register passing and HVA Behavior
Jan 5, 2017
f228bfa
[MS] Instantiate default args during instantiation of exported defaul…
rnk Jan 5, 2017
a82cebf
[Sema] Mark undefined ctors as deleted. NFC.
gburgessiv Jan 5, 2017
cf2ed0b
Fix assertion failure on deduction failure due to too short template …
zygoloid Jan 5, 2017
b98cb95
Factor out more common logic in template argument deduction from func…
zygoloid Jan 5, 2017
0738ab9
Per [temp.deduct.call], do not deduce an array bound of 0 from an emp…
zygoloid Jan 5, 2017
86d8413
Add AVR target and toolchain to Clang
Jan 5, 2017
a758d03
[AVR] Support r26 through r31 in inline assembly
Jan 5, 2017
73ac1c9
[AVR] Revert the functional part of r291083
Jan 5, 2017
ec86be0
No canonical-prefixes match in avr-toolchain.c.
hokein Jan 5, 2017
d407903
[OpenMP] Update target codegen for NVPTX device.
arpith-jacob Jan 5, 2017
72e537a
CodeGen: plumb header search down to the IAS
compnerd Jan 5, 2017
da5ef96
[OpenMP] Add fields for flags in the offload entry descriptor.
Jan 5, 2017
68c2f4e
test: add an explicit triple
compnerd Jan 5, 2017
76b76dc
[Windows] Remove functions in intrin.h that are defined in Builtin.def.
Jan 5, 2017
15128fb
[TableGen] Only normalize the spelling of GNU-style attributes.
Jan 5, 2017
c3d7a36
[CUDA] Make CUDAInstallationDetector take the host triple in its cons…
Jan 5, 2017
c04b674
[Driver] Driver changes to support CUDA compilation on Windows.
Jan 5, 2017
9412efe
[ToolChains] Use "static" instead of an anonymous namespace for a fun…
Jan 5, 2017
26ee5b5
[CUDA] Add __declspec spellings for CUDA attributes.
Jan 5, 2017
bd340f1
[CUDA] More correctly inherit primitive types from the host during de…
Jan 5, 2017
6f52d3c
[CUDA] Let NVPTX inherit the host's calling conventions.
Jan 5, 2017
a2b7c3d
[CUDA] Don't define functions that the CUDA headers themselves define…
Jan 5, 2017
a39e49e
[CUDA] Rename keywords used in macro so they don't conflict with MSVC.
Jan 5, 2017
71fadd1
test: add a requires registered target
compnerd Jan 5, 2017
eeb7838
Migrate PathDiagnosticPiece to std::shared_ptr
dwblaikie Jan 5, 2017
cdc6110
Typo
jsonn Jan 5, 2017
f6f617a
Use shared_ptr instead of IntrusiveRefCntPtr for ModuleFileExtension
dwblaikie Jan 5, 2017
adb2f1d
Simplify ASTReader ctor by using in-class initializers (NSDMIs to the…
dwblaikie Jan 5, 2017
88c7b76
Simplify ASTReader ctor by using in-class initializers for many membe…
dwblaikie Jan 5, 2017
e8ba82c
Move VariantMatcher's Payload to std::shared_ptr rather than Intrusiv…
dwblaikie Jan 5, 2017
d214e3d
Move FailedModulesSet over to shared_ptr from IntrusiveRefCntPtr
dwblaikie Jan 5, 2017
2dac430
Move PreprocessorOptions to std::shared_ptr from IntrusiveRefCntPtr
dwblaikie Jan 5, 2017
5a12bb8
Move Preprocessor over to std::shared_ptr rather than IntrusiveRefCntPtr
dwblaikie Jan 5, 2017
48cafe3
Move SerializedDiagnosticPrinter's SharedState to std::shared_ptr rat…
dwblaikie Jan 5, 2017
1c9f404
If an explicitly-specified pack might have been extended by template …
zygoloid Jan 5, 2017
d65cd1f
Add vec_insert4b and vec_extract4b functions to altivec.h
Jan 5, 2017
4a854da
IntrusiveRefCntPtr -> std::shared_ptr for CompilerInvocationBase and …
dwblaikie Jan 5, 2017
d2dd7ec
Fix examples for recent shared_ptrification
dwblaikie Jan 5, 2017
f5be8a0
Remove the ppc insertword/extractword expected fail tests.
Jan 5, 2017
0aa0570
Add missing "original call argument has same type as deduced paramete…
zygoloid Jan 5, 2017
41fdaf8
Fix bug where types other than 'cv auto', 'cv auto &', and 'cv auto &…
zygoloid Jan 5, 2017
a6e549d
shared_ptrify (from InclusiveRefCntPtr) HeaderSearchOptions
dwblaikie Jan 6, 2017
9b9db7f
CodeGen: address post commit review comments for r291123
compnerd Jan 6, 2017
95ab339
Constify UsingPackDecl::getInstantiatedFromUsingDecl(), NFC.
yrnkrn Jan 6, 2017
da684cc
[ObjC] The declarator for a block literal should be a definition
hyp Jan 6, 2017
fb284a0
[CodeCompletion] Block property setters: Use dynamic priority heuristic
hyp Jan 6, 2017
5f335c7
[ubsan] Minimize size of data for type_mismatch (Redo of D19667)
filcab Jan 6, 2017
6e36bc2
[OpenCL] Re-enable supported core extensions based on opencl version …
kzhuravl Jan 6, 2017
471e0b2
Revert "IntrusiveRefCntPtr -> std::shared_ptr for CompilerInvocationB…
dwblaikie Jan 6, 2017
95fe8f8
Revert "Fix examples for recent shared_ptrification"
dwblaikie Jan 6, 2017
6ad4377
Make ASTContext::getDeclAlign return the correct alignment for
ahatanaka Jan 6, 2017
91d69c3
[CUDA] Add a host target triple to cuda-version-check.cu
rnk Jan 6, 2017
1c63251
[OpenMP] fix typo - the standalone 'distribute' pragma should be 'tea…
kkwli Jan 6, 2017
8dc751f
Clean up redundant isa<T> before getAs<T>. NFC.
gburgessiv Jan 6, 2017
e781b71
Reapply "IntrusiveRefCntPtr -> std::shared_ptr for CompilerInvocation…
dwblaikie Jan 6, 2017
d362589
Use CodegenOpts::less when creating a TargetMachine for clang `-O1`
joker-eph Jan 6, 2017
26313ca
Revisit PR10177: don't instantiate a variable if it's only referenced…
zygoloid Jan 6, 2017
eb51731
Add a cc1 option to force disabling lifetime-markers emission from clang
joker-eph Jan 6, 2017
2d274ea
[ThinLTO] Optionally ignore empty index file
teresajohnson Jan 6, 2017
337babf
[ThinLTO] Specify target triple in new test
teresajohnson Jan 7, 2017
8ea4b56
PR23135: Don't instantiate constexpr functions referenced in unevalua…
zygoloid Jan 7, 2017
1e7cc03
PR20090: Add (passing) test from this bug; it's been fixed for a while.
zygoloid Jan 7, 2017
8c96c95
Consistently use a ConstantEvaluated context for expressions in attri…
zygoloid Jan 7, 2017
651f23f
Fix buildbots.
zygoloid Jan 7, 2017
f8d2115
PR18402: work around bug in libstdc++4.8's detection of whether ::get…
zygoloid Jan 8, 2017
2a3dc33
Fix tests with CLANG_DEFAULT_LINKER
Jan 8, 2017
81f1ca9
[cxx1z-constexpr-lambda] Make conversion function constexpr, and teac…
faisalv Jan 8, 2017
d9fddb6
PR30305: Implement proposed DR resolution to prevent slicing via inhe…
zygoloid Jan 8, 2017
64f15d6
PR31514: Add recursive self-instantiation check during template argument
zygoloid Jan 8, 2017
3a07c87
Use the correct ObjC EH personality
d0k Jan 8, 2017
c900a4b
[index] Introduce SymbolSubKind for reporting language-specific details.
akyrtzi Jan 8, 2017
f3bc0e6
Implement C++ DR1391 (wg21.link/cwg1391)
zygoloid Jan 9, 2017
87fca9c
Fix test for targets whose preferred spelling for an 8-byte int is 'l…
zygoloid Jan 9, 2017
4711e17
Revert r291410 and r291411.
zygoloid Jan 9, 2017
25f75c4
[cxx1z-constexpr-lambda] Implement constant evaluation of non-capturi…
faisalv Jan 9, 2017
5a6ff0d
Add the diagnose_if attribute to clang.
gburgessiv Jan 9, 2017
1538c57
Add release notes for `diagnose_if`
gburgessiv Jan 9, 2017
dd6177c
Implement DR1388 (wg21.link/cwg1388).
zygoloid Jan 9, 2017
7937c28
Implement C++ DR1391 (wg21.link/cwg1391)
zygoloid Jan 9, 2017
1381765
clang-format: [JS] ASI after imports
mprobst Jan 9, 2017
08205c8
clang-format: [JS] fix broken test.
mprobst Jan 9, 2017
0560207
[analyzer] Add checker for iterators dereferenced beyond their range.
Xazax-hun Jan 9, 2017
5450c95
clang-format: Improve support for override/final as variable names.
djasper-gh Jan 9, 2017
cf7bcc3
Extend NetBSD/AArch64 to cover Big Endian as well.
jsonn Jan 9, 2017
50b589a
Use the same ABI logic for AArch64 Big Endian as in other places
jsonn Jan 9, 2017
ddb8d27
[cxx1z-constexpr-lambda] [NFC] Add a FIXME to reinstate certain restr…
faisalv Jan 9, 2017
f0e69d8
[MS] Fix function type mangling of default ctor closures
rnk Jan 9, 2017
7820b29
[clang] Enable using --section-ordering-file option of ld.gold
alexander-shaposhnikov Jan 9, 2017
966fedc
Follow up to r291448: use isStructorDecl in one more place
rnk Jan 9, 2017
f912c0c
Split dllexport default constructor closure tests out into a separate…
rnk Jan 9, 2017
0982ba0
[MS] Mark default args of exported default constructors as used
rnk Jan 9, 2017
c24cbe9
[Lit Test] Make tests C++11 compatible - nothrow destructors
Jan 9, 2017
da676ad
PCH: fix a regression that reports a module is defined in both pch an…
manman-ren Jan 9, 2017
266cb72
[Frontend] Correct values of ATOMIC_*_LOCK_FREE to match builtin
mgorny Jan 9, 2017
fb15aef
Allow constexpr construction of subobjects unconditionally, not just …
dlj-NaN Jan 9, 2017
265da68
PR31587: Fix handling of __FUNCSIG__ in C.
zygoloid Jan 9, 2017
0d1b93e
MSVC seems to use (void) in __FUNCSIG__ for a zero-parameter function…
zygoloid Jan 9, 2017
9a6a1cb
Fixing test to work when the compiler defaults to a different C++ sta…
dyung Jan 9, 2017
7490caa
Add a test for diagnose_if.
gburgessiv Jan 9, 2017
e0078e5
[cmake] Obtain LLVM_CMAKE_PATH from llvm-config
mgorny Jan 9, 2017
b625445
Check that template template arguments match template template parame…
zygoloid Jan 9, 2017
4c19d05
[coroutines] Sema: Allow co_return all by itself.
GorNishanov Jan 10, 2017
3be02d1
[NFC] Rename RAII ExpressionEvaluationContext variable from Unevaluat…
faisalv Jan 10, 2017
f20949c
Don't classify variable template names as type templates.
zygoloid Jan 10, 2017
59a0544
[OpenMP] Support the 'is_device_ptr' clause with 'target parallel for…
kkwli Jan 10, 2017
b8a7fd7
[OpenMP] Support the 'is_device_ptr' clause with 'target parallel for…
kkwli Jan 10, 2017
f8beebd
AMD family 17h (znver1) enablement
topperc Jan 10, 2017
84bfee6
[X86] Add recent CPU strings to some of the tests that check other cp…
topperc Jan 10, 2017
2bc6921
Fix rejects-valid with default member initializers exposed by r291318.
zygoloid Jan 10, 2017
54f39e1
Remove fixme, use ASTContext::getCanonicalTemplateSpecializationType.
vgvassilev Jan 10, 2017
a41b647
[Sema] Avoid -Wshadow warning when a "redefinition of " error is pres…
hyp Jan 10, 2017
f6a92cc
[OpenMP] Basic support for a parallel directive in a target region on…
arpith-jacob Jan 10, 2017
96e79e3
[AArch64] Use generic bitreverse intrinsic, rather than AArch64 speci…
Jan 10, 2017
2b6d6f1
CGDecl: Skip static variable initializers in unreachable code
MatzeB Jan 10, 2017
69518aa
[OpenMP] Sema and parsing for 'target teams distribute simd’ pragma
kkwli Jan 10, 2017
e18cc41
[analyzer] Treat pointers to static member functions as function poin…
devincoughlin Jan 10, 2017
0d9e23a
[ARM] Use generic bitreverse intrinsic, rather than ARM specific rbit.
Jan 10, 2017
e4ffc9c
[OpenMP] Remove outdated comments. NFC.
kkwli Jan 10, 2017
770a04d
Fix conversion index / argument index mismatch when diagnosing overlo…
zygoloid Jan 10, 2017
19a05b4
Don't try to check implicit conversion sequences for an object argume…
zygoloid Jan 10, 2017
be15c6a
[Driver] Add openSuse AArch64 Triple
Jan 10, 2017
2930caf
Serialize the UsesSEH bit on FunctionDecl
rnk Jan 10, 2017
8033f18
Remove a couple of parameters that are always false.
zygoloid Jan 10, 2017
646ead8
Remove dead code.
zygoloid Jan 10, 2017
d3062fa
Module: Do not create Implicit ImportDecl for module X if we
manman-ren Jan 11, 2017
0fd8210
[analyzer] Fix crash in body farm for getter without implicit self.
devincoughlin Jan 11, 2017
c899dcd
[Modules] Support #import when entering files with modules
bcardosolopes Jan 11, 2017
5db0676
Remove repeated word in comment (NFC)
pepsiman Jan 11, 2017
464502e
Unbreak the clang-fuzzer build after r291184.
d0k Jan 11, 2017
1fcc440
This reverts r291628. As suggested by Richard, we can simply
manman-ren Jan 11, 2017
40f6a72
Module: Do not add any link flags when an implementation TU of a modu…
manman-ren Jan 11, 2017
231cda6
[index] Add 'contained-by' relation between references and their lexi…
akyrtzi Jan 11, 2017
c67dd13
[PowerPC] Fix the wrong implementation of builtin vec_rlnm.
Jan 11, 2017
8293248
[index] Add 'IBTypeOf' relation for ObjC methods marked with IBAction…
akyrtzi Jan 11, 2017
4cb2297
[index] Ignore invalid ObjC categories.
akyrtzi Jan 11, 2017
4a19ab5
[index] Introduce symbol subkinds to mark an accessor getter or setter.
akyrtzi Jan 11, 2017
5ceef6b
Remove redundant passing around of a "ContainsAutoType" flag.
zygoloid Jan 12, 2017
de0c61b
PR31469: Don't add friend template class decls to redecl chain in dep…
vgvassilev Jan 12, 2017
335c7a0
[analyzer] Avoid a crash in DereferenceChecker on string literal init…
haoNoQ Jan 12, 2017
485363a
Avoid multiple -Wunreachable-code diagnostics that are triggered by
hyp Jan 12, 2017
4d6ad36
Tracking exception specification source locations
pepsiman Jan 12, 2017
ae40636
Pass -fprofile-sample-use to lto backends.
danielcdh Jan 12, 2017
2f233c1
Revert r291774 which caused buildbot failure.
danielcdh Jan 12, 2017
271b0e8
[Docs][OpenCL] Added OpenCL feature description to Clang documentation.
Jan 12, 2017
bff998a
[analyzer] Don't dereference the array value when binding it to a ref…
haoNoQ Jan 12, 2017
ae27323
UsersManual.rst: Update clang-cl options list
zmodem Jan 12, 2017
ddf8ad1
[Modules] Fix misleading warning about missing textual header in umbr…
bcardosolopes Jan 12, 2017
2d28523
UsersManual.rst: Update clang-cl options list again
zmodem Jan 12, 2017
3840cfc
clang-format: Treat braced lists like other complex parameters.
djasper-gh Jan 12, 2017
6535a57
Add additional testcases for nsw markings on ++ and --.
Jan 12, 2017
49db389
clang-format: Fix regression introduced by r291801.
djasper-gh Jan 12, 2017
dc25d53
Add entry for -MJ.
jsonn Jan 12, 2017
51551f0
Creating release_40 branch off revision 291814
zmodem Jan 12, 2017
f2cf07d
Generate docs/AttributeReference.rst
zmodem Jan 12, 2017
05f0bce
ReleaseNotes: remove 'if you're reading on trunk' warning
zmodem Jan 12, 2017
8af7b13
Merging r291850 and r291853:
zmodem Jan 12, 2017
e63b0f2
Merging r291865:
zmodem Jan 13, 2017
959137d
Merging r291871:
zmodem Jan 13, 2017
0e2702f
Merging r291877:
zmodem Jan 13, 2017
2227088
Merging r291907:
zmodem Jan 13, 2017
77e5388
Merging r291881:
zmodem Jan 13, 2017
a5eaae1
Merging r291879:
zmodem Jan 13, 2017
0ff2de3
Merging r291964:
zmodem Jan 13, 2017
ad08994
Mention Devirtualization and ThinLTO in ReleaseNotes
prazek Jan 15, 2017
b71ee54
Add -fstrict-vtable-pointers to UsersManual
prazek Jan 16, 2017
933c061
Regenerate AttributeReference.rst
zmodem Jan 17, 2017
f73370b
Fix docs build
zmodem Jan 17, 2017
bd78a8a
Fix -fstrict-vtable-pointers link
zmodem Jan 17, 2017
4e35e74
Merging r292265:
zmodem Jan 17, 2017
ed73853
Make the -fstrict-vtable-pointers link relative
zmodem Jan 17, 2017
8396c5b
Merging r292032:
zmodem Jan 18, 2017
1f645f8
Merging r292052:
zmodem Jan 18, 2017
4077c4b
Merging r292183:
zmodem Jan 18, 2017
3a631d5
Merging r292247:
zmodem Jan 18, 2017
d339a88
Merge remote-tracking branch 'upstream/release_40'
Jan 19, 2017
579d400
Merge branch 'llvm-4.0' of https://github.com/dylanmckay/emscripten-f…
kripken Jan 24, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert r291410 and r291411.
The test-suite bots are still failing even after r291410's fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291412 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
zygoloid committed Jan 9, 2017
commit 4711e1718192744efb5fc85d65621450cdcfa919
68 changes: 23 additions & 45 deletions include/clang/Sema/Overload.h
Original file line number Diff line number Diff line change
Expand Up @@ -531,13 +531,6 @@ namespace clang {
Ambiguous.construct();
}

void setAsIdentityConversion(QualType T) {
setStandard();
Standard.setAsIdentityConversion();
Standard.setFromType(T);
Standard.setAllToTypes(T);
}

/// \brief Whether the target is really a std::initializer_list, and the
/// sequence only represents the worst element conversion.
bool isStdInitializerListElement() const {
Expand Down Expand Up @@ -614,11 +607,6 @@ namespace clang {
ovl_fail_inhctor_slice,
};

/// A list of implicit conversion sequences for the arguments of an
/// OverloadCandidate.
typedef llvm::MutableArrayRef<ImplicitConversionSequence>
ConversionSequenceList;

/// OverloadCandidate - A single candidate in an overload set (C++ 13.3).
struct OverloadCandidate {
/// Function - The actual function that this candidate
Expand All @@ -643,13 +631,18 @@ namespace clang {
/// is a surrogate, but only if IsSurrogate is true.
CXXConversionDecl *Surrogate;

/// The conversion sequences used to convert the function arguments
/// to the function parameters.
ConversionSequenceList Conversions;
/// Conversions - The conversion sequences used to convert the
/// function arguments to the function parameters, the pointer points to a
/// fixed size array with NumConversions elements. The memory is owned by
/// the OverloadCandidateSet.
ImplicitConversionSequence *Conversions;

/// The FixIt hints which can be used to fix the Bad candidate.
ConversionFixItGenerator Fix;

/// NumConversions - The number of elements in the Conversions array.
unsigned NumConversions;

/// Viable - True to indicate that this overload candidate is viable.
bool Viable;

Expand Down Expand Up @@ -688,9 +681,9 @@ namespace clang {
/// hasAmbiguousConversion - Returns whether this overload
/// candidate requires an ambiguous conversion or not.
bool hasAmbiguousConversion() const {
for (auto &C : Conversions) {
if (!C.isInitialized()) return false;
if (C.isAmbiguous()) return true;
for (unsigned i = 0, e = NumConversions; i != e; ++i) {
if (!Conversions[i].isInitialized()) return false;
if (Conversions[i].isAmbiguous()) return true;
}
return false;
}
Expand Down Expand Up @@ -739,7 +732,7 @@ namespace clang {
SmallVector<OverloadCandidate, 16> Candidates;
llvm::SmallPtrSet<Decl *, 16> Functions;

// Allocator for ConversionSequenceLists. We store the first few
// Allocator for OverloadCandidate::Conversions. We store the first few
// elements inline to avoid allocation for small sets.
llvm::BumpPtrAllocator ConversionSequenceAllocator;

Expand Down Expand Up @@ -780,45 +773,30 @@ namespace clang {
size_t size() const { return Candidates.size(); }
bool empty() const { return Candidates.empty(); }

/// \brief Allocate storage for conversion sequences for NumConversions
/// conversions.
ConversionSequenceList
allocateConversionSequences(unsigned NumConversions) {
ImplicitConversionSequence *Conversions;
/// \brief Add a new candidate with NumConversions conversion sequence slots
/// to the overload set.
OverloadCandidate &addCandidate(unsigned NumConversions = 0) {
Candidates.push_back(OverloadCandidate());
OverloadCandidate &C = Candidates.back();

// Assign space from the inline array if there are enough free slots
// available.
if (NumConversions + NumInlineSequences <= 16) {
ImplicitConversionSequence *I =
(ImplicitConversionSequence *)InlineSpace.buffer;
Conversions = &I[NumInlineSequences];
C.Conversions = &I[NumInlineSequences];
NumInlineSequences += NumConversions;
} else {
// Otherwise get memory from the allocator.
Conversions =
ConversionSequenceAllocator.Allocate<ImplicitConversionSequence>(
NumConversions);
C.Conversions = ConversionSequenceAllocator
.Allocate<ImplicitConversionSequence>(NumConversions);
}

// Construct the new objects.
for (unsigned I = 0; I != NumConversions; ++I)
new (&Conversions[I]) ImplicitConversionSequence();

return ConversionSequenceList(Conversions, NumConversions);
}

/// \brief Add a new candidate with NumConversions conversion sequence slots
/// to the overload set.
OverloadCandidate &addCandidate(unsigned NumConversions = 0,
ConversionSequenceList Conversions = None) {
assert((Conversions.empty() || Conversions.size() == NumConversions) &&
"preallocated conversion sequence has wrong length");
for (unsigned i = 0; i != NumConversions; ++i)
new (&C.Conversions[i]) ImplicitConversionSequence();

Candidates.push_back(OverloadCandidate());
OverloadCandidate &C = Candidates.back();
C.Conversions = Conversions.empty()
? allocateConversionSequences(NumConversions)
: Conversions;
C.NumConversions = NumConversions;
return C;
}

Expand Down
50 changes: 18 additions & 32 deletions include/clang/Sema/Sema.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ namespace clang {
class FunctionProtoType;
class FunctionTemplateDecl;
class ImplicitConversionSequence;
typedef MutableArrayRef<ImplicitConversionSequence> ConversionSequenceList;
class InitListExpr;
class InitializationKind;
class InitializationSequence;
Expand Down Expand Up @@ -2519,11 +2518,10 @@ class Sema {
void AddOverloadCandidate(FunctionDecl *Function,
DeclAccessPair FoundDecl,
ArrayRef<Expr *> Args,
OverloadCandidateSet &CandidateSet,
OverloadCandidateSet& CandidateSet,
bool SuppressUserConversions = false,
bool PartialOverloading = false,
bool AllowExplicit = false,
ConversionSequenceList EarlyConversions = None);
bool AllowExplicit = false);
void AddFunctionCandidates(const UnresolvedSetImpl &Functions,
ArrayRef<Expr *> Args,
OverloadCandidateSet &CandidateSet,
Expand All @@ -2543,8 +2541,7 @@ class Sema {
ArrayRef<Expr *> Args,
OverloadCandidateSet& CandidateSet,
bool SuppressUserConversions = false,
bool PartialOverloading = false,
ConversionSequenceList EarlyConversions = None);
bool PartialOverloading = false);
void AddMethodTemplateCandidate(FunctionTemplateDecl *MethodTmpl,
DeclAccessPair FoundDecl,
CXXRecordDecl *ActingContext,
Expand All @@ -2562,16 +2559,6 @@ class Sema {
OverloadCandidateSet& CandidateSet,
bool SuppressUserConversions = false,
bool PartialOverloading = false);
bool CheckNonDependentConversions(FunctionTemplateDecl *FunctionTemplate,
ArrayRef<QualType> ParamTypes,
ArrayRef<Expr *> Args,
OverloadCandidateSet &CandidateSet,
ConversionSequenceList &Conversions,
bool SuppressUserConversions,
CXXRecordDecl *ActingContext = nullptr,
QualType ObjectType = QualType(),
Expr::Classification
ObjectClassification = {});
void AddConversionCandidate(CXXConversionDecl *Conversion,
DeclAccessPair FoundDecl,
CXXRecordDecl *ActingContext,
Expand Down Expand Up @@ -6604,8 +6591,6 @@ class Sema {
/// \brief The explicitly-specified template arguments were not valid
/// template arguments for the given template.
TDK_InvalidExplicitArguments,
/// \brief Checking non-dependent argument conversions failed.
TDK_NonDependentConversionFailure,
/// \brief Deduction failed; that's all we know.
TDK_MiscellaneousDeductionFailure,
/// \brief CUDA Target attributes do not match.
Expand Down Expand Up @@ -6644,21 +6629,22 @@ class Sema {
QualType OriginalArgType;
};

TemplateDeductionResult FinishTemplateArgumentDeduction(
FunctionTemplateDecl *FunctionTemplate,
SmallVectorImpl<DeducedTemplateArgument> &Deduced,
unsigned NumExplicitlySpecified, FunctionDecl *&Specialization,
sema::TemplateDeductionInfo &Info,
SmallVectorImpl<OriginalCallArg> const *OriginalCallArgs = nullptr,
bool PartialOverloading = false,
llvm::function_ref<bool()> CheckNonDependent = []{ return false; });
TemplateDeductionResult
FinishTemplateArgumentDeduction(FunctionTemplateDecl *FunctionTemplate,
SmallVectorImpl<DeducedTemplateArgument> &Deduced,
unsigned NumExplicitlySpecified,
FunctionDecl *&Specialization,
sema::TemplateDeductionInfo &Info,
SmallVectorImpl<OriginalCallArg> const *OriginalCallArgs = nullptr,
bool PartialOverloading = false);

TemplateDeductionResult DeduceTemplateArguments(
FunctionTemplateDecl *FunctionTemplate,
TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef<Expr *> Args,
FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info,
bool PartialOverloading,
llvm::function_ref<bool(ArrayRef<QualType>)> CheckNonDependent);
TemplateDeductionResult
DeduceTemplateArguments(FunctionTemplateDecl *FunctionTemplate,
TemplateArgumentListInfo *ExplicitTemplateArgs,
ArrayRef<Expr *> Args,
FunctionDecl *&Specialization,
sema::TemplateDeductionInfo &Info,
bool PartialOverloading = false);

TemplateDeductionResult
DeduceTemplateArguments(FunctionTemplateDecl *FunctionTemplate,
Expand Down
Loading