summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [modules ts] Do not emit strong function definitions from the module ↵Richard Smith2017-07-064-2/+102
| | | | | | interface unit in every user. llvm-svn: 307232
* [cxx_status] Update link to Modules TS to latest working draft. Fix ↵Richard Smith2017-07-061-2/+3
| | | | | | Coroutines TS flag to work if copy-pasted. llvm-svn: 307231
* Fix test case in pre-C++11 mode; address Aaron Ballman's code review.Douglas Gregor2017-07-052-3/+3
| | | | llvm-svn: 307202
* Fix one more reference to lit.util.capture()Michael Zolotukhin2017-07-052-2/+4
| | | | | | The capture method was removed in r306643. llvm-svn: 307201
* Cope with Range-v3's CONCEPT_REQUIRES idiomDouglas Gregor2017-07-052-0/+60
| | | | llvm-svn: 307197
* Customize the SFINAE diagnostics for enable_if to provide the failed condition.Douglas Gregor2017-07-057-12/+165
| | | | | | | | | | | | | | | | | | | | When enable_if disables a particular overload resolution candidate, rummage through the enable_if condition to find the specific condition that caused the failure. For example, if we have something like: template< typename Iter, typename = std::enable_if_t<Random_access_iterator<Iter> && Comparable<Iterator_value_type<Iter>>>> void mysort(Iter first, Iter last) {} and we call "mysort" with "std::list<int>" iterators, we'll get a diagnostic saying that the "Random_access_iterator<Iter>" requirement failed. If we call "mysort" with "std::vector<something_not_comparable>", we'll get a diagnostic saying that the "Comparable<...>" requirement failed. llvm-svn: 307196
* Add docs for -foptimization-record-file=Brian Gesiak2017-07-051-0/+13
| | | | | | | | | | | | | | Summary: The Clang option was previously not included in the User's Manual. Reviewers: anemet, davidxl, hfinkel Reviewed By: hfinkel Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D34928 llvm-svn: 307193
* [Sema] Don't allow -Wunguarded-availability to be silenced with redeclsErik Pilkington2017-07-0513-148/+220
| | | | | | Differential revision: https://reviews.llvm.org/D33816 llvm-svn: 307175
* Address comments that escaped D33333Erich Keane2017-07-054-60/+62
| | | | | | | | Patch By: Jen Yu Differential Revision:https://reviews.llvm.org/D34671 llvm-svn: 307172
* [SystemZ] Simplify handling of ISA revisionsUlrich Weigand2017-07-051-26/+22
| | | | | | | | | | This moves determination of the ISA revision from the CPU name to one single place, removing a bunch of duplicated code. It also makes the supported ISA revisions available as feature strings. No functional change. llvm-svn: 307156
* [driver][mips] Use AddTargetFeature to check arguments and add feature ↵Simon Atanasyan2017-07-051-7/+2
| | | | | | flags. NFC llvm-svn: 307152
* [driver][mips] Remove redundant curly brackets. NFCSimon Atanasyan2017-07-051-3/+2
| | | | llvm-svn: 307151
* [clang-format] Fix an uninitialized memory accessKrasimir Georgiev2017-07-051-7/+9
| | | | llvm-svn: 307147
* Add const to reference arguments of Diagnostic ctorAlexander Kornienko2017-07-052-6/+6
| | | | llvm-svn: 307143
* Fix invalid warnings for header guards in preamblesErik Verbruggen2017-07-055-12/+9
| | | | | | | | Fixes https://bugs.llvm.org/show_bug.cgi?id=33574 Differential Revision: https://reviews.llvm.org/D34882 llvm-svn: 307134
* [modules ts] Improve merging of module-private declarations.Richard Smith2017-07-056-36/+101
| | | | | | | | | | These cases occur frequently for declarations in the global module (above the module-declaration) in a Modules TS module interface. When we merge a definition from another module into such a module-private definition, ensure that we transitively make everything lexically within that definition visible to that translation unit. llvm-svn: 307129
* fix trivial typos in comments; NFCHiroshi Inoue2017-07-052-3/+3
| | | | llvm-svn: 307123
* [AMDGPU] Fix size and alignment of size_t and pointer typesYaxun Liu2017-07-058-40/+167
| | | | | | Differential Revision: https://reviews.llvm.org/D34995 llvm-svn: 307121
* [modules ts] Declarations from a module interface unit are only visible outsideRichard Smith2017-07-0512-23/+134
| | | | | | the module if declared in an export block. llvm-svn: 307115
* [AMDGPU] Fix regressions on mesa/clover with libclc due to address spaceYaxun Liu2017-07-042-10/+20
| | | | | | | | | | Currently AMDGPUTargetInfo does not initialize AddrSpaceMap in constructor, which causes regressions in mesa/clover with libclc. This patch fixes that. Differential Revision: https://reviews.llvm.org/D34987 llvm-svn: 307105
* Enable LLVM asan support for NetBSD/amd64Kamil Rytarowski2017-07-043-0/+15
| | | | | | | | | | | | | | | | | | | | | | Summary: Enable LLVM asan sanitizer for NetBSD/amd64. Don't generate -ldl for dlopen(3)-like functions on NetBSD. These features are available in libc on NetBSD. Sponsored by <The NetBSD Foundation> Reviewers: joerg, eugenis, kcc, dim Reviewed By: dim Subscribers: #clang, #sanitizers Tags: #clang, #sanitizers Differential Revision: https://reviews.llvm.org/D34960 llvm-svn: 307104
* clang-format: [JS] space between pseudo keywords and template literals.Martin Probst2017-07-043-1/+26
| | | | | | | | | | | | | | | | | | | | Summary: Before: yield`foo`; After: yield `foo`; This reinstates commit 71d3b5cd91 / r307023 and fixes the logic by introducing an explicit table of JavaScript pseudo keywords. Reviewers: djasper Subscribers: klimek Differential Revision: https://reviews.llvm.org/D34953 llvm-svn: 307087
* [index] Index nested name qualifiers in a forward declaration of aAlex Lorenz2017-07-042-0/+18
| | | | | | | | class template specialization rdar://33122110 llvm-svn: 307074
* [OpenCL] Rename err_opencl_enqueue_kernel_expected_typeJoey Gouly2017-07-043-25/+29
| | | | | | | | | Rename err_opencl_enqueue_kernel_expected_type so that other builtins can use the same diagnostic. https://reviews.llvm.org/D34948 llvm-svn: 307067
* [CodeGen] Check key function for typeinfo importShoaib Meenai2017-07-042-5/+15
| | | | | | | If the imported class does not have a key function, we should emit its typeinfo locally instead of attempting to import it. llvm-svn: 307052
* [Sema] Make BreakContinueFinder handle nested loops.Eli Friedman2017-07-043-6/+121
| | | | | | | | | | | | We don't care about break or continue statements that aren't associated with the current loop, so make sure the visitor doesn't find them. Fixes https://bugs.llvm.org/show_bug.cgi?id=32648 . Differential Revision: https://reviews.llvm.org/D34568 llvm-svn: 307051
* [clang] Implement -Wcast-qual for C++Roman Lebedev2017-07-034-24/+244
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This way, the behavior of that warning flag more closely resembles that of GCC. Do note that there is at least one false-negative (see FIXME in tests). Fixes PR4802. Testing: ``` ninja check-clang-sema check-clang-semacxx ``` Reviewers: dblaikie, majnemer, rnk Reviewed By: dblaikie, rnk Subscribers: mclow.lists, cfe-commits, alexfh, rnk Differential Revision: https://reviews.llvm.org/D33102 llvm-svn: 307045
* Revert "clang-format: [JS] space between pseudo keywords and template literals."Martin Probst2017-07-032-6/+1
| | | | | | This reverts commit 71d3b5cd916106005ef23467e3f6c7fbca7bc499. llvm-svn: 307034
* [clang-format] Support text proto messagesKrasimir Georgiev2017-07-038-30/+341
| | | | | | | | | | | | | | Summary: This patch adds support for textual protocol buffer messages. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek, mgorny Differential Revision: https://reviews.llvm.org/D34441 llvm-svn: 307029
* clang-format: [JS] space between pseudo keywords and template literals.Martin Probst2017-07-032-1/+6
| | | | | | | | | | | | | | | | | Summary: Before: yield`foo`; After: yield `foo`; Reviewers: djasper Subscribers: klimek Differential Revision: https://reviews.llvm.org/D34938 llvm-svn: 307023
* [index] Remove 'implicit' role for message sends in implicit ObjCAlex Lorenz2017-07-032-1/+50
| | | | | | | | property references rdar://32375673 llvm-svn: 307016
* Add a fixit for -Wobjc-protocol-property-synthesisAlex Lorenz2017-07-038-12/+35
| | | | | | | | rdar://32132756 Differential Revision: https://reviews.llvm.org/D34886 llvm-svn: 307014
* fix trivial typos in comments; NFCHiroshi Inoue2017-07-036-6/+6
| | | | llvm-svn: 307007
* fix trivial typos in comments; NFCHiroshi Inoue2017-07-023-4/+4
| | | | llvm-svn: 306969
* Add an option group for deprecated warnings. Add the removedJoerg Sonnenberger2017-07-015-0/+32
| | | | | | | | | | -fslp-vectorize-aggressive and -fno-slp-vectorize-aggressive flags back under this group and test for the warning. Document the future removal in the ReleaseNotes. Differential Revision: https://reviews.llvm.org/D34926 llvm-svn: 306965
* [modules] Teach clang how to merge typedef over anonymous structs in C mode.Vassil Vassilev2017-07-013-6/+4
| | | | | | | | | | In C mode clang fails to merge the textually included definition with the one imported from a module. The C lookup rules fail to find the imported definition because its linkage is internal in non C++ mode. This patch reinstates some of the ODR merging rules for typedefs of anonymous tags for languages other than C++. Patch by Raphael Isemann and me (D34510). llvm-svn: 306964
* [Bash-autocompletion] Add support for older bash version.Yuka Takahashi2017-07-011-7/+25
| | | | | | | | | | | | | | Summary: OS X seems to use older bash version which doesn't suport _init_completion and compopt, so add support for this. Reviewers: ruiu, v.g.vassilev, teemperor Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D34924 llvm-svn: 306962
* [Bash-completion] Fixed a bug that ~ doesn't expanded to $HOMEYuka Takahashi2017-07-011-1/+3
| | | | | | | | Summary: `~/build/bin/clang -f[tab]` was executed without ~ expanded to $HOME, so changed this by expanding ~ to path using eval. Differential Revision: https://reviews.llvm.org/D34925 llvm-svn: 306957
* [OpenMP] Fix mapping of scalars for combined directivesJonas Hahnfeld2017-07-012-3/+52
| | | | | | | | | | | | | | | | Combined directives like 'target parallel' have two captured statements. Sema has to check the right one from the right direction. Previously, Sema::IsOpenMPCapturedByRef would return false for mapped scalars on combined directives. This results in a wrong signature of the outlined function which triggers an assertion: void llvm::CallInst::init(llvm::FunctionType *, llvm::Value *, ArrayRef<llvm::Value *>, ArrayRef<OperandBundleDef>, const llvm::Twine &): Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!"' failed. Fixes PR30975 (and PR31985). New function was taken from clang-ykt. Differential Revision: https://reviews.llvm.org/D34888 llvm-svn: 306956
* fix trivial typos; NFCHiroshi Inoue2017-07-015-5/+5
| | | | llvm-svn: 306954
* Changed Opts.EABIVersion type string to llvm::EABI enum classYuka Takahashi2017-07-014-9/+6
| | | | | | | | | | Summary: Changed EABIVersion type from string to llvm::EABI. It seems it was just a typo and this is intended implementation. Differential Revision: https://reviews.llvm.org/D34595 llvm-svn: 306953
* Un-revert "[Driver] Add -fdiagnostics-hotness-threshold"Brian Gesiak2017-07-019-20/+80
| | | | | | | | Summary: Un-revert https://reviews.llvm.org/D34868, but with a slight tweak to the documentation to fix an error -- I had used the wrong syntax for a link. llvm-svn: 306948
* Revert "[Driver] Add -fdiagnostics-hotness-threshold"Brian Gesiak2017-07-019-80/+20
| | | | | | | Summary: The commit caused a documentation breakage. llvm-svn: 306946
* [Driver] Add -fdiagnostics-hotness-thresholdBrian Gesiak2017-07-019-20/+80
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Depends on https://reviews.llvm.org/D34867. Add a Clang frontend option to enable optimization remark hotness thresholds, which were added to LLVM in https://reviews.llvm.org/D34867. This prevents diagnostics that do not meet a minimum hotness threshold from being output. When generating optimization remarks for large codebases with a ton of cold code paths, this option can be used to limit the optimization remark output at a reasonable size. Discussion of this change can be read here: http://lists.llvm.org/pipermail/llvm-dev/2017-June/114377.html Reviewers: anemet, davidxl, hfinkel Reviewed By: anemet Subscribers: fhahn, cfe-commits Differential Revision: https://reviews.llvm.org/D34868 llvm-svn: 306945
* Fix indentation.Akira Hatanaka2017-07-011-7/+7
| | | | | | | | This is an attempt to fix a failing bot: http://lab.llvm.org:8011/builders/ubuntu-gcc7.1-werror llvm-svn: 306944
* Update clang support for -mexecute-only/-mpure-code for backend change to ↵Eric Christopher2017-07-013-75/+79
| | | | | | use subtarget feature rather than command line option. llvm-svn: 306928
* [ODRHash] Revert r305104 - Skip inline namespaces when hashing.Richard Trieu2017-07-013-19/+31
| | | | | | Test inline namespaces and handle them in the ODR hash again. llvm-svn: 306926
* [Driver] Check that the iOS deployment target is iOS 10 or earlier ifAkira Hatanaka2017-07-013-2/+64
| | | | | | | | | | | | | | | | | | | | | the target is 32-bit. The following changes are made to the driver since 32-bit apps do not run on iOS 11 or later: - If the deployment target is set explicitly, either with a command-line option or an environment variable, the driver should report an error if the version is greater than iOS 10. - In the case where the deployment target is not set explicitly and the default is inferred from the target triple or SDK version, it should use a maximum default of iOS 10.99.99. rdar://problem/32230613 Differential Revision: https://reviews.llvm.org/D34529 llvm-svn: 306922
* [Modules] Implement ODR-like semantics for tag types in C/ObjCBruno Cardoso Lopes2017-07-0115-53/+284
| | | | | | | | | | | | | | | | | | | | | | Allow ODR for ObjC/C in the sense that we won't keep more that one definition around (merge them). However, ensure the decl pass the structural compatibility check in C11 6.2.7/1, for that, reuse the structural equivalence checks used by the ASTImporter. Few other considerations: - Create error diagnostics for tag types mismatches and thread them into the structural equivalence checks. - Note that by doing this we only support redefinition between types that are considered "compatible types" by C. This is mixed approach of the suggestions discussed in http://lists.llvm.org/pipermail/cfe-dev/2017-March/053257.html Differential Revision: https://reviews.llvm.org/D31778 rdar://problem/31909368 llvm-svn: 306918
* Change enumerator default linkage type for CBruno Cardoso Lopes2017-07-014-3/+8
| | | | | | | | | | | | | | | Redeclaration lookup should never find hidden enumerators in C, because they do not have linkage (C11 6.2.2/6) The linkage of an enumerator should be VisibleNoLinkage, and isHiddenDeclarationVisible should be checking hasExternalFormalLinkage. This is was reviewed as part of D31778, but splitted into a different commit for clarity. rdar://problem/31909368 llvm-svn: 306917
OpenPOWER on IntegriCloud