summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [c++1z] Implement nested-namespace-definitions.Richard Smith2014-11-086-47/+77
| | | | | | | | | | | | | This allows 'namespace A::B { ... }' as a shorthand for 'namespace A { namespace B { ... } }'. We already supported this correctly for error recovery; promote that support to a full implementation. This is not the right implementation: we do not maintain source fidelity because we desugar the nested namespace definition in the parser. This is tricky to avoid, since the definition genuinely does inject one named entity per level in the namespace name. llvm-svn: 221574
* [c++1z] N4295: fold-expressions.Richard Smith2014-11-0829-9/+677
| | | | | | | | | | | | | | | | This is a new form of expression of the form: (expr op ... op expr) where one of the exprs is a parameter pack. It expands into (expr1 op (expr2onwards op ... op expr)) (and likewise if the pack is on the right). The non-pack operand can be omitted; in that case, an empty pack gives a fallback value or an error, depending on the operator. llvm-svn: 221573
* Check module signature when the module has already been loadedBen Langmuir2014-11-082-7/+30
| | | | | | | | | | We may need to verify the signature on subsequent imports as well, just like we verify the size/modtime: @import A; @import B; // imports A @import C; // imports A llvm-svn: 221569
* Fixed a buildbot failure.Fariborz Jahanian2014-11-081-2/+2
| | | | llvm-svn: 221568
* Fix unintended fallthrough in ASTReaderBen Langmuir2014-11-081-0/+2
| | | | llvm-svn: 221567
* [Objective-C Sema]. Issue availability/deprecated warning when Fariborz Jahanian2014-11-073-6/+25
| | | | | | | there is a uinque method found when message is sent to receiver of 'id' type. // rdar://18848183 llvm-svn: 221562
* ARM ABI: simplify decisions on whether args can be expanded.Tim Northover2014-11-075-55/+36
| | | | | | | | | | | | Homogeneous aggregates on AAPCS_VFP ARM need to be passed *without* being flattened (e.g. [2 x float] rather than "float, float") for various weird ABI reasons. However, this isn't the case for anything else; further, we know at the ABIArgInfo::getDirect callsites whether this flattening is allowed. So, we can get more unified ARM code, with a simpler Clang, by just using that knowledge directly. llvm-svn: 221559
* Introduce a SanitizerKind enum to LangOptions.Alexey Samsonov2014-11-0719-241/+257
| | | | | | | | | | | | | Use the bitmask to store the set of enabled sanitizers instead of a bitfield. On the negative side, it makes syntax for querying the set of enabled sanitizers a bit more clunky. On the positive side, we will be able to use SanitizerKind to eventually implement the new semantics for -fsanitize-recover= flag, that would allow us to make some sanitizers recoverable, and some non-recoverable. No functionality change. llvm-svn: 221558
* Use @rpath for ASan dylib in MakefilesKuba Brecka2014-11-071-2/+0
| | | | | | Reviewed at http://reviews.llvm.org/D6176 llvm-svn: 221557
* Fix style.Michael J. Spencer2014-11-072-9/+6
| | | | llvm-svn: 221546
* Fix clash of gcc toolchains in hexagon driver regression tests.Samuel Antao2014-11-075-10/+81
| | | | | | If clang was configured with a custom gcc toolchain (either by using GCC_INSTALL_PREFIX in cmake or the equivalent configure command), the path to the custom gcc toolchain path takes precedence to the one specified by -ccc-install-dir. This causes several regression tests to fail as they will be using an unexpected path. Adding the switch --gcc-toolchain="" in each test command is not enough as the hexagon toolchain implementation in the driver is not evaluating this argument. This commit modifies the hexagon toolchain to take the --gcc-toolchain="" argument into account when deciding the toolchain path, similarly to what is already done for other targets toolchains. Additionally, the faulty regression tests are modified in order to --gcc-toolchain="" be passed to the commands. llvm-svn: 221535
* Revert r221404 which caused lldb to not displayFariborz Jahanian2014-11-072-39/+0
| | | | | | vararg expressions. llvm-svn: 221533
* Improve comments in vtordisp tests: fix a typo, add a bit more clarityTimur Iskhodzhanov2014-11-071-10/+10
| | | | llvm-svn: 221524
* CodeGen, Itanium: Properly dllimport RTTI dataDavid Majnemer2014-11-072-8/+21
| | | | | | | | | | We would blindly assume that RTTI data should have the same linkage as the vtable because we didn't think the RTTI data was external. This oversight stemmed because we didn't take dllimport into account. This fixes PR21512. llvm-svn: 221511
* Return a DIDescriptor from CGDebugInfo::getDeclarationOrDefinition...Frederic Riss2014-11-062-5/+5
| | | | | | | ... instead of a DIScope that might wrap something that's not actually a DIScope (eg. a DIGlobalVariable); llvm-svn: 221481
* Remove references to the cortex-a9-mp CPU.Charlie Turner2014-11-063-5/+4
| | | | | | | | | | This CPU definition is redundant. The Cortex-A9 is defined as supporting multiprocessing extensions. Remove references to this CPU. This CPU was recently removed from LLVM. See http://reviews.llvm.org/D6057 Change-Id: I62ae7cc656fcae54fbaefc4b6976e77e694a8678 llvm-svn: 221458
* Don't manually insert L prefixes.Rafael Espindola2014-11-0637-352/+294
| | | | | | Simply marking the symbol private conveys the desire to hide them to LLVM. llvm-svn: 221451
* [X86] Slightly refactor default features for AMD bdver cpus (NFC). Also add ↵Andrea Di Biagio2014-11-062-12/+17
| | | | | | | | | | | | | | | | | | | missing checks to test for target features. This patch simplifies how default target features are set for AMD bdver2 and bdver1. In particular, method 'getDefaultFeatures' now implements a fallthrough from case 'CK_BDVER2' to case 'CK_BDVER1'. That is because 'bdver2' has the same features available in bdver1 plus BMI, FMA, F16C and TBM. This patch also adds missing checks for predefined macros in test predefined-arch-macros.c. In the case of BTVER2, the test now also checks for F16C, BMI and PCLMUL. In the case of BDVER3 and BDVER4, the test now also checks for the presence of FSGSBASE. Differential Revision: http://reviews.llvm.org/D6134 llvm-svn: 221449
* Fix for exception specification mismatch in explicit instantiation.Alexey Bataev2014-11-063-4/+47
| | | | | | | According to C++ standard if an exception-specification is specified in an explicit instantiation directive, it shall be compatible with the exception-specifications of other declarations of that function. This patch adds checks for this. Differential Revision: http://reviews.llvm.org/D5822 llvm-svn: 221448
* [X86] Use fallthroughs to reduce the number of calls to setFeatureEnabled ↵Craig Topper2014-11-061-98/+45
| | | | | | for different CPUs. llvm-svn: 221437
* Use FileCheck.Rafael Espindola2014-11-061-3/+4
| | | | llvm-svn: 221435
* Delete dead test.Rafael Espindola2014-11-061-19/+0
| | | | llvm-svn: 221434
* Patch for small addition to availability attribute.Fariborz Jahanian2014-11-052-0/+32
| | | | | | | | | This is to accept "NA" in place of vesion number for availability attribute. Used on introduced=NA to mean unavailable and deprecated=NA to mean nothing (not deprecated). rdar://18804883 llvm-svn: 221417
* cmake: Only export targets in the standalone buildReid Kleckner2014-11-051-21/+23
| | | | | | | Trying to fix bots that didn't like the fact that I exported targets that depended on LLVM without exporting targets from LLVM. llvm-svn: 221415
* Make it easier to build against a pre-built Clang package with CMakeReid Kleckner2014-11-052-0/+31
| | | | | | | | | | | | | Installing <prefix>/share/clang/cmake/ClangConfig.cmake makes CMake's builtin find_package() utility work with Clang. This also allows downstream consumers of Clang to statically link against libraries like clangAST and have that pull in dependencies like clangBasic and LLVMSupport. See the CMake docs on packages: http://www.cmake.org/cmake/help/v3.0/manual/cmake-packages.7.html llvm-svn: 221411
* Thread Safety Analysis: move warnings on range-based for loops out of betaDeLesley Hutchins2014-11-051-11/+9
| | | | | | and into -Wthread-safety. llvm-svn: 221410
* This patch fixes a crash after rebuilding call AST ofFariborz Jahanian2014-11-052-0/+39
| | | | | | | | | | | | | an __unknown_anytype(...). In this case, we rebuild the vararg function type specially to convert the call expression to something that IRGen can handle. However, FunctionDecl as rebuilt in RebuildUnknownAnyExpr::resolveDecl is bogus and results in crash when accessing its params later on. This patch fixes the crash by rebuilding the FunctionDecl to match its new resolved type. rdar://15297105. John McCall, please review post-commit. llvm-svn: 221404
* cmake: Conditionalize CodeGen's dependency on intrinsics_genReid Kleckner2014-11-051-1/+10
| | | | | | | | Custom targets in cmake cannot be exported, and this dependency is only needed in the combined build to ensure that Intrinsics.gen is created before compiling CodeGen. In the standalone, all of LLVM is build first. llvm-svn: 221391
* [DebugInfo] Do not record artificial global initializer functions in the ↵Frederic Riss2014-11-052-5/+8
| | | | | | | | | | | | | | | DeclCache. When we are generating the global initializer functions, we call CGDebugInfo::EmitFunctionStart() with a valid decl which is describing the initialized global variable. Do not update the DeclCache with this key as it will overwrite the the cached variable DIGlobalVariable with the newly created artificial DISubprogram. One could wonder if we should put artificial subprograms in the DIE tree at all (there are vaild uses for them carrying line information though). llvm-svn: 221385
* IR: MDNode => Value: Update for LLVM API change in r221375Duncan P. N. Exon Smith2014-11-051-1/+1
| | | | llvm-svn: 221376
* Revert "clang-format: [js] Updates to Google's JavaScript style."Daniel Jasper2014-11-054-19/+21
| | | | | | | | This reverts commit eefd2eaad43c5c2b17953ae7ed1e72b28e696f7b. Apparently, this change was a bit premature. llvm-svn: 221365
* Remove superceded warning warn_forgotten_module_headerBen Langmuir2014-11-054-33/+8
| | | | | | | | | | | | This DefaultIgnore warning under -Wincomplete-module was firing on any module map files that happened to be parsed (it's only supposed to fire on headers), and it has been superceded by -Wnon-modular-include-in-module anyway. For compatibility, I rewired -Wincomplete-module to imply -Wnon-modular-include-in-module. llvm-svn: 221357
* Support LLVM_BUILD_STATIC.Rafael Espindola2014-11-052-5/+17
| | | | llvm-svn: 221346
* MS ABI: Correctly mangle CV qualifiers from typedefsWill Wilson2014-11-052-1/+14
| | | | llvm-svn: 221344
* clang-format: Add test to prevent regression in r221125.Daniel Jasper2014-11-051-1/+2
| | | | llvm-svn: 221339
* clang-format: Improve free-standing macro detection.Daniel Jasper2014-11-052-10/+12
| | | | | | | | | | | | Before: SOME_WEIRD_LOG_MACRO << "Something long enough to cause a line break"; After: SOME_WEIRD_LOG_MACRO << "Something long enough to cause a line break"; llvm-svn: 221338
* Mark darwin-debug-flags.c as REQUIRES:shell, due to quoting issue.NAKAMURA Takumi2014-11-051-0/+3
| | | | llvm-svn: 221332
* clang-format: Make it possible to (require 'clang-format)Justin Bogner2014-11-051-0/+2
| | | | | | | This makes the emacs integration ``provide`` a clang-format feature, so that a .emacs can ``require`` it. llvm-svn: 221330
* Debug info: Emit the correct type for the __FuncPtr field in a blockAdrian Prantl2014-11-052-2/+22
| | | | | | | | descriptor. rdar://problem/15984431 llvm-svn: 221326
* Filter out non-static class members when correcting non-member-references.Kaelyn Takata2014-11-052-7/+36
| | | | llvm-svn: 221319
* Fix the test failure on Windows introduced by r221279.Kuba Brecka2014-11-041-6/+6
| | | | | | http://reviews.llvm.org/D6018 llvm-svn: 221316
* Use backslashes to escape spaces and other backslashes in -dwarf-debug-flags.Bob Wilson2014-11-042-3/+25
| | | | | | | | | | The command line options are specified in a space-separated list that is an argument to -dwarf-debug-flags, so that breaks if there are spaces in the options. This feature came from Apple's internal version of GCC, so I went back to check how llvm-gcc handled this and matched that behavior. rdar://problem/18775420 llvm-svn: 221309
* Make helper function static. NFC.Benjamin Kramer2014-11-041-1/+2
| | | | llvm-svn: 221290
* Since the file has both ppc and ppc64 tests in it rename it.Roman Divacky2014-11-041-0/+0
| | | | llvm-svn: 221285
* Rewrite the test to not require asserts.Roman Divacky2014-11-041-72/+72
| | | | llvm-svn: 221284
* Use @rpath as LC_ID_DYLIB for ASan dylib on OS XKuba Brecka2014-11-043-10/+39
| | | | | | | | Change the LC_ID_DYLIB of ASan's dynamic libraries on OS X to be set to "@rpath/libclang_rt.asan_osx_dynamic.dylib" and similarly for iossim. Clang driver then sets the "-rpath" to be the real path to where clang currently has the dylib (because clang uses the relative path to its current executable). This means if you move the compiler or install the binary release, -fsanitize=address will link to the proper library. Reviewed at http://reviews.llvm.org/D6018 llvm-svn: 221279
* Re-enable this test on Windows since it passes with GnuWin32 env.exe.Yaron Keren2014-11-041-5/+6
| | | | llvm-svn: 221271
* Remove "REQUIRES:shell" from tests. They work for me.NAKAMURA Takumi2014-11-045-7/+0
| | | | llvm-svn: 221269
* clang/test/Tooling: Remove mention to PR15590 out of a couple of tests. They ↵NAKAMURA Takumi2014-11-042-6/+0
| | | | | | are suppressed with another issue. llvm-svn: 221267
* clang/test/Tooling: [PR15590] Avoid backslashes in JSON. Should work on win32.NAKAMURA Takumi2014-11-043-15/+3
| | | | llvm-svn: 221266
OpenPOWER on IntegriCloud