summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused diagnostic. NFC.Benjamin Kramer2017-08-021-2/+0
| | | | llvm-svn: 309888
* Update for llvm change.Rafael Espindola2017-08-022-3/+2
| | | | llvm-svn: 309885
* [UBSan] Provide default blacklist filename for UBSanHan Shen2017-08-021-0/+2
| | | | | | | | | | | | | | | | | Summary: This is to provide a default blacklist filename for UBSan. While UBSan is turned on, it's better that clang pick up a blacklist file (when exists), just as what ASan / MSan does, so we do not end up adding the "-fsanitize-blacklist" option to every command line. Reviewers: chandlerc, echristo, vsk, eugenis Reviewed By: vsk, eugenis Subscribers: vsk, eugenis, echristo, cfe-commits Differential Revision: https://reviews.llvm.org/D35849 llvm-svn: 309873
* [docs] Remove accidental unindent to appease the sphinx botVedant Kumar2017-08-021-4/+4
| | | | | | | Bot failure: http://lab.llvm.org:8011/builders/clang-sphinx-docs/builds/12043/steps/docs-clang-html/logs/stdio llvm-svn: 309852
* [ubsan] Have -fsanitize=vptr emit a null check if -fsanitize=null isn't ↵Vedant Kumar2017-08-029-40/+29
| | | | | | | | | | | | | | | | | | available In r309007, I made -fsanitize=null a hard prerequisite for -fsanitize=vptr. I did not see the need for the two checks to have separate null checking logic for the same pointer. I expected the two checks to either always be enabled together, or to be mutually compatible. In the mailing list discussion re: r309007 it became clear that that isn't the case. If a codebase is -fsanitize=vptr clean but not -fsanitize=null clean, it's useful to have -fsanitize=vptr emit its own null check. That's what this patch does: with it, -fsanitize=vptr can be used without -fsanitize=null. Differential Revision: https://reviews.llvm.org/D36112 llvm-svn: 309846
* Define _GNU_SOURCE for RTEMS c++Walter Lee2017-08-022-0/+3
| | | | | | | | | | | | Summary: This is required by the libc++ locale support. Reviewers: jyknight Subscribers: fedor.sergeev Differential Revision: https://reviews.llvm.org/D36121 llvm-svn: 309815
* [rename] NFC, extract symbol canonicalization logic into functionAlex Lorenz2017-08-022-7/+25
| | | | | | This function will be used by the clang-refactor's rename actions llvm-svn: 309813
* Unify and simplify the behavior of the hasDeclaration matcher.Manuel Klimek2017-08-026-68/+212
| | | | | | | | | | | | | | | | | | | | | | | | | Originally, we weren't able to match on Type nodes themselves (only QualType), so the hasDeclaration matcher was initially written to give what we thought are reasonable results for QualType matches. When we chagned the matchers to allow matching on Type nodes, it turned out that the hasDeclaration matcher was by chance written templated enough to now allow hasDeclaration to also match on (some) Type nodes. This patch change the hasDeclaration matcher to: a) work the same on Type and QualType nodes, b) be completely explicit about what nodes we can match instead of just allowing anything with a getDecl() to match, c) explicitly control desugaring only one level in very specific instances. d) adds hasSpecializedTemplate and tagType matchers to allow migrating existing use cases that now need more explicit matchers Note: This patch breaks clang-tools-extra. The corresponding patch there is approved and will land in a subsequent patch. Differential Revision: https://reviews.llvm.org/D27104 llvm-svn: 309809
* [StaticAnalyzer] Fix false positives for unreachable code in macros.Daniel Marjamaki2017-08-022-1/+11
| | | | | | | | | | | | | Example: #define MACRO(C) if (C) { static int x; .. } void foo() { MACRO(0); } Differential Revision: https://reviews.llvm.org/D36141 llvm-svn: 309799
* Use VFS operations in FileManager::makeAbsolutePath.Ilya Biryukov2017-08-022-1/+28
| | | | | | | | | | | | | | Summary: It used to call into llvm::sys::fs::make_absolute. Reviewers: akyrtzi, erikjv, bkramer, krasimir, klimek Reviewed By: klimek Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D36155 llvm-svn: 309795
* [Bash-autocompletion] Add comment to test so that it is easier to fixYuka Takahashi2017-08-021-0/+4
| | | | | | | | | | | | | | | | Summary: clang/test/Driver/autocomplete.c is a test for --autocomplete, and this test might break if people add/modify flags or HelpText. So I've add comment for future developers so that they can fix this file according to the change they had made. Reviewers: v.g.vassilev, teemperor, ruiu Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D36209 llvm-svn: 309794
* [CMake] Include llvm-objcopy tool in Fuchsia toolchainPetr Hosek2017-08-021-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D36194 llvm-svn: 309786
* [Driver] Disable static C++ library support on FuchsiaPetr Hosek2017-08-023-10/+6
| | | | | | | | Don't support or build static C++ libraries for Fuchsia. Differential Revision: https://reviews.llvm.org/D36202 llvm-svn: 309778
* [Headers][Darwin] Allow #include_next<float.h> to work on Darwin prior to 10.7Bruno Cardoso Lopes2017-08-011-0/+9
| | | | | | | | | This fixes PR31504 and it's a follow up from adding #include_next<float.h> for Darwin in r289018. rdar://problem/29856682 llvm-svn: 309752
* [clang] Change the condition of unnecessary packed warningYan Wang2017-08-012-21/+98
| | | | | | | | | | | | | | | | | | | | Summary: Change the condition of this unnecessary packed warning. The packed is unnecessary when 1. the alignment of the struct/class won't alter. 2. the size is unchanged. 3. the offset of each field is the same. Remove all field-level warning. Reviewers: chh, akyrtzi, rtrieu Reviewed By: chh Subscribers: rsmith, srhines, cfe-commits, xazax.hun Differential Revision: https://reviews.llvm.org/D34114 llvm-svn: 309750
* Fix creating bitcasts with wrong address spaceMatt Arsenault2017-08-011-2/+4
| | | | | | | | In a future commit AMDGPU will start passing aggregates directly to more functions, triggering asserts in test/CodeGenOpenCL/addr-space-struct-arg.cl llvm-svn: 309741
* [clang-diff] Renames, NFCJohannes Altmanninger2017-08-012-96/+94
| | | | llvm-svn: 309738
* [clang-diff] Move data declarations to the public headerJohannes Altmanninger2017-08-013-165/+157
| | | | llvm-svn: 309737
* Revert "Thread Safety Analysis: fix assert_capability."Josh Gao2017-08-014-32/+5
| | | | | | | | This reverts commit rL309725. Broke test/Sema/attr-capabilities.c. llvm-svn: 309731
* Thread Safety Analysis: fix assert_capability.Josh Gao2017-08-014-5/+32
| | | | | | | | | | | | | | | | Summary: Previously, the assert_capability attribute was completely ignored by thread safety analysis. Reviewers: delesley, rnk Reviewed By: delesley Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D36122 llvm-svn: 309725
* [CMake] Include sancov tool in Fuchsia toolchainPetr Hosek2017-08-011-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D35930 llvm-svn: 309724
* [Sema] Fix lax conversion between non ext vectorsBruno Cardoso Lopes2017-08-012-1/+9
| | | | | | | | | | r282968 introduced a regression due to the lack of proper testing. Re-add lax conversion support between non ext vectors for compound assignments and add a test for that. rdar://problem/28639467 llvm-svn: 309722
* clang-format: [JS] no whitespace between typeof operator and l_paren.Martin Probst2017-08-013-2/+5
| | | | llvm-svn: 309713
* clang-format: [JS] prefer wrapping chains over empty literals.Martin Probst2017-08-012-0/+12
| | | | | | | | | | | | | | | | | | | | | Summary: E.g. don't wrap like this: (foo.bar.baz).and.bam(Blah.of({ })) But rather: (foo.bar.baz) .and.bam(Blah.of({})) Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D36139 llvm-svn: 309712
* clang-format: [JS] whitespace between keywords and parenthesized expressions.Martin Probst2017-08-012-0/+12
| | | | | | | | | | | | Summary: `throw (...)` should have a whitespace following it, as do await and void. Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D36146 llvm-svn: 309710
* clang-format: [JS] handle union types in arrow functions.Martin Probst2017-08-012-0/+4
| | | | | | | | | | | | Summary: clang-format would previously fail to detect that an arrow functions parameter block is not an expression, and thus insert whitespace around the `|` and `&` type operators in it. Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D36147 llvm-svn: 309707
* clang-format: [JS] consistenly format enums.Martin Probst2017-08-012-1/+11
| | | | | | | | | | | | Summary: Previously, const enums would get formatted differently because the modifier was not recognized. Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D36144 llvm-svn: 309703
* clang-format: [JS] support default imports.Martin Probst2017-08-012-2/+10
| | | | | | | | | | | | Summary: Formerly, `import {default as X} from y;` would not be recognized as an import. Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D36132 llvm-svn: 309697
* clang-format: [JS] handle object types in extends positions.Martin Probst2017-08-013-1/+24
| | | | | | | | | | | | | | | | | Summary: clang-format would previously drop the whitespace after `extends` in code such as: class Foo extends {} {} Where the first set of curly braces is an inline object literal type. Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D36131 llvm-svn: 309695
* [Tooling] Add LLVM_NODISCARD to Replacements::mergeKrasimir Georgiev2017-08-011-1/+1
| | | | | | | | | | | | | | | | Summary: This patch adds LLVM_NODISCARD to Replacements::merge. I've hit this several times already. Reviewers: ioeric Reviewed By: ioeric Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D36149 llvm-svn: 309689
* [OpenCL] Add missing subgroup builtinsJoey Gouly2017-08-015-2/+92
| | | | | | | This adds get_kernel_max_sub_group_size_for_ndrange and get_kernel_sub_group_count_for_ndrange. llvm-svn: 309678
* [x86][inline-asm]Allow a pack of Control Debug to be properly pickedCoby Tayree2017-08-012-0/+14
| | | | | | | | Allows the incorporation of legit (x86) Debug Regs within inline asm stataements Differential Revision: https://reviews.llvm.org/D36074 llvm-svn: 309672
* [ASTMatchers] Allow forField to match indirect fields.Malcolm Parsons2017-08-012-3/+7
| | | | | | | | This is needed for PR32966. Reviewed by alexfh. llvm-svn: 309667
* Use -target instead of -arch in test case.Akira Hatanaka2017-07-311-1/+1
| | | | llvm-svn: 309640
* Silence warning -Wmissing-sysroot.Akira Hatanaka2017-07-311-1/+1
| | | | llvm-svn: 309636
* Re-apply r309622 with a fix for MSVC.Peter Collingbourne2017-07-312-5/+19
| | | | | | Patch by Vlad Tsyrklevich! llvm-svn: 309635
* [Driver] Make sure the deployment target is earlier than iOS 11 whenAkira Hatanaka2017-07-312-23/+25
| | | | | | | | | | it is inferred from -isysroot. This fixes a change that was inadvertently introduced in r309607. rdar://problem/32230613 llvm-svn: 309633
* Move RTEMS to OSTargets.hWalter Lee2017-07-312-34/+34
| | | | | | Differential Revision: https://reviews.llvm.org/D36106 llvm-svn: 309626
* Revert r309622, "Fix logic for generating llvm.type.test()s"Peter Collingbourne2017-07-312-19/+5
| | | | | | | Caused a bot test failure: http://bb.pgr.jp/builders/test-clang-msc-x64-on-i686-linux-RA/builds/5325 llvm-svn: 309624
* Fix logic for generating llvm.type.test()sPeter Collingbourne2017-07-312-5/+19
| | | | | | | | | | | | | | CodeGenFunction::EmitTypeMetadataCodeForVCall() could output an llvm.assume(llvm.type.test())when CFI was enabled, optimizing out the vcall check. This case was only reached when: 1) CFI-vcall was enabled, 2) -fwhole-program-tables was specified, and 3) -fno-sanitize-trap=cfi-vcall was specified. Patch by Vlad Tsyrklevich! Differential Revision: https://reviews.llvm.org/D36013 llvm-svn: 309622
* [Attr] Make TargetWindows and TargetMicrosoftCXXABI match on aarch64 as wellMartin Storsjo2017-07-312-2/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D36100 llvm-svn: 309620
* [AArch64] Don't define __LP64__ when targeting WindowsMartin Storsjo2017-07-312-2/+165
| | | | | | | | | Windows/ARM64 is a LLP64 environment, so don't set this default define. Differential Revision: https://reviews.llvm.org/D36098 llvm-svn: 309619
* [test] Fix mistagged CHECK-NOT-lines for AARCH64-DARWIN in Preprocessor/init.cMartin Storsjo2017-07-311-3/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D36099 llvm-svn: 309618
* [X86] Remove -O3 from tbm-builtins.c test file.Craig Topper2017-07-311-49/+47
| | | | | | A change to InstCombine broke this test, but we generally frown on running optimizations clang tests anyway. So I've updated the checks to not depend on optimizations anymore. llvm-svn: 309616
* [Driver] Allow users to silence the warning that is issued when theAkira Hatanaka2017-07-314-11/+21
| | | | | | | | | | deployment target is earlier than iOS 11 and the target is 32-bit. This is a follow-up to r306922. rdar://problem/32230613 llvm-svn: 309607
* [Targets] Move addCygMingDefines into the arch-independent Targets.cpp (NFC)Martin Storsjo2017-07-313-24/+28
| | | | | | | | | | | | This fixes a dependency inconsistency, where addMinGWDefines in Targets.cpp (used from other architectures than X86) called the addCygMingDefines function in X86.h. This was inconsistently split in SVN r308791 (D35701). Differential Revision: https://reviews.llvm.org/D36072 llvm-svn: 309598
* [OPENMP] Change the name of outer non-debug function in debug mode, NFC.Alexey Bataev2017-07-311-2/+4
| | | | llvm-svn: 309575
* [OpenCL] Enable subgroup extension in testsJoey Gouly2017-07-312-2/+2
| | | | | | | This fixes the test, so that it can be run on different hosts that may have different OpenCL extensions enabled. llvm-svn: 309571
* Fix -Wshadow false positives with function-local classes.Alexander Kornienko2017-07-312-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fixes http://llvm.org/PR33947. https://godbolt.org/g/54XRMT void f(int a) { struct A { void g(int a) {} A() { int a; } }; } 3 : <source>:3:16: warning: declaration shadows a local variable [-Wshadow] void g(int a) {} ^ 1 : <source>:1:12: note: previous declaration is here void f(int a) { ^ 4 : <source>:4:15: warning: declaration shadows a local variable [-Wshadow] A() { int a; } ^ 1 : <source>:1:12: note: previous declaration is here void f(int a) { ^ 2 warnings generated. The local variable `a` of the function `f` can't be accessed from a method of the function-local class A, thus no shadowing occurs and no diagnostic is needed. Reviewers: rnk, rsmith, arphaman, Quuxplusone Reviewed By: rnk, Quuxplusone Subscribers: Quuxplusone, cfe-commits Differential Revision: https://reviews.llvm.org/D35941 llvm-svn: 309569
* [OpenCL] Add extension Sema check for subgroup builtinsJoey Gouly2017-07-314-2/+29
| | | | | | Check the subgroup extension is enabled, before doing other Sema checks. llvm-svn: 309567
OpenPOWER on IntegriCloud