summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] print() JSONify: Create pointersCsaba Dabis2019-06-255-103/+124
| | | | | | | | | | | | | | | | | Summary: - Reviewers: NoQ Reviewed By: NoQ Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63726 llvm-svn: 364271
* [analyzer] JsonSupport: Escape escapesCsaba Dabis2019-06-252-2/+6
| | | | | | | | | | | | | | | | | Summary: - Reviewers: NoQ Reviewed By: NoQ Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63462 llvm-svn: 364270
* [analyzer] exploded-graph-rewriter: Fix escaping for bitwise-or.Artem Dergachev2019-06-251-1/+6
| | | | | | | '|' is a special character in graphviz, so it needs to be properly escaped and unescaped. llvm-svn: 364269
* [analyzer] exploded-graph-rewriter: Add support for range constraints.Artem Dergachev2019-06-256-0/+99
| | | | | | | | | | | | Diff support included. A cheap solution is implemented that treats range constraints as "some sort of key-value map", so it's going to be trivial to add support for other such maps later, such as dynamic type info. Differential Revision: https://reviews.llvm.org/D63685 llvm-svn: 364268
* [cxx2a] P1236R1: the validity of a left shift does not depend on theRichard Smith2019-06-254-6/+133
| | | | | | value of the LHS operand. llvm-svn: 364265
* [analyzer] ExprEngine: Escape pointers in bitwise operationsCsaba Dabis2019-06-251-0/+33
| | | | | | | | | | | | | | | | | | Summary: After evaluation it would be an Unknown value and tracking would be lost. Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus Reviewed By: NoQ Subscribers: szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63720 llvm-svn: 364259
* AMDGPU: Fix missing declaration for mbcnt builtinsMatt Arsenault2019-06-241-0/+12
| | | | llvm-svn: 364251
* Fix test cl-response-file.c to work on all platforms including Windows/Solaris.Douglas Yung2019-06-241-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D63678 llvm-svn: 364245
* Augment location information when dumping the AST to JSON.Aaron Ballman2019-06-2421-9632/+6052
| | | | | | Rather than create JSON objects for source locations and ranges, we instead stream them out directly. This allows us to elide duplicate information (without JSON field reordering causing an issue) like file names and line numbers, similar to the text dump. This also adds token length information when dumping the source location. llvm-svn: 364226
* [clang][NewPM] Add RUNS for tests that produce slightly different IR under ↵Leonard Chan2019-06-241-2/+8
| | | | | | | | | | new PM For CodeGenOpenCL/convergent.cl, the new PM produced a slightly different for loop, but this still checks for no loop unrolling as intended. This is committed separately from D63174. llvm-svn: 364202
* [clang][NewPM] Remove exception handling before loading pgo sample profile dataLeonard Chan2019-06-241-3/+10
| | | | | | | | | This patch ensures that SimplifyCFGPass comes before SampleProfileLoaderPass on PGO runs in the new PM and fixes clang/test/CodeGen/pgo-sample.c. Differential Revision: https://reviews.llvm.org/D63626 llvm-svn: 364201
* [analyzer] print() JSONify: ProgramPoint revisionCsaba Dabis2019-06-241-0/+2
| | | | | | | | | | | | | | | | | Summary: Now we also print out the filename with its path. Reviewers: NoQ Reviewed By: NoQ Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63438 llvm-svn: 364197
* [analyzer] Fix JSON dumps for ExplodedNodesCsaba Dabis2019-06-241-4/+8
| | | | | | | | | | | | | | | | | | | Summary: - Now we could see the `has_report` property in `trim-egraph` mode. - This patch also removes the trailing comma after each node. Reviewers: NoQ Reviewed By: NoQ Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63436 llvm-svn: 364193
* [OPENMP]Relax the test checks to pacify 32bit buildbots, NFC.Alexey Bataev2019-06-241-2/+2
| | | | llvm-svn: 364189
* [OpenCL] Restore ATOMIC_VAR_INITSven van Haastregt2019-06-241-0/+4
| | | | | | | | | We accidentally lost the ATOMIC_VAR_INIT and ATOMIC_FLAG_INIT macros in r363794. Also put the `memory_order` typedef back inside a `>= CL2.0` guard. llvm-svn: 364174
* PR42362: Fix auto deduction of template parameter packs fromRichard Smith2019-06-241-0/+15
| | | | | | | | | type-dependent argument packs. We need to strip off the PackExpansionExpr to get the real (dependent) type rather than an opaque DependentTy. llvm-svn: 364165
* Fix test for 32-bit targets.Richard Smith2019-06-231-4/+4
| | | | llvm-svn: 364157
* Revert "builtins: relax __iso_volatile_{load,store}32"Saleem Abdulrasool2019-06-231-17/+0
| | | | | | | This reverts commit SVN r364137. This seems to be cause problems with casting in C. llvm-svn: 364147
* Fix TBAA representation for zero-sized fields and unnamed bit-fields.Richard Smith2019-06-223-8/+24
| | | | | | | | | | | | | | | Unnamed bit-fields should not be represented in the TBAA metadata because they do not represent storage fields (they only affect layout). Zero-sized fields should not be represented in the TBAA metadata because by definition they have no associated storage (so we will never emit a load or store through them), and they might not appear in declaration order within the struct layout. Fixes a verifier failure when emitting a TBAA-enabled load through a class type containing a zero-sized field. llvm-svn: 364140
* builtins: relax __iso_volatile_{load,store}32Saleem Abdulrasool2019-06-221-0/+17
| | | | | | | | | | | This is reduced from MSVC's MSVCPRT 14.21.27702 atomic header. Because Windows is a LLP64 environment, `long`, `long int`, and `int` are all synonymous. Change the signature for `__iso_volatile_load32` and `__iso_volatile_store32` to accept a `long int` instead. This allows an implicit cast of `int` to `long int` while also permitting `long` to be accepted. llvm-svn: 364137
* [X86] Don't use _MM_FROUND_CUR_DIRECTION in the intrinsics tests.Craig Topper2019-06-224-390/+390
| | | | | | | | | | _MM_FROUND_CUR_DIRECTION is the behavior of the intrinsics that don't take a rounding mode argument. So a better test is using _MM_FROUND_NO_EXC with the SAE only intrinsics and an explicit rounding mode with the intrinsics that support embedded rounding mode. llvm-svn: 364127
* AMDGPU: Fix target builtins for gfx10Matt Arsenault2019-06-227-3/+12
| | | | | | This wasn't setting some of the features from older generations. llvm-svn: 364123
* [ODRHash] Skip some typedef types.Richard Trieu2019-06-221-1/+62
| | | | | | | | | | | | | | | In some cases, a typedef only strips aways a keyword for a type, keeping the same name as the root record type. This causes some confusion when the type is defined in one modules but only forward declared in another. Skipping the typedef and going straight to the record will avoid this issue. typedef struct S {} S; S* s; // S is TypedefType here struct S; S* s; // S is RecordType here llvm-svn: 364119
* Remove binary finally accidentially committed in r364109Erich Keane2019-06-211-0/+0
| | | | llvm-svn: 364110
* Ensure Target Features always_inline error happens in C++ cases.Erich Keane2019-06-212-0/+17
| | | | | | | | A handful of C++ cases as reported in PR42352 didn't actually give an error when always_inlining with a different target feature list. This resulted in broken IR. llvm-svn: 364109
* Fix has_attribute.cpp test on Windows after r364102Reid Kleckner2019-06-211-2/+2
| | | | llvm-svn: 364108
* Fix __has_cpp_attribute expansion to produce trailing L and (whereRichard Smith2019-06-211-85/+67
| | | | | | | | necessary) leading whitespace. Simplify unit test and extend to cover no_unique_address attribute. llvm-svn: 364102
* Devirtualize destructor of final class.Hiroshi Yamauchi2019-06-211-0/+23
| | | | | | | | | | | | | | | | | | | Summary: Take advantage of the final keyword to devirtualize destructor calls. Fix https://bugs.llvm.org/show_bug.cgi?id=21368 Reviewers: rsmith Reviewed By: rsmith Subscribers: davidxl, Prazek, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63161 llvm-svn: 364100
* Revert [test][Driver] Fix Clang :: Driver/cl-response-file.cReid Kleckner2019-06-211-1/+1
| | | | | | | | | This reverts r363985 (git commit d5f16d6cfccc4b0b13b6c01d16c673886d53e695) This test can't use printf on Windows because the path contains backslashes which must not be interpreted as escapes by printf. llvm-svn: 364089
* [clang-scan-deps] print the dependencies to stdoutAlex Lorenz2019-06-212-14/+23
| | | | | | | | and remove the need to use -MD options in the CDB Differential Revision: https://reviews.llvm.org/D63579 llvm-svn: 364088
* Fix ARM buildbot.Richard Smith2019-06-211-4/+4
| | | | llvm-svn: 364081
* [OPENMP]Fix PR42068: Vla type is not captured.Alexey Bataev2019-06-211-9/+13
| | | | | | | | If the variably modified type is declared outside of the captured region and then used in the cast expression along with array subscript expression, the type is not captured and it leads to the compiler crash. llvm-svn: 364080
* Ensure that top-level QualType objects also have a "kind" field when dumping ↵Aaron Ballman2019-06-211-0/+72
| | | | | | the AST to JSON. llvm-svn: 364078
* [OpenCL][PR41963] Add generic addr space to old atomics in C++ modeAnastasia Stulova2019-06-211-0/+8
| | | | | | | | | Add overloads with generic address space pointer to old atomics. This is currently only added for C++ compilation mode. Differential Revision: https://reviews.llvm.org/D62335 llvm-svn: 364071
* Print more type node information when dumping the AST to JSON.Aaron Ballman2019-06-211-0/+358
| | | | llvm-svn: 364067
* [clang][NewPM] Add -fno-experimental-new-pass-manager to testsLeonard Chan2019-06-2113-91/+135
| | | | | | | | | | | | | | | | As per the discussion on D58375, we disable test that have optimizations under the new PM. This patch adds -fno-experimental-new-pass-manager to RUNS that: - Already run with optimizations (-O1 or higher) that were missed in D58375. - Explicitly test new PM behavior along side some new PM RUNS, but are missing this flag if new PM is enabled by default. - Specify -O without the number. Based on getOptimizationLevel(), it seems the default is 2, and the IR appears to be the same when changed to -O2, so update the test to explicitly say -O2 and provide -fno-experimental-new-pass-manager`. Differential Revision: https://reviews.llvm.org/D63156 llvm-svn: 364066
* [OPENMP]Fix PR42159: do not capture threadprivate variables.Alexey Bataev2019-06-211-2/+3
| | | | | | | The threadprivate variables should not be captured in the outlined regions, otherwise it leads to the compiler crash. llvm-svn: 364061
* Add an automated note to files produced by gen_ast_dump_json_test.py.Aaron Ballman2019-06-2121-627/+678
| | | | | | This also details what filters, if any, were used to generate the test output. Updates all the current JSON testing files to include the automated note. llvm-svn: 364055
* Print information about various type nodes when dumping the AST to JSON.Aaron Ballman2019-06-214-2243/+2285
| | | | llvm-svn: 364043
* Fix test/AST/ast-dump-records-json.cpp after ConstantExpr change in D63376Fangrui Song2019-06-211-0/+6
| | | | llvm-svn: 364033
* [Sema] Fix diagnostic for addr spaces in reference bindingAnastasia Stulova2019-06-211-0/+10
| | | | | | | | Extend reference binding behavior to account for address spaces. Differential Revision: https://reviews.llvm.org/D62914 llvm-svn: 364032
* [Sema] Improved diagnostic for qualifiers in reference bindingAnastasia Stulova2019-06-218-47/+47
| | | | | | | | | Improved wording and also simplified by using printing method from qualifiers. Differential Revision: https://reviews.llvm.org/D62914 llvm-svn: 364023
* [cmake] Add llvm-dwarfdump to clang test dependenciesSven van Haastregt2019-06-211-0/+1
| | | | | | | | Commit r363496 ("[Clang] Harmonize Split DWARF options with llc", 2019-06-15) introduced the use of llvm-dwarfdump in the clang tests, so ensure the clang tests are dependent on llvm-dwarfdump. llvm-svn: 364021
* [RISC-V] Add -msave-restore and -mno-save-restore to clang driverSam Elliott2019-06-211-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The GCC RISC-V toolchain accepts `-msave-restore` and `-mno-save-restore` to control whether libcalls are used for saving and restoring the stack within prologues and epilogues. Clang currently errors if someone passes -msave-restore or -mno-save-restore. This means that people need to change build configurations to use clang. This patch adds these flags, so that clang invocations can now match gcc. As the RISC-V backend does not currently have a `save-restore` target feature, we emit a warning if someone requests `-msave-restore`. LLVM does not error if we pass the (unimplemented) target features `+save-restore` or `-save-restore`. Reviewers: asb, luismarques Reviewed By: asb Subscribers: rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63498 llvm-svn: 364018
* [CodeGen][test] Use FileCheck variable matchers for better test supportJordan Rupprecht2019-06-201-5/+12
| | | | | | | | | | | | | | | | Summary: Depending on how clang is built, it may discard the IR names and use names like `%2` instead of `%result.ptr`, causing tests that rely on the IR name to fail. Using FileCheck matchers makes the test work regardless of how clang is built. This test passes with both `-fno-discard-value-names` and `-fdiscard-value-names` to make sure it passes regardless of the build mode. Reviewers: rnk, akhuang, aprantl, lebedev.ri Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63625 llvm-svn: 363996
* [analyzer] DeadStores: Update the crude suppression for files generated by IIG.Artem Dergachev2019-06-201-1/+1
| | | | | | They changed the comments that we were looking for. llvm-svn: 363995
* Print information about various ObjC expression nodes when dumping the AST ↵Aaron Ballman2019-06-202-143/+4963
| | | | | | to JSON. llvm-svn: 363988
* AMDGPU: Add DS GWS sema builtinsMatt Arsenault2019-06-203-1/+28
| | | | llvm-svn: 363986
* [test][Driver] Fix Clang :: Driver/cl-response-file.cRainer Orth2019-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clang :: Driver/cl-response-file.c currently FAILs on Solaris: Command Output (stderr): -- /vol/llvm/src/clang/dist/test/Driver/cl-response-file.c:10:11: error: CHECK: expected string not found in input // CHECK: "-I" "{{.*}}\\Inputs\\cl-response-file\\" "-D" "FOO=2" ^ Looking at the generated response file reveals that this is no surprise: /I/vol/llvm/src/clang/dist/test/Driver\Inputs with no newline at the end. The echo command used to create it boils down to echo 'a\cb' However, one cannot expect \c to be emitted literally: e.g. bash's builtin echo has \c suppress further output I've tried various combinations of builtin echo, /usr/bin/echo, GNU echo if different, the same for printf, and the backslash unescaped and quoted (a\cb and a\\cb). The only combination that worked reliably on Solaris, Linux, and macOS was printf 'a\\cb' so this is what this patch uses. Tested on amd64-pc-solaris2.11 and x86_64-pc-linux-gnu. Differential Revision: https://reviews.llvm.org/D63600 llvm-svn: 363985
* P0840R2: support for [[no_unique_address]] attributeRichard Smith2019-06-204-0/+407
| | | | | | | | | | | | | | | | | Summary: Add support for the C++2a [[no_unique_address]] attribute for targets using the Itanium C++ ABI. This depends on D63371. Reviewers: rjmccall, aaron.ballman Subscribers: dschuff, aheejin, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63451 llvm-svn: 363976
OpenPOWER on IntegriCloud