aboutsummaryrefslogtreecommitdiff
path: root/clang
AgeCommit message (Collapse)AuthorFilesLines
2017-07-07[ObjC] Avoid the -Wunguarded-availability warnings for protocolAlex Lorenz4-6/+39
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-07Update Cross-DSO CFI documentation.Evgeniy Stepanov1-14/+28
Reviewers: pcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35094 llvm-svn: 307341
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-06Change remaining references to lit.util.capture to use subprocess.check_output.David L. Jones2-4/+5
Summary: The capture() function was removed in r306625. This should fix PGO breakages reported by Michael Zolotukhin. Reviewers: mzolotukhin Subscribers: sanjoy, llvm-commits Differential Revision: https://reviews.llvm.org/D35088 llvm-svn: 307320
2017-07-06Reject attempts to build a module without -fmodules, rather than silently ↵Richard Smith6-11/+30
doing weird things. llvm-svn: 307316
2017-07-06Allow CompilerInvocations to generate .d files.Sterling Augustine4-7/+35
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 Grang2-4/+50
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 Meijer10-2348/+363
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 Bercea19-33/+75
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 TextProto language name, NFCKrasimir Georgiev1-0/+2
llvm-svn: 307264
2017-07-06[clang-format] Add space between a message field key and the opening bracket ↵Krasimir Georgiev3-47/+48
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[OpenCL] Test on image access modifiers and image type can only be a type of ↵Egor Churaev1-5/+28
a function argument. Reviewers: Anastasia Reviewed By: Anastasia Subscribers: yaxunl, cfe-commits, bader Differential Revision: https://reviews.llvm.org/D34980 llvm-svn: 307238
2017-07-06[modules ts] Do not emit strong function definitions from the module ↵Richard Smith4-2/+102
interface unit in every user. llvm-svn: 307232
2017-07-06[cxx_status] Update link to Modules TS to latest working draft. Fix ↵Richard Smith1-2/+3
Coroutines TS flag to work if copy-pasted. llvm-svn: 307231
2017-07-05Fix test case in pre-C++11 mode; address Aaron Ballman's code review.Douglas Gregor2-3/+3
llvm-svn: 307202
2017-07-05Fix one more reference to lit.util.capture()Michael Zolotukhin2-2/+4
The capture method was removed in r306643. llvm-svn: 307201
2017-07-05Cope with Range-v3's CONCEPT_REQUIRES idiomDouglas Gregor2-0/+60
llvm-svn: 307197
2017-07-05Customize the SFINAE diagnostics for enable_if to provide the failed condition.Douglas Gregor7-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
2017-07-05Add docs for -foptimization-record-file=Brian Gesiak1-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
2017-07-05[Sema] Don't allow -Wunguarded-availability to be silenced with redeclsErik Pilkington13-148/+220
Differential revision: https://reviews.llvm.org/D33816 llvm-svn: 307175
2017-07-05Address comments that escaped D33333Erich Keane4-60/+62
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 Kornienko2-6/+6
llvm-svn: 307143
2017-07-05Fix invalid warnings for header guards in preamblesErik Verbruggen5-12/+9
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 Smith6-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
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 Liu8-40/+167
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 Smith12-23/+134
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 Liu2-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
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 Probst3-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
2017-07-04[index] Index nested name qualifiers in a forward declaration of aAlex Lorenz2-0/+18
class template specialization rdar://33122110 llvm-svn: 307074
2017-07-04[OpenCL] Rename err_opencl_enqueue_kernel_expected_typeJoey Gouly3-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
2017-07-04[CodeGen] Check key function for typeinfo importShoaib Meenai2-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
2017-07-04[Sema] Make BreakContinueFinder handle nested loops.Eli Friedman3-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
2017-07-03[clang] Implement -Wcast-qual for C++Roman Lebedev4-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
2017-07-03Revert "clang-format: [JS] space between pseudo keywords and template literals."Martin Probst2-6/+1
This reverts commit 71d3b5cd916106005ef23467e3f6c7fbca7bc499. llvm-svn: 307034
2017-07-03[clang-format] Support text proto messagesKrasimir Georgiev8-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
2017-07-03clang-format: [JS] space between pseudo keywords and template literals.Martin Probst2-1/+6
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 Lorenz2-1/+50
property references rdar://32375673 llvm-svn: 307016
2017-07-03Add a fixit for -Wobjc-protocol-property-synthesisAlex Lorenz8-12/+35
rdar://32132756 Differential Revision: https://reviews.llvm.org/D34886 llvm-svn: 307014
2017-07-03fix trivial typos in comments; NFCHiroshi Inoue6-6/+6
llvm-svn: 307007
2017-07-02fix trivial typos in comments; NFCHiroshi Inoue3-4/+4
llvm-svn: 306969
2017-07-01Add an option group for deprecated warnings. Add the removedJoerg Sonnenberger5-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
2017-07-01[modules] Teach clang how to merge typedef over anonymous structs in C mode.Vassil Vassilev3-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
2017-07-01[Bash-autocompletion] Add support for older bash version.Yuka Takahashi1-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