summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* PIC should not be enabled by default on Darwin with -static.Bob Wilson2015-12-181-1/+1
| | | | | | | | | | | r245667 changed -static so that it doesn't override an explicit -fPIC option, but -static should still change the default for Darwin for -fno-PIC. This matches longstanding GCC and Clang behavior on Darwin and changing it would be disruptive, with no significant benefit. http://reviews.llvm.org/D15455 rdar://problem/23811045 llvm-svn: 256026
* [OPENMP] Remove explicit call for implicit barrierAlexey Bataev2015-12-1815-68/+1
| | | | | | | #pragma omp parallel needs an implicit barrier that is currently done by an explicit call to __kmpc_barrier. However, the runtime already ensures a barrier in __kmpc_fork_call which currently leads to two barriers per region per thread. Differential Revision: http://reviews.llvm.org/D15561 llvm-svn: 255992
* [OPENMP] Fix for http://llvm.org/PR25878: Error compiling an OpenMP programAlexey Bataev2015-12-182-0/+44
| | | | | | OpenMP codegen tried to emit the code for its constructs even if it was detected as a dead-code. Added checks to ensure that the code is emitted if the code is not dead. llvm-svn: 255990
* [OPENMP 4.5] Parsing/sema analysis for 'depend(source)' clause in 'ordered' ↵Alexey Bataev2015-12-183-1/+70
| | | | | | | | directive. OpenMP 4.5 adds 'depend(source)' clause for 'ordered' directive to support cross-iteration dependence. Patch adds parsing and semantic analysis for this construct. llvm-svn: 255986
* ObjC properties: consider ownership of properties from protocols when ↵Douglas Gregor2015-12-181-0/+16
| | | | | | | | | | synthesizing. When determining whether ownership was explicitly written for a property when it is being synthesized, also consider that the original property might have come from a protocol. Fixes rdar://problem/23931441. llvm-svn: 255943
* Attach maximum function count to Module when using PGO mode.Easwaran Raman2015-12-172-0/+50
| | | | | | | | This sets the maximum entry count among all functions in the program to the module using module flags. This allows the optimizer to use this information. Differential Revision: http://reviews.llvm.org/D15163 llvm-svn: 255918
* [x86] Filecheck is case sensitive. Capitalize directives.Chad Rosier2015-12-171-4/+4
| | | | llvm-svn: 255916
* [x86] Filecheck is case sensitive. Capitalize directives.Chad Rosier2015-12-171-48/+48
| | | | llvm-svn: 255915
* [CUDA] Make vtable construction aware of host/device side of CUDA compilation.Artem Belevich2015-12-171-0/+61
| | | | | | | | | | | | | | | | | | | C++ emits vtables for classes that have key function present in the current TU. While we compile CUDA the fact that key function was found in this TU does not mean that we are going to generate code for it. E.g. vtable for a class with host-only methods should not (and can not) be generated on device side, because we'll never generate code for them during device-side compilation. This patch adds an extra CUDA-specific check during key method computation and filters out potential key methods that are not suitable for this side of CUDA compilation. When we codegen vtable, entries for unsuitable methods are set to null. Differential Revision: http://reviews.llvm.org/D15309 llvm-svn: 255911
* [ms-inline-asm] Add support for composite structs in MS inline asmMarina Yatsina2015-12-171-0/+20
| | | | | | | | Add MS inline asm support for structs that contain fields that are also structs. Differential Revision: http://reviews.llvm.org/D15578 llvm-svn: 255890
* [OPENMP] Fix for http://llvm.org/PR25142: openmp: Assertion failed: DD && ↵Alexey Bataev2015-12-171-0/+18
| | | | | | | | "queried property of class with no definition", file AST/DeclCXX.h Added processing for template specialization during data-sharing attributes analysis llvm-svn: 255879
* [TLS on Darwin] use CXX_FAST_TLS calling convention for access functions.Manman Ren2015-12-174-24/+32
| | | | | | | | Also set nounwind attribute. rdar://problem/9001553 llvm-svn: 255860
* [analyzer] Better detect when C++ object was constructed into existing region.Devin Coughlin2015-12-171-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | When the analyzer evaluates a CXXConstructExpr, it looks ahead in the CFG for the current block to detect what region the object should be constructed into. If the constructor was directly constructed into a local variable or field region then there is no need to explicitly bind the constructed value to the local or field when analyzing the DeclStmt or CXXCtorInitializer that called the constructor. Unfortunately, there were situations in which the CXXConstructExpr was constructed into a temporary region but when evaluating the corresponding DeclStmt or CXXCtorInitializer the analyzer assumed the object was constructed into the local or field. This led to spurious warnings about uninitialized values (PR25777). To avoid these false positives, this commit factors out the logic for determining when a CXXConstructExpr will be directly constructed into existing storage, adds the inverse logic to detect when the corresponding later bind can be safely skipped, and adds assertions to make sure these two checks are in sync. rdar://problem/21947725 llvm-svn: 255859
* Fix CFI tests in sanitizer-ld.Evgeniy Stepanov2015-12-161-9/+3
| | | | | | | This test is not testing what it is supposed to test because of a mixup with the CHECK lines. llvm-svn: 255827
* [PS4] Fix the unit test to be compatible with clang driver. NFCSumanth Gundapaneni2015-12-161-3/+3
| | | | | | | | | | ".exe" extension is inherently checked by llvm::fs::can_execute() This patch fixes the linker extension in clang driver and updates the unit test to accommodate the the check string on windows. Differential Revision:http://reviews.llvm.org/D15577 llvm-svn: 255814
* Let -Wdelete-non-virtual-dtor mention final.Nico Weber2015-12-161-6/+6
| | | | llvm-svn: 255812
* Add -fsyntax-only to fix failure in read-only directories.Diego Novillo2015-12-161-1/+1
| | | | | | | | | Internally, this test is executed in a read-only directory, which causes it to fail because the driver tries to generate a file unnecessarily. Adding -fsyntax-only fixes the issue (thanks to Artem Belevich for figuring out the root cause). llvm-svn: 255809
* Fix the failing windows clang unit tests. NFCSumanth Gundapaneni2015-12-163-6/+7
| | | | | | | | | | Some tests are missing the {{(.exe)?}} suffix on the exectables which the FileCheck is grepping for. This will ensure, the lit tests are clean on windows Differential Revision: http://reviews.llvm.org/D15579 llvm-svn: 255804
* [CUDA] renamed cuda_runtime.h wrapper to __cuda_runtime.hArtem Belevich2015-12-161-3/+3
| | | | | | | | | | | | | | Currently it's easy to break CUDA compilation by passing "-isystem /path/to/cuda/include" to compiler which leads to compiler including real cuda_runtime.h from there instead of the wrapper we need. Renaming the wrapper ensures that we can include the wrapper regardless of user-specified include paths and files. Differential Revision: http://reviews.llvm.org/D15534 llvm-svn: 255802
* [PS4][Profile] add "--dependent-lib=libclang_rt.profile-x86_64.a" toPaul Robinson2015-12-161-0/+19
| | | | | | | | | | the CC1 command line when enabling code coverage. Patch by Ying Yi! Differential Revision: http://reviews.llvm.org/D15222 llvm-svn: 255784
* [x86] Exclusion of incorrect include headers paths for MCU targetAndrey Bokhanko2015-12-161-0/+6
| | | | | | | | Exclusion of /usr/include and /usr/local/include headers paths for MCU target. Differential Revision: http://reviews.llvm.org/D14954 llvm-svn: 255766
* [Objective-c] Fix a crash that occurs when ObjCTypeParamList::back() isAkira Hatanaka2015-12-161-0/+16
| | | | | | | | | | | | | | called on an empty list. This commit makes Parser::parseObjCTypeParamListOrProtocolRefs return nullptr if it sees an invalid type parameter (e.g., __kindof) in the type parameter list. rdar://problem/23068920 Differential Revision: http://reviews.llvm.org/D15463 llvm-svn: 255754
* Print qualified display names when emitting CodeViewReid Kleckner2015-12-161-0/+73
| | | | | | This is what debuggers expect. Words towards fixing PR21528. llvm-svn: 255744
* [cfi] Exclude ubsan runtime library from non-diag CFI builds (driver changes).Evgeniy Stepanov2015-12-161-2/+2
| | | | | | | Split the CFI runtime in two: cfi and cfi_diag. The latter includes UBSan runtime to allow printing diagnostics. llvm-svn: 255736
* Reland "[SEH] Use llvm.x86.seh.recoverfp for SEH filters on x64 as well as ↵Reid Kleckner2015-12-162-5/+9
| | | | | | | | 32bit" I forgot to initialize RecoverFP. llvm-svn: 255731
* Revert "[SEH] Use llvm.x86.seh.recoverfp for SEH filters on x64 as well as ↵Reid Kleckner2015-12-162-9/+5
| | | | | | | | 32bit" This reverts commit r255710. llvm-svn: 255728
* Relax checks in cfi-cross-dso test.Evgeniy Stepanov2015-12-151-2/+2
| | | | | | The test is failing with unnamed labels. llvm-svn: 255712
* [SEH] Use llvm.x86.seh.recoverfp for SEH filters on x64 as well as 32bitReid Kleckner2015-12-152-5/+9
| | | | llvm-svn: 255710
* Cross-DSO control flow integrity (Clang part).Evgeniy Stepanov2015-12-154-0/+143
| | | | | | | | | | | | | | Clang-side cross-DSO CFI. * Adds a command line flag -f[no-]sanitize-cfi-cross-dso. * Links a runtime library when enabled. * Emits __cfi_slowpath calls is bitset test fails. * Emits extra hash-based bitsets for external CFI checks. * Sets a module flag to enable __cfi_check generation during LTO. This mode does not yet support diagnostics. llvm-svn: 255694
* clang/test/CodeGen/ms_this.cpp: Fix for -Asserts.NAKAMURA Takumi2015-12-151-6/+12
| | | | llvm-svn: 255690
* Fix clang/test/CodeGen/ms_this.cpp.NAKAMURA Takumi2015-12-151-3/+1
| | | | llvm-svn: 255685
* Unsupport test that should not be run on HexagonKrzysztof Parzyszek2015-12-151-0/+4
| | | | llvm-svn: 255667
* clang-cl: Add an alias for /wd4100Nico Weber2015-12-151-2/+3
| | | | llvm-svn: 255655
* [Microsoft][C++] Clang doesn't support a use of "this" pointer inside inline ↵Michael Zuckerman2015-12-151-1/+1
| | | | | | | | | | asm add triple to test Differential Revision: http://reviews.llvm.org/D15115 llvm-svn: 255647
* [Microsoft][C++] Clang doesn't support a use of "this" pointer inside inline asmMichael Zuckerman2015-12-151-0/+49
| | | | | | | | | | | | | | | | | | | | | Clang doesn’t support a use of “this” pointer inside inline asm. When I tried to compile a class or a struct (see example) with an inline asm that contains "this" pointer. Clang returns with an error. This patch fixes that. error: expected unqualified-id For example: ''' struct A { void f() { __asm mov eax, this // error: expected unqualified-id } }; ''' Differential Revision: http://reviews.llvm.org/D15115 llvm-svn: 255645
* [OPENMP 4.5] Fix test compatibility with 32 bit mode.Alexey Bataev2015-12-151-1/+1
| | | | llvm-svn: 255640
* [OPENMP 4.5] Codegen for 'hint' clause of 'critical' directiveAlexey Bataev2015-12-151-0/+6
| | | | | | OpenMP 4.5 defines 'hint' clause for 'critical' directive. Patch adds codegen for this clause. llvm-svn: 255639
* clang/test/Analysis/padding_c.c: Suppress a test incompatible to i686-linux.NAKAMURA Takumi2015-12-151-7/+0
| | | | | | | | error: 'warning' diagnostics expected but not seen: File clang/test/Analysis/padding_c.c Line 194 (directive at clang/test/Analysis/padding_c.c:193): Excessive padding in 'struct DefaultAttrAlign' 1 error generated. llvm-svn: 255636
* [libclang] Add a flag to create the precompiled preamble on the first parse.Benjamin Kramer2015-12-151-2/+11
| | | | | | | | | | | | | | | | | | | | | Summary: The current default is to create the preamble on the first reparse, aka second parse. This is useful for clients that do not want to block when opening a file because serializing the preamble takes a bit of time. However, this makes the reparse much more expensive and that may be on the critical path as it's the first interaction a user has with the source code. YouCompleteMe currently optimizes for the first code interaction by parsing the file twice when loaded. That's just unnecessarily slow and this flag helps to avoid that. Reviewers: doug.gregor, klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15490 llvm-svn: 255635
* [OPENMP 4.5] Parsing/sema for 'hint' clause of 'critical' directive.Alexey Bataev2015-12-152-11/+109
| | | | | | OpenMP 4.5 adds 'hint' clause to critical directive. Patch adds parsing/semantic analysis for this clause. llvm-svn: 255625
* [PGO] make profile prefix even shorter and more readableXinliang David Li2015-12-1517-65/+65
| | | | llvm-svn: 255587
* [PGO] Shorten profile symbol prefixesXinliang David Li2015-12-1417-65/+65
| | | | | | | | | | (test case update) Profile symbols have long prefixes which waste space and creating pressure for linker. This patch shortens the prefixes to minimal length without losing verbosity. Differential Revision: http://reviews.llvm.org/D15503 llvm-svn: 255576
* [Sema] Make nullness warnings appear in C++.George Burgess IV2015-12-142-1/+34
| | | | | | | | | | | | | | | | | | | Given the following code: int *_Nullable ptr; int *_Nonnull nn = ptr; ...In C, clang will warn you about `nn = ptr`, because you're assigning a nonnull pointer to a nullable pointer. In C++, clang issues no such warning. This patch helps ensure that clang doesn't ever miss an opportunity to complain about C++ code. N.B. Though this patch has a differential revision link, the actual review took place over email. Differential Revision: http://reviews.llvm.org/D14938 llvm-svn: 255556
* [PATCH] Adding checker to detect excess padding in recordsBen Craig2015-12-143-0/+630
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The intent of this checker is to generate a report for any class / structure that could reduce its padding by reordering the fields. This results in a very noisy checker. To reduce the noise, this checker will currently only warn when the number of bytes over "optimal" is more than 24. This value is configurable with -analyzer-config performance.Padding:AllowedPad=N. Small values of AllowedPad have the potential to generate hundreds of reports, and gigabytes of HTML reports. The checker searches for padding violations in two main ways. First, it goes record by record. A report is generated if the fields could be reordered in a way that reduces the padding by more than AllowedPad bytes. Second, the checker will generate a report if an array will cause more than AllowedPad padding bytes to be generated. The record checker currently skips many ABI specific cases. Classes with base classes are skipped because base class tail padding is ABI specific. Bitfields are just plain hard, and duplicating that code seems like a bad idea. VLAs are both uncommon and non-trivial to fix. The array checker isn't very thorough right now. It only checks to see if the element type's fields could be reordered, and it doesn't recursively check to see if any of the fields' fields could be reordered. At some point in the future, it would be nice if "arrays" could also look at array new usages and malloc patterns that appear to be creating arrays. llvm-svn: 255545
* [PowerPC] Fix test/CodeGen/ppc-sfvarargsPetar Jovanovic2015-12-141-1/+1
| | | | | | | | | The issue seems to be that .ll file may either use number of register value or alias %numUsedRegs, so the check needs to cover both cases. This will hopefully fix the last regression introduced by r255515. llvm-svn: 255539
* [PowerPC] Fix make-check issuesPetar Jovanovic2015-12-142-7/+7
| | | | | | | Previous change r255515 introduced a couple of issues likely caused by a different configure setup. llvm-svn: 255533
* Allow pseudo-destructor calls on forward-declared Objective-C class pointers.John McCall2015-12-141-0/+23
| | | | | | rdar://18522255 llvm-svn: 255531
* clang-cl: make /Wall turn on both -Wall and -Wextra (PR25563)Hans Wennborg2015-12-141-1/+1
| | | | | | | | The documentation suggests /Wall should really turn on -Wextra and any other warnings that are not enabled by default. That would correspond to Clang's -Weverything, but is probably not what users want. llvm-svn: 255524
* [MS ABI] Don't rely on terminatepadDavid Majnemer2015-12-142-3/+5
| | | | | | | | | | | | | | | We'd like to remove support for terminatepad from LLVM. To do this, we need to move Clang off of it first. The intent behind terminatepad was to carefully model exception specifications for the MSVC personality. However, we don't support exception specifications for the MSVC personality and neither does MSVC. Instead, MSVC supports all-or-nothing exception specifications. We can model this limited usage using cleanuppads which call std::terminate. Differential Revision: http://reviews.llvm.org/D15478 llvm-svn: 255521
* [Power PC] add soft float support for ppc32Petar Jovanovic2015-12-142-0/+61
| | | | | | | | | | | | This patch enables soft float support for ppc32 architecture and fixes the ABI for variadic functions. This is the first in a set of patches for soft float support in LLVM. Patch by Strahinja Petrovic. Differential Revision: http://reviews.llvm.org/D13351 llvm-svn: 255515
OpenPOWER on IntegriCloud