aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-01-14[X86] Remove mask parameter from avx512 pmultishiftqb intrinsics. Use select ↵linaro-local/diana.picus/varargsCraig Topper
in IR instead. Fixes PR40259 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351036 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-14[X86] Remove mask parameter from vpshufbitqmb intrinsics. Change result to a ↵Craig Topper
vXi1 vector. We'll do the scalar<->vXi1 conversions with bitcasts in IR. Fixes PR40258 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351029 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-12NFC: Make utility privateStephen Kelly
No callers are external to the class anymore. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351015 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-12[ASTDump] NFC: Move dump of individual Stmts to TextNodeDumperStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55340 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351014 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-12Implement TemplateArgument dumping in terms of VisitorStephen Kelly
Summary: Split the output streaming from the traversal to other AST nodes. Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55491 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351012 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-12[ASTDump] Change parameter to StringRefStephen Kelly
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351011 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-12[analyzer] Fix unused variable warnings in Release buildsBenjamin Kramer
This was just an inlined version of isa<CXXConstructExpr>. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351007 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-12[NetBSD] Enable additional sanitizer typesMichal Gorny
Differential Revision: https://reviews.llvm.org/D56607 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351002 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-12NFC: Port loop to cxx_range_forStephen Kelly
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350984 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-11[analyzer] Support for OSObjects out parameters in RetainCountCheckerGeorge Karpenkov
rdar://46357478 rdar://47121327 Differential Revision: https://reviews.llvm.org/D56240 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350982 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-11[analyzer] Introduce a convenience method for getting a CallEvent from an ↵George Karpenkov
arbitrary Stmt Differential Revision: https://reviews.llvm.org/D56300 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350981 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-11[Darwin][Driver] Don't pass a file as object_path_lto during ThinLTOSteven Wu
Summary: After r327851, Driver::GetTemporaryPath will create the file rather than just create a potientially unqine filename. If clang driver pass the file as parameter as -object_path_lto, ld64 will pass it back to libLTO as GeneratedObjectsDirectory, which is going to cause a LLVM ERROR if it is not a directory. Now during thinLTO, pass a temp directory path to linker instread. rdar://problem/47194182 Reviewers: arphaman, dexonsmith Reviewed By: arphaman Subscribers: mehdi_amini, inglorion, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D56608 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350970 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-11Implement Attr dumping in terms of visitorsStephen Kelly
Remove now-vestigial dumpType and dumpBareDeclRef methods. The old tablegen generated code used to expect them to be present, but the new generated code has no such requirement. Reviewers: aaron.ballman Subscribers: mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D55492 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350958 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-11[ASTDump] Add utility for dumping a label with child nodesStephen Kelly
Summary: Use it to add optional label nodes to Stmt dumps. This preserves behavior of InitExprList dump: // CHECK-NEXT: `-InitListExpr {{.+}} <col:13, col:15> 'U [3]' // CHECK-NEXT: |-array_filler: InitListExpr {{.+}} <col:15> 'U' field Field {{.+}} 'i' 'int' // CHECK-NEXT: `-InitListExpr {{.+}} <col:14> 'U' field Field {{.+}} 'i' 'int' // CHECK-NEXT: `-IntegerLiteral {{.+}} <col:14> 'int' 1 Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55488 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350957 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-11[Bug 39548][Clang] PGO bootstrap fails with python3: errors in perf-helper.pySerge Guelton
Current clang fail to bootstrap in PGO mode when only python3 is available, because perf-helper.py is not compatible with python3. Commited on behalf of Romain Geissler. Differential Revision: https://reviews.llvm.org/D54071 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350955 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-11[test] Update support for Exynos M4 (NFC)Evandro Menezes
Update test cases for Exynos M4. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350954 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-11[MergeFunc] Update clang test for r350939Vedant Kumar
In r350939, the MergeFunc pass learned to erase duplicate functions which are discardable if unused. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350952 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-11[LTO] Add option to enable LTOUnit splitting, and disable unless neededTeresa Johnson
Summary: Adds a new -f[no]split-lto-unit flag that is disabled by default to control module splitting during ThinLTO. It is automatically enabled for -fsanitize=cfi and -fwhole-program-vtables. The new EnableSplitLTOUnit codegen flag is passed down to llvm via a new module flag of the same name. Depends on D53890. Reviewers: pcc Subscribers: ormris, mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D53891 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350949 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-11[analyzer] [NFC] Fix the FIXME in testsGeorge Karpenkov
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350946 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-11[attributes] Extend os_returns_(not_?)_retained attributes to parametersGeorge Karpenkov
When applied to out-parameters, the attributes specify the expected lifetime of the written-into object. Additionally, introduce OSReturnsRetainedOn(Non)Zero attributes, which specify that an ownership transfer happens depending on a return code. Differential Revision: https://reviews.llvm.org/D56292 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350942 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-11Fix a pair of Wfallthrough warnings in ScanfFormatString.Erich Keane
Change-Id: Ia73a34fdd93fc974224583505f9e6432493cb0da git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350941 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-11Implementation Feature Test Macros for P0722R3Chris Kennelly
Summary: P1353R0, adopted in San Diego, specified an implementation feature test macro for destroying delete (P0722R3). The implementation of the feature (https://reviews.llvm.org/rL315662) is not guarded behind a flag, so the macro is not conditional on language version. Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55741 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350934 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-11Silence -Wsign-compare in unittestsBjorn Pettersson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350933 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-11[Sema] Make canPassInRegisters return true if the CXXRecordDecl passedAkira Hatanaka
to it is a trivial_abi class. A class that has all of its copy and move constructors deleted can still be passed or returned in registers if the class is annotated with trivial_abi. This fixes PR39683. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350920 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-11[Sema] If CheckPlaceholderExpr rewrites the initializer of an autoAkira Hatanaka
variable during auto type deduction, use the rewritten initializer when performing initialization of the variable. This silences spurious -Warc-repeated-use-of-weak warnings that are issued when the initializer uses a weak ObjC pointer. Differential Revision: https://reviews.llvm.org/D55662 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350917 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-11Remember to instantiate explicit template argument lists in a friendRichard Smith
function declaration. We'd previously often just drop these on the floor, and friend redeclaration matching would usually (but not always) figure out the right redeclaration anyway. Also, don't try to match a dependent friend function template specialization to a template until instantiation, and don't forget to reject qualified friend declarations in dependent contexts that don't name an already-declared entity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350915 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-11[AST] Remove ASTContext from getThisType (NFC)Brian Gesiak
Summary: https://reviews.llvm.org/D54862 removed the usages of `ASTContext&` from within the `CXXMethodDecl::getThisType` method. Remove the parameter altogether, as well as all usages of it. This does not result in any functional change because the parameter was unused since https://reviews.llvm.org/D54862. Test Plan: check-clang Reviewers: akyrtzi, mikael Reviewed By: mikael Subscribers: mehdi_amini, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D56509 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350914 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-11Fix header issues.Richard Trieu
Several headers would fail to compile if other headers were not previously included. The usual issue is that a class is forward declared, but the full definition is needed. The requirement for the definition is use of isa/dyn_cast or calling functions of pointer-packed data types such as DenseMap or PointerIntPair. Add missing includes to these headers. SVals.h required an out-of-line method definition in the .cpp file to avoid circular inclusion of headers with BasicValueFactory.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350913 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-11Add an explicit initializer to silence a -Wmissing-field-initializers ↵Aaron Ballman
diagnostic; NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350912 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-10[WebAssembly] Add unimplemented-simd128 feature, gate builtinsThomas Lively
Summary: Depends on D56501. Also adds a macro define `__wasm_unimplemented_simd128__` for feature detection of unimplemented SIMD builtins. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, sunfish, kristina, cfe-commits, rrwinterton git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350909 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-10[analyzer] pr38838, pr39976: Fix crash on diagnosing before implicit destructor.Artem Dergachev
We need to be able to emit the diagnostic at PreImplicitCall, and the patch implements this functionality. However, for now the need for emitting such diagnostics is not all that great: it is only necessary to not crash when emitting a false positive due to an unrelated issue of having dead symbol collection not working properly. Coming up with a non-false-positive test seems impossible with the current set of checkers, though it is likely to be needed for good things as well in the future. Differential Revision: https://reviews.llvm.org/D56042 rdar://problem/46911462 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350907 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-10Properly support -shared-libgcc.Sterling Augustine
This revision was revied in D55016. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350900 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-10Correct the source range returned from preprocessor callbacks.Aaron Ballman
This adjusts the source range passed in to the preprocessor callbacks to only include the condition range itself, rather than all of the conditionally skipped tokens. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350891 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-10NFC: Change case of identifiersStephen Kelly
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350890 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-10[Sema] Call CheckPlaceholderExpr to resolve typeof or decltypeAkira Hatanaka
placeholder expressions while an unevaluated context is still on the expression evaluation context stack. This prevents recordUseOfWeek from being called when a weak variable is used as an operand of a decltype or a typeof expression and fixes spurious -Warc-repeated-use-of-weak warnings. rdar://problem/45742525 Differential Revision: https://reviews.llvm.org/D55662 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350887 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-10[HIP] Use nul instead of /dev/null when running on windowsYaxun Liu
When clang is running on windows, /dev/null is not available. Use nul as empty input file instead. Differential Revision: https://reviews.llvm.org/D56225 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350885 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-10fixup: sphinx warningNick Desaulniers
Fixes the sphinx warning: tools/clang/docs/DiagnosticsReference.rst:7889: WARNING: Title underline too short. That I just introduced in r350877. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350878 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-10[SemaCXX] add -Woverride-init alias to -Winitializer-overridesNick Desaulniers
Summary: https://bugs.llvm.org/show_bug.cgi?id=40251 https://github.com/ClangBuiltLinux/linux/issues/307 Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits, nathanchance, srhines Differential Revision: https://reviews.llvm.org/D56522 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350877 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-10Fix false positive unsequenced access and modification warning in array ↵Nicolas Lesser
subscript expression. Summary: In the [expr.sub] p1, we can read that for a given E1[E2], E1 is sequenced before E2. Patch by Mateusz Janek. Reviewers: rsmith, Rakete1111 Reviewed By: rsmith, Rakete1111 Subscribers: riccibruno, lebedev.ri, Rakete1111, hiraditya, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D50766 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350874 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-10[analyzer] [hotfix] Fix the testsGeorge Karpenkov
The error must have crept during the cherry-pick. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350870 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-10[analyzer] Update the category name for RetainCountChecker reportsGeorge Karpenkov
..now that it includes OSObjects rdar://46509986 Differential Revision: https://reviews.llvm.org/D56404 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350869 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-10[analyzer] [NFC] [RetainCountChecker] Remove dead unused mapGeorge Karpenkov
Differential Revision: https://reviews.llvm.org/D56402 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350868 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-10[analyzer] Quote the type of the leaked/problematic object in diagnostics ↵George Karpenkov
for readability Differential Revision: https://reviews.llvm.org/D56344 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350867 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-10[analyzer] [NFC] Reverse the argument order for "diff" in testsGeorge Karpenkov
The current argument order has "expected" and "actual" the wrong way around, so that the diff shows the change from expected to actual, not from actual to expected. Namely, if the expected diagnostics contains the string "foo", but the analyzer emits "bar", we really want to see: ``` - foo + bar ``` not ``` - bar + foo ``` since adapting to most changes would require applying that diff to the expected output. Differential Revision: https://reviews.llvm.org/D56340 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350866 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-10[analyzer] [NFC] Reduce redundancy in RetainSummaryManager by using a functionGeorge Karpenkov
Differential Revision: https://reviews.llvm.org/D56282 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350865 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-10[analyzer] [RetainCountChecker] [NFC] Remove SummaryLogGeorge Karpenkov
The complicated machinery for passing the summary log around is actually only used for one thing! To figure out whether the "dealloc" message was sent. Since I have tried to extend it for other uses and failed (it's actually very hard to use), I think it's much better to simply use a tag and remove the summary log altogether. Differential Revision: https://reviews.llvm.org/D56228 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350864 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-10[analyzer] [RetainCountChecker] [NFC] Another minor cleanupGeorge Karpenkov
Differential Revision: https://reviews.llvm.org/D56224 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350863 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-10[analyzer] [RetainCountChecker] [NFC] Refactor the way attributes are handledGeorge Karpenkov
Make sure all checks for attributes go through a centralized function, which checks whether attribute handling is enabled, and performs validation. The type of the attribute is returned. Sadly, metaprogramming is required as attributes have no sensible static getters. Differential Revision: https://reviews.llvm.org/D56222 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350862 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-10[analyzer] [RetainCountChecker] Remove redundant enum UnarySummaryKindGeorge Karpenkov
Differential Revision: https://reviews.llvm.org/D56072 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350861 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-10[analyzer] [RetainCountChecker] Remove obsolete "MakeCollectable" enum valueGeorge Karpenkov
Differential Revision: https://reviews.llvm.org/D56071 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350860 91177308-0d34-0410-b5e6-96231b3b80d8