summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* [modules ts] Do not emit strong function definitions from the module ↵Richard Smith2017-07-061-2/+12
| | | | | | interface unit in every user. llvm-svn: 307232
* Fix test case in pre-C++11 mode; address Aaron Ballman's code review.Douglas Gregor2017-07-051-2/+2
| | | | llvm-svn: 307202
* Cope with Range-v3's CONCEPT_REQUIRES idiomDouglas Gregor2017-07-051-0/+34
| | | | llvm-svn: 307197
* Customize the SFINAE diagnostics for enable_if to provide the failed condition.Douglas Gregor2017-07-052-7/+140
| | | | | | | | | | | | | | | | | | | | 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
* [Sema] Don't allow -Wunguarded-availability to be silenced with redeclsErik Pilkington2017-07-053-104/+114
| | | | | | Differential revision: https://reviews.llvm.org/D33816 llvm-svn: 307175
* Address comments that escaped D33333Erich Keane2017-07-051-7/+12
| | | | | | | | 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-051-3/+3
| | | | llvm-svn: 307143
* Fix invalid warnings for header guards in preamblesErik Verbruggen2017-07-054-7/+5
| | | | | | | | 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-054-35/+67
| | | | | | | | | | 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-051-6/+14
| | | | | | Differential Revision: https://reviews.llvm.org/D34995 llvm-svn: 307121
* [modules ts] Declarations from a module interface unit are only visible outsideRichard Smith2017-07-055-19/+60
| | | | | | 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-041-10/+18
| | | | | | | | | | 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-042-1/+25
| | | | | | | | | | | | | | | | | | | | 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-041-0/+2
| | | | | | | | class template specialization rdar://33122110 llvm-svn: 307074
* [OpenCL] Rename err_opencl_enqueue_kernel_expected_typeJoey Gouly2017-07-041-15/+18
| | | | | | | | | 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-041-3/+7
| | | | | | | 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-041-6/+61
| | | | | | | | | | | | 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-031-24/+70
| | | | | | | | | | | | | | | | | | | | | | | | | 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-031-5/+1
| | | | | | This reverts commit 71d3b5cd916106005ef23467e3f6c7fbca7bc499. llvm-svn: 307034
* [clang-format] Support text proto messagesKrasimir Georgiev2017-07-035-29/+85
| | | | | | | | | | | | | | 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-031-1/+5
| | | | | | | | | | | | | | | | | 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-031-1/+25
| | | | | | | | property references rdar://32375673 llvm-svn: 307016
* Add a fixit for -Wobjc-protocol-property-synthesisAlex Lorenz2017-07-032-5/+11
| | | | | | | | rdar://32132756 Differential Revision: https://reviews.llvm.org/D34886 llvm-svn: 307014
* fix trivial typos in comments; NFCHiroshi Inoue2017-07-034-4/+4
| | | | llvm-svn: 307007
* fix trivial typos in comments; NFCHiroshi Inoue2017-07-022-3/+3
| | | | llvm-svn: 306969
* Add an option group for deprecated warnings. Add the removedJoerg Sonnenberger2017-07-011-0/+6
| | | | | | | | | | -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-012-5/+3
| | | | | | | | | | 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
* [OpenMP] Fix mapping of scalars for combined directivesJonas Hahnfeld2017-07-011-3/+26
| | | | | | | | | | | | | | | | 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-013-8/+4
| | | | | | | | | | 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-013-6/+21
| | | | | | | | 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-013-21/+6
| | | | | | | Summary: The commit caused a documentation breakage. llvm-svn: 306946
* [Driver] Add -fdiagnostics-hotness-thresholdBrian Gesiak2017-07-013-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | 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-011-3/+1
| | | | | | use subtarget feature rather than command line option. llvm-svn: 306928
* [ODRHash] Revert r305104 - Skip inline namespaces when hashing.Richard Trieu2017-07-012-19/+13
| | | | | | 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-011-2/+26
| | | | | | | | | | | | | | | | | | | | | 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-015-25/+164
| | | | | | | | | | | | | | | | | | | | | | 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-011-1/+3
| | | | | | | | | | | | | | | 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
* Fix PR 33189: Clang assertion on template destructor declarationHubert Tong2017-06-301-4/+1
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch aims to fix the bug reported at https://bugs.llvm.org/show_bug.cgi?id=33189. Clang hits an assertion when a template destructor declaration is present. This is caused by later processing that does not expect to encounter a template when looking at a destructor. The resolution is to treat the destructor as being not declared when later processing is interested in the properties of the destructor of a class. Reviewers: rcraik, hubert.reinterpretcast, aaron.ballman, rsmith Reviewed By: rsmith Subscribers: rsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D33833 Patch by Kuang He! llvm-svn: 306905
* [ODRHash] Support Type TemplateArgumentRichard Trieu2017-06-301-0/+3
| | | | llvm-svn: 306904
* Reinstate "Load lazily the template specialization in multi-module setups."Vassil Vassilev2017-06-301-38/+47
| | | | | | | | It was reverted in r305460 but the issue appears to only break our self-host libcxx modules bot. Reapplying it will give us a chance to get a reproducer and fix the issue. llvm-svn: 306903
* [Parse] Use normalized attr name for late-parsing checks.George Burgess IV2017-06-301-8/+8
| | | | llvm-svn: 306899
* [Profile] Do not assign counters to functions without bodiesVedant Kumar2017-06-301-0/+3
| | | | | | | | | The root cause of the issues reported in D32406 and D34680 is that clang instruments functions without bodies. Make it stop doing that, and also teach it how to use old (incorrectly generated) profiles without crashing. llvm-svn: 306883
OpenPOWER on IntegriCloud