summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* PR25910: clang allows two var definitions with the same mangled nameAndrey Bokhanko2016-01-141-4/+39
| | | | | | | | | | | Proper diagnostic and resolution of mangled names' conflicts in variables. When there is a declaration and a definition using the same name but different types, we emit what is in the definition. When there are two conflicting definitions, we issue an error. Differential Revision: http://reviews.llvm.org/D15686 llvm-svn: 257754
* CodeGen: Only emit CFI unrelated cast checks for bit casts.Peter Collingbourne2016-01-141-6/+15
| | | | | | | We were previously emitting them for no-op casts (e.g. implicit casts to const). llvm-svn: 257738
* [Sema] Suppress diags in overload resolution.George Burgess IV2016-01-131-0/+55
| | | | | | | | | | We were emitting diagnostics from our shiny new C-only overload resolution mode. This patch attempts to silence all such diagnostics. This fixes PR26085. Differential Revision: http://reviews.llvm.org/D16159 llvm-svn: 257710
* Revert r257602 because it breaks integrated-as.s on mips hosts.Scott Egerton2016-01-131-91/+0
| | | | llvm-svn: 257610
* Revert "[analyzer] Provide .def-files and visitors for SVal/SymExpr/MemRegion."Artem Dergachev2016-01-131-98/+0
| | | | | | | | | This reverts commit r257605. The test fails on architectures that use unsigned int as size_t. SymbolManager.h fails with compile errors on some platforms. llvm-svn: 257608
* [analyzer] Provide .def-files and visitors for SVal/SymExpr/MemRegion.Artem Dergachev2016-01-131-0/+98
| | | | | | | | | | | | | Provide separate visitor templates for the three hierarchies, and also the `FullSValVisitor' class, which is a union of all three visitors. Additionally, add a particular example visitor, `SValExplainer', in order to test the visitor templates. This visitor is capable of explaining the SVal, SymExpr, or MemRegion in a natural language. Differential Revision: http://reviews.llvm.org/D15448 llvm-svn: 257605
* [mips] Added support for -Wa,-mips32 and similar.Scott Egerton2016-01-131-0/+91
| | | | | | | | | | Reviewers: vkalintiris, dsanders Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15070 llvm-svn: 257602
* [OPENMP] Fix for declarative/standalone directives use.Alexey Bataev2016-01-138-20/+59
| | | | | | Fixes processing of declarative directives and standalone executable directives. Declarative directives should not be allowed as an immediate statements and standalone executable directives are allowed to be used in case-stmt constructs. llvm-svn: 257586
* [Bugfix] Fix ICE on constexpr vector splat.George Burgess IV2016-01-133-11/+99
| | | | | | | | | | | | | In {CG,}ExprConstant.cpp, we weren't treating vector splats properly. This patch makes us treat splats more properly. Additionally, this patch adds a new cast kind which allows a bool->int cast to result in -1 or 0, instead of 1 or 0 (for true and false, respectively), so we can sanely model OpenCL bool->int casts in the AST. Differential Revision: http://reviews.llvm.org/D14877 llvm-svn: 257559
* [CUDA] Rename check-prefixes in cuda-options.cu and cuda-unused-arg-warning.cu.Justin Lebar2016-01-132-157/+122
| | | | | | | | | | | | | | | | Summary: Rename the args to be more human-readable. Among other things, this lets us get rid of a bunch of comments (e.g. "ensure we don't run the linker"), greatly shortening these tests. Also apply consistent formatting and fix some English nits while we're at it. Reviewers: tra Differential Revision: http://reviews.llvm.org/D15975 llvm-svn: 257557
* Generalize r256026 to apply to all MachO targets, not just Darwin targets.Bob Wilson2016-01-131-0/+2
| | | | | | | | The PIC default is set for the MachO toolchain, not just the Darwin toolchain, so this treats those the same. The behavior with -static should be the same for all MachO targets. rdar://24152327 llvm-svn: 257556
* [CUDA] Report an error if code tries to mix incompatible CUDA attributes.Justin Lebar2016-01-133-1/+55
| | | | | | | | | | | | Summary: Thanks to jhen for helping me figure this out. Reviewers: tra, echristo Subscribers: jhen Differential Revision: http://reviews.llvm.org/D16129 llvm-svn: 257554
* [Darwin] Fix deployment target detectionFrederic Riss2016-01-121-0/+1
| | | | | | | | | There was a thinko in the deployment target detection code that made the -isysroot parsing have precedence over the environment variable for tvOS. This patch makes this logic symetric for all platforms (the env variable must have precedence). llvm-svn: 257543
* Follow-up to r257537: add test that majnemer asked aboutHans Wennborg2016-01-121-1/+2
| | | | llvm-svn: 257541
* clang-cl: Support /Dfoo#bar (PR25984)Hans Wennborg2016-01-121-2/+6
| | | | | | Such flags will now be translated to -Dfoo=bar. llvm-svn: 257537
* [CUDA] Add explicit mapping from sm_XX to compute_YY.Justin Lebar2016-01-121-14/+2
| | | | | | | | | | | | Summary: This is used by D16082 when it invokes fatbinary. Reviewers: tra Subscribers: cfe-commits, jhen, echristo Differential Revision: http://reviews.llvm.org/D16097 llvm-svn: 257530
* Improve AST dumping:Richard Smith2016-01-121-3/+18
| | | | | | | | 1) When dumping a declaration that declares a name for a type, also dump the named type. 2) Add a #pragma clang __debug dump X, that dumps the lookup results for X in the current context. llvm-svn: 257529
* [modules] Don't diagnose a conflict between two using-declarations that name ↵Richard Smith2016-01-124-4/+17
| | | | | | equivalent internal linkage entities. llvm-svn: 257512
* Add a clang test for r257376 (Ensure -mcpu=xscale works for arm targets).Dimitry Andric2016-01-121-0/+3
| | | | llvm-svn: 257509
* [analyzer] Fix RangeConstraintManager's pinning of single value ranges.Pierre Gousseau2016-01-121-0/+30
| | | | | | | | This fix a bug in RangeSet::pin causing single value ranges to be considered non conventionally ordered. Differential Revision: http://reviews.llvm.org/D12901 llvm-svn: 257467
* [analyzer] Evaluate integral casts as cast symbols if truncations are detected.Pierre Gousseau2016-01-121-0/+126
| | | | | | | | | | | | | The current workaround for truncations not being modelled is that the evaluation of integer to integer casts are simply bypassed and so the original symbol is used as the new casted symbol (cf SimpleSValBuilder::evalCastFromNonLoc). This lead to the issue described in PR25078, as the RangeConstraintManager associates ranges with symbols. The new evalIntegralCast method added by this patch wont bypass the cast if it finds the range of the symbol to be greater than the maximum value of the target type. The fix to RangeSet::pin mentioned in the initial review will be committed separately. Differential Revision: http://reviews.llvm.org/D12901 llvm-svn: 257464
* PR18513: make gcc compatible layout for bit-fields with explicit aligned ↵Alexey Bataev2016-01-121-2/+184
| | | | | | | | | attribute, by Dmitry Polukhin Fix binary compatibility issue with GCC. Differential Revision: http://reviews.llvm.org/D14980 llvm-svn: 257462
* Fix infinite recursion for invalid declaration, by Dmitry PolukhinAlexey Bataev2016-01-121-0/+9
| | | | | | | Fix for a case found by fuzzing PR23057 (comment #25 https://llvm.org/bugs/show_bug.cgi?id=23057#c25). Differential Revision: http://reviews.llvm.org/D16065 llvm-svn: 257461
* [CUDA] Reject values for --cuda-gpu-arch that are not of the form /sm_\d+/.Justin Lebar2016-01-111-0/+34
| | | | | | | | | | Reviewers: tra Subscribers: cfe-commits, jhen, echristo Differential Revision: http://reviews.llvm.org/D16079 llvm-svn: 257413
* When a tag is declared in prototype scope in C, if we've decided that itRichard Smith2016-01-112-0/+21
| | | | | | | | | | | | | | redeclares an existing tag but are creating a new declaration anyway (because it has attributes or changes the visibility of the name), don't warn that it won't be visible outside the current scope. That's not true. Also narrow down the set of cases where we create these extra declarations when building modules; previously, all tag declarations but the first in a module header would get this treatment if -fmodules-local-submodule-visibility. (This isn't a functional change, but we try to avoid creating these extra declarations whenever we can.) llvm-svn: 257403
* [Sema] Issue a warning for integer overflow in struct initializerAkira Hatanaka2016-01-111-0/+8
| | | | | | | | | | | | | | | | Clang wasn't issuing a warning when compiling the following code: struct s { unsigned x; } s = { .x = 4 * 1024 * 1024 * 1024 }; rdar://problem/23399683 Differential Revision: http://reviews.llvm.org/D15097 llvm-svn: 257357
* [WebAssembly] Fix a typo in a comment.Dan Gohman2016-01-111-1/+1
| | | | llvm-svn: 257327
* Fix assert hit when tree-transforming template template parameter packs.Manuel Klimek2016-01-111-1/+11
| | | | | | | | | Covers significantly more code in the template template pack argument test and fixes the resulting assert problem. Differential Revision: http://reviews.llvm.org/D15743 llvm-svn: 257326
* AnalysisConsumer: use canonical decl for both lookup and store ofYury Gribov2016-01-111-0/+15
| | | | | | | | | | | | | | | | visited decls. Due to redeclarations, the function may have different declarations used in CallExpr and in the definition. However, we need to use a unique declaration for both store and lookup in VisitedCallees. This patch fixes issues with analysis in topological order. A simple test is included. Patch by Alex Sidorin! Differential Revision: http://reviews.llvm.org/D15410 llvm-svn: 257318
* [OpenCL] Pipe type supportXiuli Pan2016-01-095-3/+64
| | | | | | | | | | | | | | | Summary: Support for OpenCL 2.0 pipe type. This is a bug-fix version for bader's patch reviews.llvm.org/D14441 Reviewers: pekka.jaaskelainen, Anastasia Subscribers: bader, Anastasia, cfe-commits Differential Revision: http://reviews.llvm.org/D15603 llvm-svn: 257254
* [modules] If we're treating an elaborated-type-specifier as if it introduces aRichard Smith2016-01-091-2/+5
| | | | | | | | tag (because the previous declaration was found in a different module), inject the tag into the appropriate scope (that is, the enclosing scope if we're in a function prototype scope in C++). llvm-svn: 257251
* Module debugging: Add a testcase for standalone forward declarations.Adrian Prantl2016-01-092-0/+6
| | | | llvm-svn: 257241
* Only take NULL macros instead of all macros into account for -Wnull-conversion.Richard Trieu2016-01-091-0/+20
| | | | llvm-svn: 257240
* Exclude function calls for functions which have return type nullptr_t fromRichard Trieu2016-01-081-0/+11
| | | | | | | | | -Wnull-conversion warning. These functions are basically equivalent to other pointer returning fuctions which are already excluded by -Wnull-conversion. llvm-svn: 257231
* [modules] Make sure we always include the contents of private headers whenRichard Smith2016-01-083-3/+5
| | | | | | | | | | building a module. Prior to this change, the private header's content would only be included if the header were included by another header in the same module. If not (if the private header is only used by the .cc files of the module, or is included from outside the module via -Wno-private-header), a #include of that file would be silently ignored. llvm-svn: 257222
* [MS ABI] Complete and base constructor GlobalDecls must have the same nameDavid Majnemer2016-01-081-0/+25
| | | | | | | | | | | | | | | | | Clang got itself into the situation where we mangled the same constructor twice with two different constructor types. After one of the constructors were utilized, the tag used for one of the types changed from class to struct because a class template became complete. This resulted in one of the constructor types varying from the other constructor. Instead, force "base" constructor types to "complete" if the ABI doesn't have constructor variants. This will ensure that GlobalDecls for both variants will get the same mangled name. This fixes PR26029. llvm-svn: 257205
* Driver: Use the new ELF lld linker for AMDGPUTom Stellard2016-01-081-1/+1
| | | | | | | | | | | | Summary: 'gnu-old' has been deprecated in favor or 'gnu'. Reviewers: arsenm, ruiu, rafael Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15953 llvm-svn: 257175
* [CUDA] Split out tests for unused-arg warnings from cuda-options.cu.Justin Lebar2016-01-082-18/+23
| | | | | | | | | | | | Summary: Trying to make this test a bit more manageable. Reviewers: tra Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15974 llvm-svn: 257142
* [PPC] Add long long/double support for vec_cts, vec_ctu and vec_ctfKyle Butt2016-01-081-0/+47
| | | | | | | | | | | Add long long/double support for vec_cts, vec_ctu and vec_ctf. Similar to this change in GCC: https://gcc.gnu.org/ml/gcc-patches/2014-08/msg02653.html Patch by Tim Shen. llvm-svn: 257135
* Turn off lldb debug tuning by default for FreeBSDDimitry Andric2016-01-071-1/+1
| | | | | | | | | | | | | | | Summary: This is the clang part of D15966. In rL256104, debugger tuning was added to the clang driver, and again the default for FreeBSD was set to lldb. The default needs to be gdb instead. Reviewers: emaste, probinson Subscribers: cfe-commits, emaste Differential Revision: http://reviews.llvm.org/D15967 llvm-svn: 257104
* Properly track that a character literal is UTF-8, and pretty print the ↵Aaron Ballman2016-01-072-0/+43
| | | | | | prefix properly. llvm-svn: 257097
* [OpenMP] Fix issue in the offloading metadata testing.Samuel Antao2016-01-072-28/+28
| | | | | | | | | - Allow device ID to be signed. - Add missing semicolon to some of the CHECK directives. Thanks to Amjad Aboud for detecting the issue. llvm-svn: 257065
* Add missing -no-canonical-prefixes.Daniel Jasper2016-01-071-1/+1
| | | | llvm-svn: 257057
* [libclang] Handle AutoType in clang_getTypeDeclarationSergey Kalinichev2016-01-071-0/+12
| | | | | | Differential Revision: http://reviews.llvm.org/D13001 llvm-svn: 257043
* ARM: allow __thread on OS versions that have the required runtime support.Tim Northover2016-01-071-0/+17
| | | | llvm-svn: 257041
* Make sure we claim arguments that are going to be passed to a gcc tool,Eric Christopher2016-01-071-0/+6
| | | | | | even if they're not going to be used to avoid unused option warnings. llvm-svn: 257040
* [WebAssembly] Add -m:e to the target triple.Dan Gohman2016-01-071-2/+2
| | | | llvm-svn: 257021
* [Sema] Teach overload resolution about unaddressable functions.George Burgess IV2016-01-073-1/+37
| | | | | | | | | | | | Given an expression like `(&Foo)();`, we perform overload resolution as if we are calling `Foo` directly. This causes problems if `Foo` is a function that can't have its address taken. This patch teaches overload resolution to ignore functions that can't have their address taken in such cases. Differential Revision: http://reviews.llvm.org/D15590 llvm-svn: 257016
* Use an actual real architecture and massage a couple of comments.Eric Christopher2016-01-071-3/+4
| | | | llvm-svn: 257010
* Test that we're not forwarding on -g options to the non integrated assembler.Eric Christopher2016-01-071-0/+6
| | | | | | This is adding a test for an old fixed PR to make sure we don't regress. llvm-svn: 257009
OpenPOWER on IntegriCloud