summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [GCC] PR23529 Sema part of attrbute abi_tag supportDmitry Polukhin2016-03-098-2/+233
| | | | | | | | | | | | | | | | | Original patch by Stefan Bühler http://reviews.llvm.org/D12834 Difference between original and this one: - fixed all comments in original code review - added more tests, all new diagnostics now covered by tests - moved abi_tag on re-declaration checks to Sema::mergeDeclAttributes where they actually may work as designed - clang-format + other stylistic changes Mangle part will be sent for review as a separate patch. Differential Revision: http://reviews.llvm.org/D17567 llvm-svn: 263015
* Fixing wrong header title name. Michael Zuckerman2016-03-092-2/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D17917 llvm-svn: 263007
* Pacify gcc's parenthesis warning, which doesn't realize that parens don't ↵Manuel Klimek2016-03-091-3/+2
| | | | | | matter here. llvm-svn: 263004
* [OPENMP 4.5] Codegen for data members in 'linear' clauseAlexey Bataev2016-03-094-32/+302
| | | | | | | | OpenMP 4.5 allows privatization of non-static data members in OpenMP constructs. Patch adds proper codegen support for data members in 'linear' clause llvm-svn: 263003
* [OPENMP 4.5] Codegen for data members in 'linear' clause.Alexey Bataev2016-03-099-27/+69
| | | | | | | OpenMP 4.5 allows to use data members in private clauses. Patch adds codegen support for 'linear' clause. llvm-svn: 263002
* Accept absolute paths in the -fuse-ld option.Peter Zotov2016-03-092-13/+26
| | | | | | | | | | | | | | | | | | | | | | | | This patch extends the -fuse-ld option to accept a full path to an executable and use it verbatim to invoke the linker. There are generally two reasons to desire this. The first reason relates to the sad truth is that Clang is retargetable, Binutils are not. While any Clang from a binary distribution is sufficient to compile code for a wide range of architectures and prefixed BFD linkers (e.g. installed as /usr/bin/arm-none-linux-gnueabi-ld) as well as cross-compiled libc's (for non-bare-metal targets) are widely available, including on all Debian derivatives, it is impossible to use them together because the -fuse-ld= option allows to specify neither a linker prefix nor a full path to one. The second reason is linker development, both when porting existing linkers to new architectures and when working on a new linker such as LLD. Differential Revision: http://reviews.llvm.org/D17952 llvm-svn: 262996
* [index] Add a message for the assertion, NFC.Argyrios Kyrtzidis2016-03-091-1/+2
| | | | llvm-svn: 262991
* [index] libclang: Make sure to treat forward ObjC protocols as ↵Argyrios Kyrtzidis2016-03-093-4/+17
| | | | | | | | ObjCProtocolRef declarations, and fix related crash. rdar://25035376 llvm-svn: 262985
* [index] Fix assertion hit when indexing re-declarations of built-in functions.Argyrios Kyrtzidis2016-03-092-0/+6
| | | | llvm-svn: 262984
* Readd testcase accidentally removed in r262888.Richard Smith2016-03-091-0/+2
| | | | llvm-svn: 262971
* [Modules] Modernize, use range-based loops.Davide Italiano2016-03-081-5/+2
| | | | llvm-svn: 262969
* Fix crash in access check for aggregate initialization of base classes. It'sRichard Smith2016-03-082-3/+71
| | | | | | | not obvious how to access-check these, so pick a conservative rule until we get feedback from CWG. llvm-svn: 262966
* Fix -Werror build.Richard Smith2016-03-081-1/+1
| | | | llvm-svn: 262965
* AArch64: remove tests of intrinsics completely duplicated elsewhere.Tim Northover2016-03-0817-2507/+0
| | | | llvm-svn: 262964
* P0017R1: In C++1z, an aggregate class can have (public non-virtual) base ↵Richard Smith2016-03-0812-130/+479
| | | | | | classes; these are initialized as if they were data members. llvm-svn: 262963
* Silence duplicate diagnostics because parsing of a standards-based attribute ↵Aaron Ballman2016-03-083-1/+10
| | | | | | triggers parsing diagnostics that may also be picked up during semantic analysis. llvm-svn: 262960
* Turning on the /bigobj flag for two more files that will not link with MSVC ↵Aaron Ballman2016-03-082-0/+12
| | | | | | 2015 Win64 Debug due to the section limit. llvm-svn: 262938
* Add Visual Studio native visualizers for several Clang typesMike Spertus2016-03-081-14/+83
| | | | | | | | | | | | | | | | This is one of a series of changes to improve the MSVC visualization of Clang types. This one focuses on Record and SubstTemplateTypeParmType meaning that, for example, a TemplateArgumentLoc no longer displays incomprehensibly in the locals window as {Argument={DeclArg={Kind=1 QT=0x033acb00 D=0xcccccccc {DeclType=???}}... but instead much more usefully as Type template parameter: SubstTemplateTypeParm: {Identifier (("T"))} => Record, {Identifier (("A"))} Additional types and improvements will be made in subsequent commits llvm-svn: 262933
* Bump libclang API version after r262318Kevin Funk2016-03-081-1/+1
| | | | llvm-svn: 262922
* Sema: Methods in unavailable classes are unavailableDuncan P. N. Exon Smith2016-03-082-1/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the template cases in r262050, when a C++ method in an unavailable struct/class calls unavailable API, don't diagnose an error. I.e., this case was failing: void foo() __attribute__((unavailable)); struct __attribute__((unavailable)) A { void bar() { foo(); } }; Since A is unavailable, A::bar is allowed to call foo. However, we were emitting a diagnostic here. This commit checks up the context chain from A::bar, in a manner inspired by SemaDeclAttr.cpp:isDeclUnavailable. I expected to find other related issues but failed to trigger them: - I wondered if DeclBase::getAvailability should check for `TemplateDecl` instead of `FunctionTemplateDecl`, but I couldn't find a way to trigger this. I left behind a few extra tests to make sure we don't regress. - I wondered if Sema::isFunctionConsideredUnavailable should be symmetric, checking up the context chain of the callee (this commit only checks up the context chain of the caller). However, I couldn't think of a testcase that didn't require first referencing the unavailable type; this, we already diagnose. rdar://problem/25030656 llvm-svn: 262921
* Sema: Treat 'strict' availability flag like unavailableDuncan P. N. Exon Smith2016-03-083-10/+12
| | | | | | | | | | | | | | | | | | | | | | This is a follow-up to r261512, which made the 'strict' availability attribute flag behave like 'unavailable'. However, that fix was insufficient. The following case would (erroneously) error when the deployment target was older than 10.9: struct __attribute__((availability(macosx,strict,introduced=10.9))) A; __attribute__((availability(macosx,strict,introduced=10.9))) void f(A*); The use of A* in the argument list for f is valid here, since f and A have the same availability. The fix is to return AR_Unavailable from DeclBase::getAvailability instead of AR_NotYetIntroduced. This also reverts the special handling added in r261163, instead relying on the well-tested logic for AR_Unavailable. rdar://problem/23791325 llvm-svn: 262915
* Add doxygen comments to bmiintrin.h's intrinsics.Ekaterina Romanova2016-03-081-0/+361
| | | | | | | | The doxygen comments are automatically generated based on Sony's intrinsics document. I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream. llvm-svn: 262895
* [analyzer] Fix missed leak from MSVC specific allocation functionsAnna Zaks2016-03-082-13/+99
| | | | | | | | | | | | Add the wide character strdup variants (wcsdup, _wcsdup) and the MSVC version of alloca (_alloca) and other differently named function used by the Malloc checker. A patch by Alexander Riccio! Differential Revision: http://reviews.llvm.org/D17688 llvm-svn: 262894
* Use class="svn" for features with SVN status.Richard Smith2016-03-081-2/+2
| | | | llvm-svn: 262889
* Move [[nodiscard]] tests into test/CXX tree.Richard Smith2016-03-082-5/+17
| | | | llvm-svn: 262888
* Define __has_cpp_attribute(fallthrough) to a more reasonable value. (What ↵Richard Smith2016-03-083-7/+18
| | | | | | year is it?!) llvm-svn: 262887
* Add accidentally forgotten testcase from r262881.Richard Smith2016-03-081-0/+70
| | | | llvm-svn: 262882
* P0188R1: add support for standard [[fallthrough]] attribute. This is almostRichard Smith2016-03-0822-59/+178
| | | | | | | | | | | | | | exactly the same as clang's existing [[clang::fallthrough]] attribute, which has been updated to have the same semantics. The one significant difference is that [[fallthrough]] is ill-formed if it's not used immediately before a switch label (even when -Wimplicit-fallthrough is disabled). To support that, we now build a CFG of any function that uses a '[[fallthrough]];' statement to check. In passing, fix some bugs with our support for statement attributes -- in particular, diagnose their use on declarations, rather than asserting. llvm-svn: 262881
* Implement support for [[nodiscard]] in C++1z that is based off existing ↵Aaron Ballman2016-03-0713-29/+108
| | | | | | support for warn_unused_result, and treat it as an extension pre-C++1z. This also means extending the existing warn_unused_result attribute so that it can be placed on an enum as well as a class. llvm-svn: 262872
* Module Debugging: Fix a crash when emitting debug info for nested tag typesAdrian Prantl2016-03-073-0/+27
| | | | | | | | whose DeclContext is not yet complete by deferring their emission. rdar://problem/24918680 llvm-svn: 262851
* [CLANG][AVX512][BUILTIN] Add builtin vcomi{ss|sd}Michael Zuckerman2016-03-073-0/+20
| | | | | | Differential Revision: http://reviews.llvm.org/D17919 llvm-svn: 262847
* python binding: expose compile command filenameGuillaume Papin2016-03-072-5/+22
| | | | | | | | Reviewers: compnerd, skalinichev Differential Revision: http://reviews.llvm.org/D17278 llvm-svn: 262845
* [ms-inline-asm][AVX512] Add ability to use k registers in MS inline asm + ↵Marina Yatsina2016-03-074-1/+21
| | | | | | | | | | | | | | | | | | | | | | fix bag with curly braces Until now curly braces could only be used in MS inline assembly to mark block start/end. All curly braces were removed completely at a very early stage. This approach caused bugs like: "m{o}v eax, ebx" turned into "mov eax, ebx" without any error. In addition, AVX-512 added special operands (e.g., k registers), which are also surrounded by curly braces that mark them as such. Now, we need to keep the curly braces and identify at a later stage if they are marking block start/end (if so, ignore them), or surrounding special AVX-512 operands (if so, parse them as such). This patch fixes the bug described above and enables the use of AVX-512 special operands. This commit is the the clang part of the patch. The clang part of the review is: http://reviews.llvm.org/D17766 The llvm part of the review is: http://reviews.llvm.org/D17767 Differential Revision: http://reviews.llvm.org/D17766 llvm-svn: 262842
* Implement __builtin_eh_return_data_regno for SPARC and SPARC64.Joerg Sonnenberger2016-03-072-0/+16
| | | | llvm-svn: 262838
* Describe the magic numbers returned by getEHDataRegisterNumber.Joerg Sonnenberger2016-03-071-0/+2
| | | | llvm-svn: 262837
* [CLANG][AVX512][BUILTIN] Adding new feature flag headed files and new ↵Michael Zuckerman2016-03-077-0/+317
| | | | | | | | BUILTIN vpermi2varq{i|t}{128|256|512}{mask|maskz} Differential Revision: http://reviews.llvm.org/D17917 llvm-svn: 262834
* [OPENMP] Codegen for distribute directive: fix bug in ordering of parameters.Carlo Bertolli2016-03-071-1/+1
| | | | llvm-svn: 262833
* Reapply r262741 [OPENMP] Codegen for distribute directiveCarlo Bertolli2016-03-078-113/+613
| | | | | | | | This patch provide basic implementation of codegen for teams directive, excluding all clauses except dist_schedule. It also fixes parts of AST reader/writer to enable correct pre-compiled header handling. http://reviews.llvm.org/D17170 llvm-svn: 262832
* Resolved Bug 26414.Amjad Aboud2016-03-072-3/+14
| | | | | | | | | https://llvm.org/bugs/show_bug.cgi?id=26414 Since interrupt handler must be returned with iret, tail call can't be used. Differential Revision: http://reviews.llvm.org/D17853 llvm-svn: 262830
* [CLANG][AVX512][BUILTIN] Adding new feature flag header file and new builtin ↵Michael Zuckerman2016-03-077-0/+378
| | | | | | | | vpmadd52{h|l}uq{128|256|512}{mask|maskz} Differential Revision: http://reviews.llvm.org/D17915 llvm-svn: 262820
* [MS ABI] Mangle symbols names longer than 4096 characters correctlyDavid Majnemer2016-03-072-42/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Really long symbols are hashed using MD5 and prefixed/suffixed with the usual sigils. There is an additional reason beyond the usual compatibility with MSVC, it is important to keep COFF symbols shorter than 0xFFFF because the CodeView debugging format has a maximum symbol/record size of 0xFFFF. There are some quirks worth noting: - Some mangled names reference other entities which are mangled separately. A quick example: int I; template <int *> struct S {}; S<I> s; In this case, the mangling for 's' doesn't depend directly on the mangling for 'I'. While 's' would need an MD5 hash if 'I' also needed one, the hash for 's' applied to the fully realized mangled name. In other words, the mangled name for 's' will not depend on the MD5 of the mangled name for 'I'. - Some mangled names, like the venerable CatchableType, embed the MD5 verbatim. - Finally, the complete object locator is handled as a special case. A complete object locators are mangled exactly like a VFTable except for a small deviation in the prefix sigils. However, complete object locators for hashed vftables result in a complete object locator whose name is identical to the vftable except for an additional suffix. llvm-svn: 262818
* [CLANG][AVX512][BUILTIN] Adding vpmultishiftqb{128|256|512}Michael Zuckerman2016-03-076-1/+175
| | | | | | Differential Revision: http://reviews.llvm.org/D17914 llvm-svn: 262817
* [ASTMatchers] Document that isAnyPointer() matcher also matches Objective-C ↵Felix Berger2016-03-062-2/+14
| | | | | | | | | | | | | | object pointers. Summary: Add test for Objective-C object pointer matching. Reviewers: aaron.ballman Subscribers: klimek Differential Revision: http://reviews.llvm.org/D17489 llvm-svn: 262806
* [Modules] Don't swallow errors when parsing optional attributes.Davide Italiano2016-03-062-3/+20
| | | | | | Differential Revision: http://reviews.llvm.org/D17787 llvm-svn: 262789
* Fixed -Wdocumentation warning - typo in a parameter nameSimon Pilgrim2016-03-051-1/+1
| | | | llvm-svn: 262783
* Misc: add a test for TargetParser usageSaleem Abdulrasool2016-03-051-0/+2
| | | | | | | | | Ensure that an invalid value passed to target parser does not cause an assertion in +Asserts builds. Supporting test for PR26839. llvm-svn: 262780
* clang-format: [JS] Support destructuring assignments in for loops.Daniel Jasper2016-03-052-0/+6
| | | | | | | | | | | | Before: for (let { a, b } of x) { } After: for (let {a, b} of x) { } llvm-svn: 262776
* [X86] AMD Bobcat CPU (btver1) doesn't support XSAVE Simon Pilgrim2016-03-052-3/+0
| | | | | | | | btver1 is a SSSE3/SSE4a only CPU - it doesn't have AVX and doesn't support XSAVE. Differential Revision: http://reviews.llvm.org/D17682 llvm-svn: 262772
* Add null check to diagnostic path for lambda captures.Richard Trieu2016-03-052-2/+15
| | | | | | | | Previously, the failed capture of a variable in nested lambdas may crash when the lambda pointer is null. Only give the note if a location can be retreived from the lambda pointer. llvm-svn: 262765
* Test commit: Fix run-on sentence in commentMike Spertus2016-03-051-2/+2
| | | | llvm-svn: 262764
OpenPOWER on IntegriCloud