summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Use delegating ctors to reduce code duplication. NFC.Benjamin Kramer2015-03-063-47/+6
| | | | llvm-svn: 231476
* clang-format: Slightly change indentation rules in for loops.Daniel Jasper2015-03-062-4/+7
| | | | | | | | | | | | | | | | | | | | | | There was already a TODO to double-check whether the extra indenation makes sense. A slightly different case reveals that it is actively harmful: for (int i = 0; i < aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || bbbbbbbbbbbbbbbbbbbb < ccccccccccccccc; ++i) { } Here (and it is probably not a totally infrequent case, it just works out that "i < " is four spaces and so the four space extra indentation makes the operator precedence confusing. So, this will now instead be formatted as: for (int i = 0; i < aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || bbbbbbbbbbbbbbbbbbbb < ccccccccccccccc; ++i) { } llvm-svn: 231461
* Silence C4715 'not all control paths return a value' warnings.Yaron Keren2015-03-061-0/+1
| | | | llvm-svn: 231455
* Don't crash on non-public referenced dtors in toplevel classes.Nico Weber2015-03-062-2/+19
| | | | | | | Fixes PR22793, a bug that caused self-hosting to fail after the innocuous r231254. See the bug for details. llvm-svn: 231451
* Add a download link to the web page (PR22764)Hans Wennborg2015-03-061-0/+1
| | | | llvm-svn: 231431
* [modules] Rework merging of redeclaration chains on module import.Richard Smith2015-03-0512-194/+146
| | | | | | | | | | | | | | | | | | | | | | We used to save out and eagerly load a (potentially huge) table of merged formerly-canonical declarations when we loaded each module. This was extremely inefficient in the presence of large amounts of merging, and didn't actually save any merging lookup work, because we still needed to perform name lookup to check that our merged declaration lists were complete. This also resulted in a loss of laziness -- even if we only needed an early declaration of an entity, we would eagerly pull in all declarations that had been merged into it regardless. We now store the relevant fragments of the table within the declarations themselves. In detail: * The first declaration of each entity within a module stores a list of first declarations from imported modules that are merged into it. * Loading that declaration pre-loads those other entities, so that they appear earlier within the redeclaration chain. * The name lookup tables list the most recent local lookup result, if there is one, or all directly-imported lookup results if not. llvm-svn: 231424
* [PATCH] Patch to fix the AST for vector splat from any Fariborz Jahanian2015-03-052-2/+31
| | | | | | | | arithmetic type to a vector so that the arithmatic type matches the vector element type. Without which it crashes in Code Gen. rdar://20000762 llvm-svn: 231419
* Revert "[UBSan] Split -fsanitize=shift into -fsanitize=shift-base and ↵Alexey Samsonov2015-03-057-60/+54
| | | | | | | | | | | -fsanitize=shift-exponent." It's not that easy. If we're only checking -fsanitize=shift-base we still need to verify that exponent has sane value, otherwise UBSan-inserted checks for base will contain undefined behavior themselves. llvm-svn: 231409
* Clang side change following r231392.Zachary Turner2015-03-051-1/+1
| | | | | | | Changes call to PrintStackTrace(FILE*) to call PrintStackTrace(raw_ostream&) llvm-svn: 231393
* Recommit "[IAS] Teach -cc1as about the 'target-abi' option."Toma Tabacu2015-03-052-2/+8
| | | | | | | Added a REQUIRES for the Mips target. Also, switched to using plain CHECKs, at the suggestion of Eric Christopher. llvm-svn: 231363
* [test] Expand a bit on the test case from r231251. NFC.Argyrios Kyrtzidis2015-03-052-3/+5
| | | | llvm-svn: 231346
* Fix msvc-link.c test for environments with link.exe on PATHHans Wennborg2015-03-051-2/+2
| | | | | | Patch by Michael Edwards! llvm-svn: 231339
* MS ABI: Implement support for throwing a C++ exceptionDavid Majnemer2015-03-059-124/+530
| | | | | | | | | | | | | | | | | | | | | | | Throwing a C++ exception, under the MS ABI, is implemented using three components: - ThrowInfo structure which contains information like CV qualifiers, what destructor to call and a pointer to the CatchableTypeArray. - In a significant departure from the Itanium ABI, copying by-value occurs in the runtime and not at the catch site. This means we need to enumerate all possible types that this exception could be caught as and encode the necessary information to convert from the exception object's type to the catch handler's type. This includes complicated derived to base conversions and the execution of copy-constructors. N.B. This implementation doesn't support the execution of a copy-constructor from within the runtime for now. Adding support for that functionality is quite difficult due to things like default argument expressions which may evaluate arbitrary code hiding in the copy-constructor's parameters. Differential Revision: http://reviews.llvm.org/D8066 llvm-svn: 231328
* Give some obj-c rewriter tests that use MS pragmas a triple as a speculative fixReid Kleckner2015-03-052-6/+6
| | | | llvm-svn: 231320
* Temporary XFAILs for HexagonRick Foos2015-03-044-0/+4
| | | | | | | | | | | | | | Summary: Temporary XFAIL's until patches done. Reviewers: echristo, adasgupt, colinl Reviewed By: colinl Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8044 llvm-svn: 231318
* Implement section pragma feedback on r205810Reid Kleckner2015-03-044-8/+27
| | | | | | | Mostly short-circuits some conditionals. Adds target validation of sections passed to these pragmas. llvm-svn: 231317
* [analyzer] Bug fix: do not report leaks for alloca()Anton Yartsev2015-03-042-0/+14
| | | | llvm-svn: 231314
* Pass -dll to link.exe when building with -shared (PR22697)Hans Wennborg2015-03-042-1/+15
| | | | | | And start building a test for non-clang-cl link.exe invocations. llvm-svn: 231312
* Fix the clang self-host -Werror buildDavid Blaikie2015-03-041-1/+1
| | | | | | Sorry about the breakage. llvm-svn: 231302
* Add Clang support for PPC cryptography builtinsNemanja Ivanovic2015-03-049-1/+602
| | | | | | Review: http://reviews.llvm.org/D7951 llvm-svn: 231291
* Fix test/CodeGen/builtins.c for platforms that don't lower sjljReid Kleckner2015-03-043-0/+8
| | | | | | | | Opt in Win64 to supporting sjlj lowering. We have the backend lowering, so I think this was just an oversight because WinX86_64TargetCodeGenInfo doesn't inherit from X86_64TargetCodeGenInfo. llvm-svn: 231280
* Try to fix the build after removing DataLayoutPassReid Kleckner2015-03-041-3/+0
| | | | llvm-svn: 231278
* [analyzer] Individual configuration options can be specified for checkers.Gabor Horvath2015-03-0413-48/+272
| | | | | | | | | | Reviewed by: Anna Zaks Original patch by: Aleksei Sidorin Differential Revision: http://reviews.llvm.org/D7905 llvm-svn: 231266
* New ObjC warning: circular containers.Alex Denisov2015-03-047-10/+536
| | | | | | | | | | | | | | | | | | | | | This commit adds new warning to prevent user from creating 'circular containers'. Mutable collections from NSFoundation allows user to add collection to itself, e.g.: NSMutableArray *a = [NSMutableArray new]; [a addObject:a]; The code above leads to really weird behaviour (crashes, 'endless' recursion) and retain cycles (collection retains itself) if ARC enabled. Patch checks the following collections: - NSMutableArray, - NSMutableDictionary, - NSMutableSet, - NSMutableOrderedSet, - NSCountedSet. llvm-svn: 231265
* [Modules] Fix crash in Preprocessor::getLastMacroWithSpelling().Argyrios Kyrtzidis2015-03-043-3/+20
| | | | | | Macro names that got undefined inside a module may not have their MacroInfo set. llvm-svn: 231251
* Revert "[IAS] Teach -cc1as about the 'target-abi' option."Daniel Jasper2015-03-042-7/+2
| | | | | | | | | This reverts commit 0e41c8faeff75614cf4627533331d780ba3db030. This is breaking buildbots: http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/4668/ llvm-svn: 231248
* Prevent test from writing files.Daniel Jasper2015-03-041-4/+4
| | | | llvm-svn: 231247
* Adjust the changes from r230255 to bail out if the backend can't lowerJoerg Sonnenberger2015-03-044-26/+27
| | | | | | | __builtin_setjmp/__builtin_longjmp and don't fall back to the libc functions. llvm-svn: 231245
* [IAS] Teach -cc1as about the 'target-abi' option.Toma Tabacu2015-03-042-2/+7
| | | | | | | | | | | | | | | | | Summary: When using the IAS from clang, the 'target-abi' option gets passed to cc1as, but cc1as doesn't know about it and gives an "unknown argument" error. This is fixed by adding the 'CC1AsOption' flag to the 'target-abi' option in CC1Options.td. Reviewers: atanasyan, echristo, dsanders Reviewed By: dsanders Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7903 llvm-svn: 231244
* Move one more diagnostic into the new -Wformat-pedantic group.Daniel Jasper2015-03-042-8/+20
| | | | | | This was apparently overlooked in r231211. llvm-svn: 231242
* AT.isValid() should come before AT.matchesType()Seth Cantrell2015-03-041-30/+36
| | | | llvm-svn: 231213
* Add a format warning for "%p" with non-void* argsSeth Cantrell2015-03-046-69/+98
| | | | | | | | | | | | | | | | | | GCC -pedantic produces a format warning when the "%p" specifier is used with arguments that are not void*. It's useful for portability to be able to catch such warnings with clang as well. The warning is off by default in both gcc and with this patch. This patch enables it either when extensions are disabled with -pedantic, or with the specific flag -Wformat-pedantic. The C99 and C11 specs do appear to require arguments corresponding to 'p' specifiers to be void*: "If any argument is not the correct type for the corresponding conversion specification, the behavior is undefined." [7.19.6.1 p9], and of the 'p' format specifier "The argument shall be a pointer to void." [7.19.6.1 p8] Both printf and scanf format checking are covered. llvm-svn: 231211
* TypePrinter print __restrict if not in C99 modeJacques Pienaar2015-03-032-10/+14
| | | | | | | | | | | | | | restrict is a keyword in C99 but not in C++ while clang accepts __restrict for C++ code. Modify the TypePrinter to print __restrict when not processing C99 code. Printing restrict in C++ was problematic as printing the argument of int f(int * __restrict a) { ... } resulted in int *restrict a which is incorrect. http://reviews.llvm.org/D8048 llvm-svn: 231179
* Try to unbreak the Windows buildbots.Filipe Cabecinhas2015-03-031-1/+1
| | | | llvm-svn: 231170
* [analyzer] unix.Malloc: preserve AllocaRegion bound to __builtin_alloca().Anton Yartsev2015-03-031-13/+17
| | | | | | Binding __builtin_alloca() return value to the symbolic value kills previous binding to a AllocaRegion established by the core.BuiltinFunctions checker. Other checkers may rely upon this information. Rollback handling of __builtin_alloca() to the way prior to r229850. llvm-svn: 231160
* DebugInfo: Remove useless testDuncan P. N. Exon Smith2015-03-031-24/+0
| | | | | | | | This test doesn't provide any value (it just checks that the frontend produces exactly one compile unit), and it certainly isn't doing what the comment says. Noticed via IRC review of my update to it in r231083. llvm-svn: 231152
* [UBSan] Split -fsanitize=shift into -fsanitize=shift-base and ↵Alexey Samsonov2015-03-037-54/+60
| | | | | | | | | | | | | | | | | | | | | -fsanitize=shift-exponent. -fsanitize=shift is now a group that includes both these checks, so exisiting users should not be affected. This change introduces two new UBSan kinds that sanitize only left-hand side and right-hand side of shift operation. In practice, invalid exponent value (negative or too large) tends to cause more portability problems, including inconsistencies between different compilers, crashes and inadequeate results on non-x86 architectures etc. That is, -fsanitize=shift-exponent failures should generally be addressed first. As a bonus, this change simplifies CodeGen implementation for emitting left shift (separate checks for base and exponent are now merged by the existing generic logic in EmitCheck()), and LLVM IR for these checks (the number of basic blocks is reduced). llvm-svn: 231150
* [Sanitizers] Use uint64_t for bitmask of enabled sanitizers.Alexey Samsonov2015-03-032-41/+41
| | | | | | | The total number of sanitizers and sanitizer groups will soon reach 32. llvm-svn: 231149
* Fix program name in "clang -help"Sumanth Gundapaneni2015-03-031-1/+1
| | | | | | | | | | | | | | | | | With out this patch, "clang -help" prints "USAGE: clang-3 [options] <inputs>". It should either print USAGE: clang [options] <inputs> or USAGE: clang-3.7 [options] <inputs> With this patch, on Linux, it prints USAGE: clang-3.7 [options] <inputs> On Windows, it prints USAGE: clang.exe [options] <inputs> llvm-svn: 231124
* [PowerPC]Activate "vector bool long long" (and alternate spellings) as a ↵Bill Seurer2015-03-034-7/+32
| | | | | | | | | | | | valid type for Altivec support for Power. There are two test case updates for very basic testing. While I was editing cxx-altivec.cpp I also updated it to better match some other changes in altivec.c. Note: "vector bool long" was not also added because its use is considered deprecated. http://reviews.llvm.org/D7235 llvm-svn: 231118
* Split catch IRgen into ItaniumCXXABI and MicrosoftCXXABIReid Kleckner2015-03-039-386/+536
| | | | | | | | | Use llvm.eh.begincatch for Microsoft-style catches. This moves lots of CGException code into ItaniumCXXABI. Sorry for the blame pain. llvm-svn: 231105
* Disable the right RUN lineReid Kleckner2015-03-031-1/+1
| | | | llvm-svn: 231098
* Disabled the other test from r231086 (like in r231087) since it also had ↵Filipe Cabecinhas2015-03-031-1/+1
| | | | | | problems llvm-svn: 231096
* Support __attribute__((availability)) on Android.Dan Albert2015-03-033-1/+38
| | | | | | | | | | | | Reviewers: srhines Reviewed By: srhines Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7929 llvm-svn: 231092
* Don't force -pie for Android.Dan Albert2015-03-033-6/+26
| | | | | | | | | | | | | | | | | | | Summary: There is no -no-pie flag that can override this, so making it default to being on for Android means it is no longer possible to create non-PIE executables on Android. While current versions of Android support (and the most recent requires) PIE, ICS and earlier versions of Android cannot run PIE executables, so this needs to be optional. Reviewers: srhines Reviewed By: srhines Subscribers: thakis, volkalexey, cfe-commits Differential Revision: http://reviews.llvm.org/D8015 llvm-svn: 231091
* Disable a Clang test until the begincatch change landsReid Kleckner2015-03-031-1/+2
| | | | llvm-svn: 231087
* Migrate clang-format-vs plugin project to VS 2013Hans Wennborg2015-03-032-6/+3
| | | | | | | | | | The plugin still works fine in versions starting from 2010, but this was needed to make the project _build_ in VS 2013, which is the blessed version for building LLVM projects these days. http://reviews.llvm.org/D8021 llvm-svn: 231084
* DebugInfo: Move new hierarchy into place (clang)Duncan P. N. Exon Smith2015-03-03118-568/+1108
| | | | | | | Update testcases for LLVM change in r231082 to use the new debug info hierarchy. llvm-svn: 231083
* Lower _mm256_broadcastsi128_si256 directly to a vector shuffle.Juergen Ributzka2015-03-034-10/+2
| | | | | | | | | | | | | | Originally we were using the same GCC builtins to lower this AVX2 vector intrinsic. Instead we will now lower it directly to a vector shuffle. This will not only allow LLVM to generate better code, but it will also allow us to remove the GCC intrinsics. Reviewed by Andrea This is related to rdar://problem/18742778. llvm-svn: 231081
* [SDK modernizer]. Patch fixes driver's lack ofFariborz Jahanian2015-03-032-0/+10
| | | | | | | recognition of mernizer's -objcmt-migrate-property-dot-syntax option with a new test in test/Driver. rdar://19994452 llvm-svn: 231080
OpenPOWER on IntegriCloud