- Nov 17, 2018
-
-
David L. Jones authored
llvm-svn: 347133
-
Stephane Moore authored
[clang-tidy/checks] Implement a clang-tidy check to verify Google Objective-C function naming conventions
📜 Summary: §1 Description This check finds function names in function declarations in Objective-C files that do not follow the naming pattern described in the Google Objective-C Style Guide. Function names should be in UpperCamelCase and functions that are not of static storage class should have an appropriate prefix as described in the Google Objective-C Style Guide. The function `main` is a notable exception. Function declarations in expansions in system headers are ignored. Example conforming function definitions: ``` static bool IsPositive(int i) { return i > 0; } static bool ABIsPositive(int i) { return i > 0; } bool ABIsNegative(int i) { return i < 0; } ``` A fixit hint is generated for functions of static storage class but otherwise the check does not generate a fixit hint because an appropriate prefix for the function cannot be determined. §2 Test Notes * Verified clang-tidy tests pass successfully. * Used check_clang_tidy.py to verify expected output of processing google-objc-function-naming.m Reviewers: benhamilton, hokein, Wizard, aaron.ballman Reviewed By: benhamilton Subscribers: Eugene.Zelenko, mgorny, xazax.hun, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D51575 llvm-svn: 347132 -
Craig Topper authored
llvm-svn: 347131
-
Craig Topper authored
[X86] Add test cases to show incorrect use of a 512 bit vector in v32i8 multiply lowering with prefer-vector-width=256. On the min-legal-vector-width test this actually causes some of the v32i16 operations we emitted to be scalarized. llvm-svn: 347130
-
Nico Weber authored
See "GN build roundtable summary; adding GN build files to the repo" on llvm-dev and cfe-dev for discussion. In particular, this build is completely unsupported. People adding new files to LLVM are not expected to update the GN build files, and reviewers are not supposed to request the gn build files to be updated. This adds just enough to be able to build llvm/lib/Demangle. It requires using a monorepo. This adds a few build config options you can set in args.gn (`gn args out/foo --list` for all): - is_debug = true to enable debug builds (defaults to release) - llvm_enable_assertions to toggle assertions (defaults to true) - clang_base_path, if set an absolute path to a locally-built clang to be used as host compiler Differential Revision: https://reviews.llvm.org/D54345 llvm-svn: 347128
-
Craig Topper authored
llvm-svn: 347127
-
Fangrui Song authored
llvm-svn: 347126
-
Adrian Prantl authored
llvm-svn: 347125
-
Adrian Prantl authored
llvm-svn: 347124
-
Fangrui Song authored
[llvm-objcopy] Use llvm::all_of and rename the variables "Segment" to avoid confusion with the type of the same name llvm-svn: 347123
-
Jason Molenda authored
llvm-svn: 347122
-
Kostya Serebryany authored
llvm-svn: 347121
-
Adrian Prantl authored
llvm-svn: 347120
-
Marc-Andre Laperle authored
Summary: More specifically, hovering on "auto" in auto main() -> int { return 0; } Signed-off-by:Marc-Andre Laperle <malaperle@gmail.com> Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D54553 llvm-svn: 347119
-
Kostya Serebryany authored
[hwasan] make the heap-buffer-overflow.c test more robust and re-enable it. With malloc_align_right the relative offsets of heap chunks are less predictable to simply don't test for them. llvm-svn: 347118
-
Frederic Riss authored
Different versions of Xcode have different outputs for the simctl command llvm-svn: 347117
-
Kostya Serebryany authored
Summary: With free_checks_tail_magic=1 (default) HWASAN writes magic bytes to the tail of every heap allocation (last bytes of the last granule, if the last granule is not fully used) and checks these bytes on free(). This feature will detect buffer overwires within the last granule at the time of free(). This is an alternative to malloc_align_right=[1289] that should have fewer compatibility issues. It is also weaker since it doesn't detect read overflows and reports bugs at free() instead of at access. Reviewers: eugenis Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D54656 llvm-svn: 347116
-
Stanislav Mekhanoshin authored
Tests really needs target arch to be specified. llvm-svn: 347115
-
Zachary Turner authored
llvm-svn: 347114
-
James Y Knight authored
llvm-svn: 347113
-
Stanislav Mekhanoshin authored
Comments in llc outputs are printed differently on different platforms, some with '#', some with '##'. Removed non-essential part of the checks. llvm-svn: 347112
-
Reid Kleckner authored
llvm-svn: 347111
-
Stanislav Mekhanoshin authored
Differential Revision: https://reviews.llvm.org/D54646 llvm-svn: 347110
-
Frederic Riss authored
Those tests were using pexpect and being flaky on some of ours bots. This patch reimplmeents the tests usinf FileCheck, and it also extends the test coverage to a few more stop-hook options. llvm-svn: 347109
-
Petr Hosek authored
When cross-compiling the second stage to a different target, we need to make sure that the first-stage compiler can produce binaries for that target. Using lld and llvm-objcopy as the default linker and objcopy tool eliminates some of the dependencies on the host toolchain. Differential Revision: https://reviews.llvm.org/D54655 llvm-svn: 347108
-
Kostya Serebryany authored
llvm-svn: 347107
-
Kamil Rytarowski authored
_Unwind_Ptr is unknown on some targets. Detected on green-dragon-21 (MacPro Late 2013 | OS X 10.14(18A391) | Xcode 10.1(10B61)). llvm-svn: 347106
-
Craig Topper authored
[X86] Add custom promotion of narrow fp_to_uint/fp_to_sint operations under -x86-experimental-vector-widening-legalization. This tries to force the result type to vXi32 followed by a truncate. This can help avoid scalarization that would otherwise occur. There's some annoying examples of an avx512 truncate instruction followed by a packus where we should really be able to just use one truncate. But overall this is still a net improvement. llvm-svn: 347105
-
Adrian Prantl authored
llvm-svn: 347104
-
James Y Knight authored
Also, support modifications to toplevel files in git (which need to be committed to "monorepo-root" in svn). Differential Revision: https://reviews.llvm.org/D54341 llvm-svn: 347103
-
Kamil Rytarowski authored
This modification is require for NetBSD with GCC, as there is a custom unwind.h header implementation with different types. No functional change intended for others. Cherry-picked chunk from D33878. llvm-svn: 347102
-
Kamil Rytarowski authored
This modification is require for NetBSD with GCC, as there is a custom unwind.h header implementation with different types. No functional change intended for others. Cherry-picked chunk from D33878. llvm-svn: 347101
-
Craig Topper authored
[X86] Qualify part of the masked gather handling in ReplaceNodeResults with a getTypeAction call to know if we can use default legalization. If we managed to switch to -x86-experimental-vector-widening-legalization this block can be removed. llvm-svn: 347100
-
Vitaly Buka authored
llvm-svn: 347099
-
Sam Clegg authored
In one case probably you have be using it, in the other it looks like it was redundant. Differential Revision: https://reviews.llvm.org/D54644 llvm-svn: 347098
-
Fedor Sergeev authored
We need to control exponential behavior of loop-unswitch so we do not get run-away compilation. Suggested solution is to introduce a multiplier for an unswitch cost that makes cost prohibitive as soon as there are too many candidates and too many sibling loops (meaning we have already started duplicating loops by unswitching). It does solve the currently known problem with compile-time degradation (PR 39544). Tests are built on top of a recently implemented CHECK-COUNT-<num> FileCheck directives. Reviewed By: chandlerc, mkazantsev Differential Revision: https://reviews.llvm.org/D54223 llvm-svn: 347097
-
Alexey Bataev authored
If lambda is used inside of the OpenMP region and captures `this`, we should recapture it in the OpenMP region also. But we should do this only if the OpenMP region is used in the context of the same class, just like the lambda. llvm-svn: 347096
-
Craig Topper authored
We should be able to use getExtendInVec with or without sse4.1 to produce a SIGN_EXTEND_VECTOR_INREG. llvm-svn: 347095
-
Craig Topper authored
[LegalizeVectorOps] After custom legalizing an extending load or a truncating store, make sure the custom code is also legal. For example, on X86 we emit a sign_extend_vector_inreg from LowerLoad and without sse4.1 this node will need further legalization. Previously this sign_extend_vector_inreg was being custom lowered during DAG legalization instead of vector op legalization. Unfortunately, this doesn't seem to matter for the output of any existing lit tests. llvm-svn: 347094
-