summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Enable DLL attribute propagation on explicit instantiation definitions (PR23770)Hans Wennborg2015-06-095-57/+79
| | | | | | | | This is a follow-up to r225570 which enabled adding DLL attributes when a class template goes from explicit instantiation declaration to explicit instantiation definition. llvm-svn: 239375
* MinGW: don't allow adding DLL attribute if template already has explicit ↵Hans Wennborg2015-06-093-1/+8
| | | | | | | | instantiation declaration This is a follow-up to r238266 which failed to take MinGW into account. llvm-svn: 239374
* Enable propagation of dll attributes to previously instantiated base class ↵Hans Wennborg2015-06-095-20/+75
| | | | | | | | | | | | | | | templates in some cases It is safe to add a dll attribute if the base class template previously only had an explicit instantiation declaration, or was implicitly instantiated. I both those cases, the members would not have been codegenned yet. In the case of explicit instantiation declaration this is natural, and for implicit instantiations, codegen is deferred (see r225570). This is work towards fixing PR23770. llvm-svn: 239373
* Narrow the -Wunsupported-dll-base-class-template warning.Hans Wennborg2015-06-094-32/+15
| | | | | | | | | | | | | Don't warn about not being able to propagate dll attribute to a base class template when that base already has a different attribute. MSVC doesn't actually try to do this; the first attribute that was propagated takes precedence, so Clang is already doing the right thing and there's no need to warn. (This is a step towards fixing PR21718.) llvm-svn: 239372
* [modules] Fix some visibility issues with default template arguments.Richard Smith2015-06-099-7/+60
| | | | | | | | | | | | | | | | | | | There are still problems here, but this is a better starting point. The main part of the change is: when doing a lookup that would accept visible or hidden declarations, prefer to produce the latest visible declaration if there are any visible declarations, rather than always producing the latest declaration. Thus, when we inherit default arguments (and other properties) from a previous declaration, we inherit them from the previous visible declaration; if the previous declaration is hidden, we already suppress inheritance of default arguments. There are a couple of other changes here that fix latent bugs exposed by this change. llvm-svn: 239371
* Eliminate unnecessary namespace to prevent conflicts.Tyler Nowicki2015-06-081-2/+1
| | | | llvm-svn: 239365
* Correct Loop Hint Diagnostic MessageTyler Nowicki2015-06-082-4/+5
| | | | | | When pragma clang loop unroll() is specified without an argument the diagnostic message should inform that user that 'full' and 'disable' are valid arguments (not 'enable'). llvm-svn: 239363
* Moved CPP CodeGen tests into CodeGenCXX.Tyler Nowicki2015-06-082-0/+0
| | | | llvm-svn: 239362
* Consider unsigned long for non-u/U decimal literals (C90/C++03)Hubert Tong2015-06-084-1/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This modifies Clang to reflect that under pre-C99 ISO C, decimal constants may have type `unsigned long` even if they do not contain `u` or `U` in their suffix (C90 subclause 6.1.3.2 paragraph 5). The same is done for C++ without C++11 which--because of undefined behaviour--allows for behaviour compatible with ISO C90 in the case of an unsuffixed decimal literal and is otherwise identical to C90 in its treatment of integer literals (C++03 subclause 2.13.1 [lex.icon] paragraph 2). Messages are added to the `c99-compat` and `c++11-compat` groups to warn on such literals, since they behave differently under the newer standards. Fixes PR 16678. Test Plan: A new test file is added to exercise both pre-C99/C++11 and C99/C++11-up on decimal literals with no suffix or suffixes `l`/`L` for both 32-bit and 64-bit `long`. In the file, 2^31 (being `INT_MAX+1`) is tested for the expected type using `__typeof__` and multiple declarations of the same entity. 2^63 is similarly tested when it is within the range of `unsigned long`. Preprocessor arithmetic tests are added to ensure consistency given that Clang (like GCC) uses greater than 32 bits for preprocessor arithmetic even when `long` and `unsigned long` is 32 bits and a pre-C99/C++11 mode is in effect. Tests added: test/Sema/PR16678.c Reviewers: fraggamuffin, rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D9794 llvm-svn: 239356
* Update test with target flag and amended resultsLeny Kholodov2015-06-081-10/+7
| | | | llvm-svn: 239298
* Fix for temporary variable names in stack reuse tests in revision 239294Leny Kholodov2015-06-082-16/+16
| | | | llvm-svn: 239296
* [CodeGen] Reuse stack space from unused function results (with more accurate ↵Leny Kholodov2015-06-085-13/+224
| | | | | | | | | | unused result detection) This patch fixes issues with unused result detection which were found in patch http://reviews.llvm.org/D9743. Differential Revision: http://reviews.llvm.org/D10042 llvm-svn: 239294
* [Driver] Inject the MSVC compatibility version into the tripleDavid Majnemer2015-06-086-31/+87
| | | | | | | Encoding the version into the triple will allow us to communicate to LLVM what functions it can expect to depend upon in the implementation. llvm-svn: 239273
* clang-cl: Implement /GL in terms of -flto.Peter Collingbourne2015-06-064-3/+9
| | | | | | | | No documentation yet; the linker needs more work. Differential Revision: http://reviews.llvm.org/D10270 llvm-svn: 239213
* Move a test from static-assert.cpp to DeclPrinterTestDavid Majnemer2015-06-054-9/+36
| | | | | | | | It's better not to rely on the diagnostics engine to pretty print the argument to decltype. Instead, exercise the functionality in DeclPrinterTest. llvm-svn: 239197
* Fix typo of function name.Eric Christopher2015-06-051-1/+1
| | | | llvm-svn: 239194
* Rename the single non-style conformant function in TargetCodeGenInfoEric Christopher2015-06-053-24/+24
| | | | | | and update all callers. llvm-svn: 239193
* Revert accidental commitDavid Majnemer2015-06-051-2/+7
| | | | | | This change was unrelated to r239170. llvm-svn: 239176
* [AST] There is no message for C++1z-style static_assertDavid Majnemer2015-06-053-9/+15
| | | | | | | | | | We would crash in the DeclPrinter trying to pretty-print the static_assert message. C++1z-style assertions don't have a message so we would crash. This fixes PR23756. llvm-svn: 239170
* [SPARC] Fix windows test failure after r239154.James Y Knight2015-06-051-15/+15
| | | | | | (Hopefully) llvm-svn: 239156
* [SPARC] Add multiarch include paths.James Y Knight2015-06-0526-0/+128
| | | | | | | | | | | Adds tests verifying the proper dirs are found in the Debian 8/GCC4.9 layout for sparc (32bit), sparc (32bit) with lib64 multilib, and sparc64. The test cases added here also cover r239047, which fixed the linker paths. llvm-svn: 239154
* Fix for PR14269: Clang crashes when a bit field is used as inline assemblerAlexander Musman2015-06-053-0/+36
| | | | | | | | | | | | input / output with memory constraint. One generally can't get address of a bit field, so the general solution is to error on such cases. GCC does the same. Patch by Andrey Bokhanko Differential Revision: http://reviews.llvm.org/D10086 llvm-svn: 239153
* [ARM] Use TargetParser to determine FPU subtarget featuresJohn Brawn2015-06-053-82/+22
| | | | | | | | | | | | | | | The main effect of this is to fix anomalies where certain -mfpu options didn't disable everything that they should causing strange behaviour when combined with -mcpu or -march values that themselves enabled fpu subtarget features, e.g. -mfpu=fpv5-dp-d16 with -march=armv7em previously behaved the same as -mfpu=fpv5-sp-d16 due to fp-only-sp not being disabled. Invalid -mfpu options now also give an error, which is consistent with the handling of the .fpu directive. Differential Revision: http://reviews.llvm.org/D10239 llvm-svn: 239152
* clang-format: More eagerly wrap trailing return types.Daniel Jasper2015-06-054-8/+13
| | | | | | | | | | | | | | | | | Before: template <typename T> auto aaaaaaaaaaaaaaaaaaaaaa(T t) -> decltype(eaaaaaaaaaaaaaaa<T>(t.a) .aaaaaaaa()); After: template <typename T> auto aaaaaaaaaaaaaaaaaaaaaa(T t) -> decltype(eaaaaaaaaaaaaaaa<T>(t.a).aaaaaaaa()); Also add a test case for a difficult template parsing case I stumbled accross. Needs fixing. llvm-svn: 239149
* C++ 11 rangify for loop.Yaron Keren2015-06-051-4/+3
| | | | llvm-svn: 239140
* clang-format: [JS] Let fat arrows have 'Assignment' precedence.Daniel Jasper2015-06-052-2/+9
| | | | | | | | | | | | | | | | | This is a more correct representation than using "Equality" introduced in r238942 which was a quick fix to solve an actual regression. According to the typescript spec, arrows behave like "low-precedence" assignments. Before: var a = a.aaaaaaa((a: a) => aaaaaaaaaaaaaaaaaaaaa(bbbbbbbbb) && aaaaaaaaaaaaaaaaaaaaa(bbbbbbb)); After: var a = a.aaaaaaa((a: a) => aaaaaaaaaaaaaaaaaaaaa(bbbbbbbbb) && aaaaaaaaaaaaaaaaaaaaa(bbbbbbb)); llvm-svn: 239137
* [Concepts] lex keywords: concept and requiresHubert Tong2015-06-053-2/+26
| | | | | | | | | | | | | | | | | | | | | | Summary: This patch enables lexing of `concept` and `requires` as keywords. Further changes which add messages for future keyword compat are to follow. Test Plan: Testing of C++14 + Concepts TS mode is added to `test/Lexer/keywords_test.cpp`, which expects that the new keywords are enabled under said mode. Reviewers: faisalv, fraggamuffin, rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D10233 llvm-svn: 239128
* Remove unused defaulted argument `IncludeTextualHeaders`.Sean Silva2015-06-042-9/+3
| | | | llvm-svn: 239123
* Test commit access.Hubert Tong2015-06-041-17/+17
| | | | | | Fixes trailing whitespace in lib/Sema/JumpDiagnostics.cpp. llvm-svn: 239112
* Simplify ARMTargetParser::parseArch(ARMTargetParser::getCanonical()), ↵Artyom Skrobov2015-06-042-10/+4
| | | | | | | | | | | | | | following r239099 Reviewers: rengolin Reviewed By: rengolin Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D10256 llvm-svn: 239101
* Fix terrible python goof in clang-format.py which broke my vimChandler Carruth2015-06-041-1/+1
| | | | | | | | | integration. Nothing is more important in life than clang-format integration with vim. ;] llvm-svn: 239098
* [CodeGen] Add testcase for r239002.Ahmed Bougacha2015-06-041-0/+24
| | | | | | Just realized I forgot to add it when committing. llvm-svn: 239093
* [PowerPC] This revision adds 68 of the missing "Predefined Functions for ↵Bill Seurer2015-06-044-65/+704
| | | | | | | | | | | | Vector Programming" from appendix A of the OpenPOWER ABI for Linux Supplement document. I also added tests for the new functions and updated another test that was looking for specific line numbers in error messages from altivec.h. https://llvm.org/bugs/show_bug.cgi?id=23679 http://reviews.llvm.org/D10131 llvm-svn: 239066
* C++11 rangify for loop.Yaron Keren2015-06-041-4/+2
| | | | llvm-svn: 239064
* Allow case-insensitive values for -mcpu for ARMGabor Ballabas2015-06-045-8/+21
| | | | | | | GCC allows case-insensitive values for -mcpu, -march and -mtune options. This patch implements the same behaviour for the -mcpu option. llvm-svn: 239059
* [SPARC] Fix multiarch path detection for sparc and sparcv9.James Y Knight2015-06-041-0/+8
| | | | llvm-svn: 239047
* [SPARC] Fix types of size_t, intptr_t, and ptrdiff_t on Linux.James Y Knight2015-06-042-17/+27
| | | | | | | | They should be 'int' instead of 'long int' everywhere else except NetBSD too, from what I gather in GCC's spec files. So, optimistically changing it for everyone else, too. llvm-svn: 239046
* Remove extraneous qualifiers due to "using namespace". NFCDouglas Katzman2015-06-042-10/+10
| | | | llvm-svn: 239038
* Use the appropriate PIE level for OpenBSD/sparc.Brad Smith2015-06-042-1/+3
| | | | llvm-svn: 239028
* Fix fragile source-col-map.c test-case.James Y Knight2015-06-041-2/+3
| | | | | | | | | | | The test passing was dependent upon your source tree being checked out in a directory with a long enough path, to cause the diagnostics to wrap at the expected locations. Use stdin instead, so that the error messages consistently use <stdin> as the filename, and get wrapped consistently. llvm-svn: 239009
* [CodeGen][NEON] Emit constants for "immediate" intrinsic arguments.Ahmed Bougacha2015-06-042-11/+62
| | | | | | | | | | | | | | | | | On ARM/AArch64, we currently always use EmitScalarExpr for the immediate builtin arguments, instead of directly emitting the constant. When the overflow sanitizer is enabled, this generates overflow intrinsics instead of constants, breaking assumptions in various places. Instead, use the knowledge of "immediates" to directly emit a constant: - teach the tablegen backend to emit the "immediate" modifiers - use those modifiers in the NEON CodeGen, on ARM and AArch64. Fixes PR23517. Differential Revision: http://reviews.llvm.org/D10045 llvm-svn: 239002
* Driver: Don't crash when generating crash reports for *-header inputsJustin Bogner2015-06-042-5/+23
| | | | | | | | | | If we crash while handling headers, the crash report mechanism currently tries to make a string out of a null pointer when it tries to make up a file extension. Map *-header input types to reasonable extensions to avoid this. llvm-svn: 238994
* [analyzer]Test commit fixing 80-column violation in comment. NFC.Devin Coughlin2015-06-041-1/+2
| | | | llvm-svn: 238993
* Save getArch() in a local var instead of calling it 20 times, etc.Douglas Katzman2015-06-041-80/+74
| | | | | | Differential Revision: http://reviews.llvm.org/D10224 llvm-svn: 238992
* Change big 'if' statement into a switch. NFCDouglas Katzman2015-06-031-15/+20
| | | | | | Differential Revision: http://reviews.llvm.org/D10223 llvm-svn: 238955
* [Hexagon] Reapply 238773 after fix to LLVM.Colin LeMahieu2015-06-031-1/+0
| | | | llvm-svn: 238948
* clang-format: [JS] Let fat arrows have 'Equality' precedence.Daniel Jasper2015-06-032-13/+21
| | | | | | | | | | | | | | | | | | | | | | | This fixes a regression in literal formatting: Before: aaaaaaaaaaaaa = { aaaaaaaaaaaaaaaaaaaaaaaaaaaa: (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) => aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, }; After: var aaaaaaaaaaaaaaaaaaaa = { aaaaaaaaaaaaaaaaaaaaaaaaaaaa: (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) => aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, }; Also apply no-else-after-return policy. llvm-svn: 238942
* Fix misleading comment. NFCDouglas Katzman2015-06-031-1/+1
| | | | llvm-svn: 238938
* [utils] Improvements to check_cfc.py to work better with some build systems.Russell Gallop2015-06-032-3/+15
| | | | | | | | | Recognise options to output dependency files and don't perform checks. Report input file name when reporting a check failure so it is more obvious in large build logs. Differential Revision: http://reviews.llvm.org/D10183 llvm-svn: 238928
* [utils] Add exact check to check_cfc.py dash_s_no_change.Russell Gallop2015-06-032-6/+44
| | | | | | | | | Files compiled with -via-file-asm should be byte for byte identical. This change improves the checking on dash_s_no_change to detect non-code differences. If there is a difference, the check goes on to compare code and debug to try and be more informative. llvm-svn: 238926
OpenPOWER on IntegriCloud