aboutsummaryrefslogtreecommitdiff
path: root/clang/lib
AgeCommit message (Collapse)AuthorFilesLines
2017-07-07[ObjC] Avoid the -Wunguarded-availability warnings for protocolAlex Lorenz2-4/+12
requirements in protocol/class/category declarations The unguarded availability warnings in the protocol requirements of a protocol /class/category declaration can be avoided. This matches the behaviour of Swift's diagnostics. The warnings for deprecated/unavailable protocols are preserved. rdar://33156429 Differential Revision: https://reviews.llvm.org/D35061 llvm-svn: 307368
2017-07-06This call-site should have been updated as part of D34304.Sterling Augustine1-3/+5
Summary: Use an argument adjuster to preserve behavior inadvertantly changed by D34304. Reviewers: klimek Differential Revision: https://reviews.llvm.org/D35095 llvm-svn: 307329
2017-07-06Reject attempts to build a module without -fmodules, rather than silently ↵Richard Smith1-0/+10
doing weird things. llvm-svn: 307316
2017-07-06Allow CompilerInvocations to generate .d files.Sterling Augustine2-6/+27
Summary: Most clang tools should ignore the -M family of options because one wouldn't want them to generate a new dependency (.d) file. However, some tools may want this dependency file. This patch creates a mechanism for them to do this. This implementation just plumbs a boolean down several layers of calls. Each of the modified calls has several call sites, and so a single member variable or new API entry point won't work. An alternative would be to write a function to filter the -M family of arguments out of CC1Args, and have each caller call that function by hand before calling newInvocation, Invocation::run, or buildAstFromCodeWithArgs. This is a more complicated and error-prone solution. Why burden all the callers to remember to use this function? But I could rewrite this patch to use that method if that is deemed more appropriate. Reviewers: klimek Reviewed By: klimek Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D34304 llvm-svn: 307315
2017-07-06 [Objective-C] Fix non-determinism in clangMandeep Singh Grang1-4/+5
Summary: Iteration of the unordered Ivars causes objc-modern-metadata-visibility.mm (uncovered by reverse iterating SmallPtrSet). Reviewers: dblaikie, davide, rsmith Reviewed By: dblaikie Subscribers: cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D34860 llvm-svn: 307296
2017-07-06This reverts r305820 (ARMv.2-A FP16 vector intrinsics) because it showsSjoerd Meijer4-182/+7
problems in testing, see comments in D34161 for some more details. A fix is in progres in D35011, but a revert seems better now as the fix will probably take some more time to land. llvm-svn: 307277
2017-07-06[OpenMP] Extend CLANG target options with device offloading kind.Gheorghe-Teodor Bercea18-32/+73
Summary: Pass the type of the device offloading when building the tool chain for a particular target architecture. This is required when supporting multiple tool chains that target a single device type. In our particular use case, the OpenMP and CUDA tool chains will use the same ```addClangTargetOptions ``` method. This enables the reuse of common options and ensures control over options only supported by a particular tool chain. Reviewers: arpith-jacob, caomhin, carlo.bertolli, ABataev, jlebar, hfinkel, tstellar, Hahnfeld Reviewed By: hfinkel Subscribers: jgravelle-google, aheejin, rengolin, jfb, dschuff, sbc100, cfe-commits Differential Revision: https://reviews.llvm.org/D29647 llvm-svn: 307272
2017-07-06[OpenMP] Customize CUDA-based tool chain selectionGheorghe-Teodor Bercea1-2/+16
Summary: This patch provides a generic way of selecting CUDA based tool chains as host-device pairs. Reviewers: arpith-jacob, caomhin, carlo.bertolli, ABataev, Hahnfeld, jlebar, hfinkel, tstellar Reviewed By: Hahnfeld Subscribers: rengolin, cfe-commits Differential Revision: https://reviews.llvm.org/D29658 llvm-svn: 307271
2017-07-06[clang-format] Add space between a message field key and the opening bracket ↵Krasimir Georgiev1-0/+2
in proto messages Summary: This patch updates the formatting of message fields of type `a{...}` to `a {...}` for proto messages. Reviewers: djasper Reviewed By: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D35015 llvm-svn: 307261
2017-07-06[modules ts] Do not emit strong function definitions from the module ↵Richard Smith1-2/+12
interface unit in every user. llvm-svn: 307232
2017-07-05Fix test case in pre-C++11 mode; address Aaron Ballman's code review.Douglas Gregor1-2/+2
llvm-svn: 307202
2017-07-05Cope with Range-v3's CONCEPT_REQUIRES idiomDouglas Gregor1-0/+34
llvm-svn: 307197
2017-07-05Customize the SFINAE diagnostics for enable_if to provide the failed condition.Douglas Gregor2-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
2017-07-05[Sema] Don't allow -Wunguarded-availability to be silenced with redeclsErik Pilkington3-104/+114
Differential revision: https://reviews.llvm.org/D33816 llvm-svn: 307175
2017-07-05Address comments that escaped D33333Erich Keane1-7/+12
Patch By: Jen Yu Differential Revision:https://reviews.llvm.org/D34671 llvm-svn: 307172
2017-07-05[SystemZ] Simplify handling of ISA revisionsUlrich Weigand1-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
2017-07-05[driver][mips] Use AddTargetFeature to check arguments and add feature ↵Simon Atanasyan1-7/+2
flags. NFC llvm-svn: 307152
2017-07-05[driver][mips] Remove redundant curly brackets. NFCSimon Atanasyan1-3/+2
llvm-svn: 307151
2017-07-05[clang-format] Fix an uninitialized memory accessKrasimir Georgiev1-7/+9
llvm-svn: 307147
2017-07-05Add const to reference arguments of Diagnostic ctorAlexander Kornienko1-3/+3
llvm-svn: 307143
2017-07-05Fix invalid warnings for header guards in preamblesErik Verbruggen4-7/+5
Fixes https://bugs.llvm.org/show_bug.cgi?id=33574 Differential Revision: https://reviews.llvm.org/D34882 llvm-svn: 307134
2017-07-05[modules ts] Improve merging of module-private declarations.Richard Smith4-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
2017-07-05fix trivial typos in comments; NFCHiroshi Inoue2-3/+3
llvm-svn: 307123
2017-07-05[AMDGPU] Fix size and alignment of size_t and pointer typesYaxun Liu1-6/+14
Differential Revision: https://reviews.llvm.org/D34995 llvm-svn: 307121
2017-07-05[modules ts] Declarations from a module interface unit are only visible outsideRichard Smith5-19/+60
the module if declared in an export block. llvm-svn: 307115
2017-07-04[AMDGPU] Fix regressions on mesa/clover with libclc due to address spaceYaxun Liu1-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
2017-07-04Enable LLVM asan support for NetBSD/amd64Kamil Rytarowski3-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
2017-07-04clang-format: [JS] space between pseudo keywords and template literals.Martin Probst2-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
2017-07-04[index] Index nested name qualifiers in a forward declaration of aAlex Lorenz1-0/+2
class template specialization rdar://33122110 llvm-svn: 307074
2017-07-04[OpenCL] Rename err_opencl_enqueue_kernel_expected_typeJoey Gouly1-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
2017-07-04[CodeGen] Check key function for typeinfo importShoaib Meenai1-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
2017-07-04[Sema] Make BreakContinueFinder handle nested loops.Eli Friedman1-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
2017-07-03[clang] Implement -Wcast-qual for C++Roman Lebedev1-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
2017-07-03Revert "clang-format: [JS] space between pseudo keywords and template literals."Martin Probst1-5/+1
This reverts commit 71d3b5cd916106005ef23467e3f6c7fbca7bc499. llvm-svn: 307034
2017-07-03[clang-format] Support text proto messagesKrasimir Georgiev5-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
2017-07-03clang-format: [JS] space between pseudo keywords and template literals.Martin Probst1-1/+5
Summary: Before: yield`foo`; After: yield `foo`; Reviewers: djasper Subscribers: klimek Differential Revision: https://reviews.llvm.org/D34938 llvm-svn: 307023
2017-07-03[index] Remove 'implicit' role for message sends in implicit ObjCAlex Lorenz1-1/+25
property references rdar://32375673 llvm-svn: 307016
2017-07-03Add a fixit for -Wobjc-protocol-property-synthesisAlex Lorenz2-5/+11
rdar://32132756 Differential Revision: https://reviews.llvm.org/D34886 llvm-svn: 307014
2017-07-03fix trivial typos in comments; NFCHiroshi Inoue4-4/+4
llvm-svn: 307007
2017-07-02fix trivial typos in comments; NFCHiroshi Inoue2-3/+3
llvm-svn: 306969
2017-07-01Add an option group for deprecated warnings. Add the removedJoerg Sonnenberger1-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
2017-07-01[modules] Teach clang how to merge typedef over anonymous structs in C mode.Vassil Vassilev2-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
2017-07-01[OpenMP] Fix mapping of scalars for combined directivesJonas Hahnfeld1-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
2017-07-01fix trivial typos; NFCHiroshi Inoue5-5/+5
llvm-svn: 306954
2017-07-01Changed Opts.EABIVersion type string to llvm::EABI enum classYuka Takahashi3-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
2017-07-01Un-revert "[Driver] Add -fdiagnostics-hotness-threshold"Brian Gesiak3-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
2017-07-01Revert "[Driver] Add -fdiagnostics-hotness-threshold"Brian Gesiak3-21/+6
Summary: The commit caused a documentation breakage. llvm-svn: 306946
2017-07-01[Driver] Add -fdiagnostics-hotness-thresholdBrian Gesiak3-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
2017-07-01Fix indentation.Akira Hatanaka1-7/+7
This is an attempt to fix a failing bot: http://lab.llvm.org:8011/builders/ubuntu-gcc7.1-werror llvm-svn: 306944
2017-07-01Update clang support for -mexecute-only/-mpure-code for backend change to ↵Eric Christopher1-3/+1
use subtarget feature rather than command line option. llvm-svn: 306928