summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [VTableBuilder] Use range-based for loops. No functional change intendedBenjamin Kramer2015-07-251-146/+96
| | | | llvm-svn: 243222
* [VTableBuilder] Turn functors into lambdasBenjamin Kramer2015-07-251-34/+24
| | | | | | No functional change intended. llvm-svn: 243221
* Capture 'this' so GCC 4.7 can find a static members.Benjamin Kramer2015-07-251-4/+6
| | | | llvm-svn: 243218
* [AST] Turn the callbacks of lookupInBases and forallBases into a function_refBenjamin Kramer2015-07-2512-256/+211
| | | | | | | | | This lets us pass functors (and lambdas) without void * tricks. On the downside we can't pass CXXRecordDecl's Find* members (which are now type safe) to lookupInBases directly, but a lambda trampoline is a small price to pay. No functionality change intended. llvm-svn: 243217
* [Modules] Wrap the main ModuleManager visitor in a function_ref.Benjamin Kramer2015-07-255-126/+86
| | | | | | | Avoids the awkward passing of an opaque void *UserData argument. No functional change intended. llvm-svn: 243213
* [clang-cl] Add fallback support for /ZlDavid Majnemer2015-07-252-1/+3
| | | | llvm-svn: 243207
* [CodeGen] Don't UBSan-ize the argument to __builtin_frame_addressDavid Majnemer2015-07-252-4/+11
| | | | | | | | | | | | | __builtin_frame_address requires its argument to be a constant expression which already implies that it cannot have undefined behavior. However, we used EmitScalarExpr to emit the argument causing UBSan to try to check for overflow. Instead, use the constant expression emission system. This fixes PR24256. llvm-svn: 243206
* [SemaTemplate] Detect instantiation of unparsed exceptions.Davide Italiano2015-07-252-1/+24
| | | | | | | | This fixes the clang crash reported in PR24000. Differential Revision: http://reviews.llvm.org/D11341 llvm-svn: 243196
* Fix test case.Akira Hatanaka2015-07-251-1/+1
| | | | | | | This is a follow-up to r243185, which made changes to pass subtarget feature "+reserve-x18" instead of backend option "-aarch64-reserve-x18". llvm-svn: 243189
* [AArch64] Pass subtarget feature "+reserve-x18" instead of passing backendAkira Hatanaka2015-07-251-5/+3
| | | | | | | | | | | | | | option "-aarch64-reserve-x18". This change is needed since backend options do not make it to the backend when doing LTO and are not capable of changing the behavior of code-gen passes on a per-function basis. rdar://problem/21529937 Differential Revision: http://reviews.llvm.org/D11462 llvm-svn: 243185
* Replacing some diagnostic string literals with tablegen equivalents because ↵Aaron Ballman2015-07-241-5/+3
| | | | | | the wording is identical; NFC. llvm-svn: 243169
* DI: Make getOrCreateLimitedType() return DICompositeType, NFCDuncan P. N. Exon Smith2015-07-242-7/+6
| | | | | | | | | Change `getOrCreateLimitedType()` to return a `DICompositeType` and remove the casts from its callers. Inside, I've strengthened a `cast` from `DICompositeTypeBase`, but the casts in the callers already prove that this is safe. There should be no functionality change here. llvm-svn: 243155
* Select the highest version of the mingw toolchain found using ↵Yaron Keren2015-07-242-13/+20
| | | | | | | | Generic_GCC::GCCVersion similar to the way Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple works. llvm-svn: 243153
* Base the sys-root/mingw/include path on sysroot and not on /usr.Yaron Keren2015-07-242-2/+2
| | | | | | Thanks to Richard Smith for pointing this out! llvm-svn: 243144
* Correct x86_64 Android fp128 mangled nameChih-Hung Hsieh2015-07-242-0/+26
| | | | | | | | | | These changes are for Android x86_64 targets to be compatible with current Android g++. https://llvm.org/bugs/show_bug.cgi?id=23897 Use 'g' and 'Cg' for "long double" and "long double _Complex" mangled type names. Differential Revision: http://reviews.llvm.org/D11466 llvm-svn: 243133
* DI: Make StaticDataMemberCache type-safe, NFCDuncan P. N. Exon Smith2015-07-242-3/+4
| | | | | | | Change `StaticDataMemberCache` to store references to `DIDerivedType` directly, and remove now-unnecessary casts from the accessors. llvm-svn: 243129
* Test commit.Chih-Hung Hsieh2015-07-241-3/+3
| | | | llvm-svn: 243125
* [test] Attempt to fix failing test in non-darwin bots.Argyrios Kyrtzidis2015-07-241-2/+2
| | | | llvm-svn: 243120
* [code-completion] Strip outer nullability annotations when completing method ↵Argyrios Kyrtzidis2015-07-243-9/+14
| | | | | | | | | | | | implementations. The outer nullability is transferred from the declaration to the implementation so including them is redundant. The inner ones are not transferred so they are kept to match the exact types. When we transfer the inner ones as well adding them in the implementation will become redundant and we should strip those as well. rdar://21737451 llvm-svn: 243119
* LLVM API Change: the Module always owns the DataLayoutMehdi Amini2015-07-249-38/+24
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 243115
* Correcting some comments. (1) the function is named throughUsingDecl() and ↵Aaron Ballman2015-07-241-3/+1
| | | | | | not throughUsingDeclaration(). (2) Testing shows that this does work for shadowed variables as well as shadowed functions. I could not find an example where this matcher was failing. NFC. llvm-svn: 243111
* Silence a "not all control paths return a value" warning from MSVC. Should ↵Aaron Ballman2015-07-241-1/+2
| | | | | | also silence a -Wreturn-type warning. NFC intended. llvm-svn: 243109
* Visual Studio is more permissive than other compilers; amends r243107 to fix ↵Aaron Ballman2015-07-241-1/+1
| | | | | | a compile error. llvm-svn: 243108
* Add an AST matcher, isFinal(), for testing whether a method or class ↵Aaron Ballman2015-07-244-0/+62
| | | | | | declaration are marked final. llvm-svn: 243107
* Apparently some of the bots add .svn dirs inside the test/Driver/Inputs Yaron Keren2015-07-241-22/+28
| | | | | | directory structure. Try to make mingw toolchain resilient to such surprises. llvm-svn: 243105
* Try to appease clang buildbot by forcing libstdc++ in mingw.cpp test.Yaron Keren2015-07-241-6/+6
| | | | llvm-svn: 243101
* Add extensive tests for the mingw toolchain and remove trailing slash from Arch.Yaron Keren2015-07-2431-88/+99
| | | | | | | | Address Richard Smith comments: remove the trailing seperator from the Arch variable, implement six mingw_* trees under tools/clangtest/Driver/Inputs and merge linux and Windows tests into a universal test that uses these trees. llvm-svn: 243098
* [clang-cl] Implement support for the /Zl flagDavid Majnemer2015-07-243-9/+26
| | | | | | | | | The flag allows users to specify that they do not want the object file to have any implicit /defaultlib directives. This fixes PR24236. llvm-svn: 243097
* [AST] Perform additional canonicalization for DependentSizedArrayTypeDavid Majnemer2015-07-242-3/+15
| | | | | | | | | | We treated DependentSizedArrayTypes with the same element type but differing size expressions as equivalently canonical. This would lead to bizarre behavior during template instantiation. This fixes PR24212. llvm-svn: 243093
* Cleanup ObjCInterfaceDecl lookup for ObjC literalsAlex Denisov2015-07-247-125/+117
| | | | llvm-svn: 243092
* Generating available_externally vtables for outline virtual functionsPiotr Padlewski2015-07-247-18/+222
| | | | | | | | | | | | | | Generating available_externally vtables for optimizations purposes. Unfortunatelly ItaniumABI doesn't guarantee that we will be able to refer to virtual inline method by name. But when we don't have any inline virtual methods, and key function is not defined in this TU, we can generate that there will be vtable and mark it as available_externally. This is patch will help devirtualize better. Differential Revision: http://reviews.llvm.org/D11441 llvm-svn: 243090
* [Static Analyzer] Some tests do not turn on core checkers. Running the ↵Gabor Horvath2015-07-244-4/+4
| | | | | | | | analyzers without the core checkers is not supported. Differential Revision: http://reviews.llvm.org/D11432 llvm-svn: 243088
* Fix the cc1as crash when it outputs assemblySteven Wu2015-07-242-0/+6
| | | | | | | | In clang cc1as_main, when the output file type is “asm”, AsmStreamer owns a formatted_raw_ostream which has a reference to FDOS (raw_ostream), so AsmStreamer must be closed before FDOS is closed. llvm-svn: 243085
* Fix the equal-vector-size rule for reinterpret_casts in C++John McCall2015-07-235-23/+61
| | | | | | | | | | | | | to consider the storage size of the vector instead of its sizeof. In other words, ban <3 x int> to <4 x int> casts, which produced invalid IR anyway. Also, attempt to be a little more rigorous, or at least explicit, about when enums are allowed in these casts. rdar://21901132 llvm-svn: 243069
* InstrProf: Fix a typo in the test for r243066Justin Bogner2015-07-231-1/+1
| | | | llvm-svn: 243068
* InstrProf: Don't extend coverage regions into the catch keywordJustin Bogner2015-07-232-1/+24
| | | | | | | | The catch keyword isn't really part of a region, so it's fairly meaningless to extend into it. This was usually harmless, but it could crash when catch blocks involved macros in strange ways. llvm-svn: 243066
* Add documentation for the objc_boxable attributeAlex Denisov2015-07-232-1/+29
| | | | llvm-svn: 243048
* Sema: Avoid a stack overflow on large CFGsDuncan P. N. Exon Smith2015-07-231-16/+24
| | | | | | | | | Large CFGs cause `checkForFunctionCall()` to overflow its stack. Break the recursion by manually managing the call stack instead. Patch by Vedant Kumar! llvm-svn: 243039
* Sema: Split out helper from checkForFunctionCall(), NFCDuncan P. N. Exon Smith2015-07-231-37/+37
| | | | | | | | | | Split out `hasRecursiveCallInPath()` from `checkForFunctionCall()` to flatten nesting and clarify the code. This also simplifies a follow-up patch that refactors the other logic in `checkForFunctionCall()`. Patch by Vedant Kumar! llvm-svn: 243038
* Updating the documentation for the hasAttr AST matcher, which behaves ↵Aaron Ballman2015-07-232-2/+4
| | | | | | somewhat differently when used within clang-query. Fixes PR24217. llvm-svn: 243029
* [Compiler-RT] Remove dependency on libgcc_s/ehRenato Golin2015-07-232-11/+4
| | | | | | | | | | | | | | Currently, for --rtlib=compiler-rt on GNU systems, we're assuming that one has libgcc_s and libgcc_eh as low-level libraries, which when used in conjunction with -lunwind or -lc++abi, breaks that assumption. My original fix was wrong, and this patch reverts it to prepare for a new flag to choose the unwinder/C++ libraries. For the time being, people can use "-lgcc_s -lgcc_eh" or "-lunwind -lc++abi" or any combination they need explicitly. llvm-svn: 243025
* Add missing files for objc_boxable feature.Alex Denisov2015-07-2312-0/+811
| | | | | | Original patch [r240761] is missing all new files because of committer's mistake. llvm-svn: 243018
* [X86][AVX512F] Add FP scalar intrinsicsAsaf Badouh2015-07-233-0/+669
| | | | | | | | intrinsics for: add/sub/mul/div/min/max in their FP scalar versions Differential Revision: http://reviews.llvm.org/D11418 llvm-svn: 243009
* [X86][AVX512BW] add madd and maddubs intrinsicsAsaf Badouh2015-07-233-0/+87
| | | | | | Differential Revision: http://reviews.llvm.org/D11420 llvm-svn: 242986
* Add test to verify we emit warning when the deprecated virtual function is ↵Davide Italiano2015-07-231-0/+6
| | | | | | | | overloaded. Suggested by Richard Smith. llvm-svn: 242980
* ArrayRef-ize a pointer/length pair.Richard Smith2015-07-232-17/+15
| | | | llvm-svn: 242977
* Downgrade error about adding 'dllimport' to used free function to warning ↵Hans Wennborg2015-07-222-4/+10
| | | | | | | | (PR24215) The code will still work as it can reference the function via its thunk. llvm-svn: 242973
* Move EHPersonality to CGCleanupDavid Majnemer2015-07-222-32/+33
| | | | | | | | This makes it possible to use EHPersonality in other parts of CodeGen. Differential Revision: http://reviews.llvm.org/D11440 llvm-svn: 242971
* [MS Compat] Allow _Atomic(Type) and 'struct _Atomic' to coexistDavid Majnemer2015-07-225-7/+69
| | | | | | | | | | | | | | | | | | | | | | MSVC 2013 ships, as part of its STL implementation, a class named '_Atomic'. This is unfortunate because this keyword is in conflict with the C11 keyword with the same name. Our solution was to disable this keyword when targeting MSVC 2013 and reenable it for 2015. However, this makes it impossible for clang's headers to make use of _Atomic. This is problematic in the case of libc++ as it makes heavy use of this keyword. Let the keywordness of _Atomic float under certain circumstances: the body of a class named _Atomic, or a class with a base specifier named _Atomic, will not have the keyword variant of _Atomic for the duration of the class body. This is sufficient to allow us to correctly handle _Atomic in the STL while permitting us to use _Atomic as a keyword everywhere else. Differential Revision: http://reviews.llvm.org/D11233 llvm-svn: 242970
* Fix dumb use-after-free bug introduced in r242868.Richard Smith2015-07-221-9/+9
| | | | llvm-svn: 242960
OpenPOWER on IntegriCloud