summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [Profile] Always build profile runtime library with -fPIC.Alexey Samsonov2014-11-142-12/+6
| | | | | | | | | This change removes libclang_rt.profile-pic-<arch>.a version of profile runtime. Instead, it's sufficient to always build libclang_rt.profile-<arch>.a with -fPIC, as it can be linked into both executables and shared objects. llvm-svn: 221952
* -Wsentinel: Suggest nullptr in C++11 instead of NULLReid Kleckner2014-11-132-3/+16
| | | | llvm-svn: 221945
* Fix assert/crash on invalid with __builtin_constant_p conditionals in ↵Richard Smith2014-11-132-1/+7
| | | | | | constant expressions. llvm-svn: 221942
* Objective-C. Fixes a regression caused by implementationFariborz Jahanian2014-11-136-15/+47
| | | | | | | | of new warning for deprecated method call for receiver of type 'id'. This addresses rdar://18960378 where unintended warnings being issued. llvm-svn: 221933
* PR21437, final part of DR1330: delay-parsing of exception-specifications. ThisRichard Smith2014-11-1328-79/+405
| | | | | | | is a re-commit of Doug's r154844 (modernized and updated to fit into current Clang). llvm-svn: 221918
* Remove -Wcast-qual as it's inherited from llvm since r221913.Roman Divacky2014-11-131-1/+1
| | | | llvm-svn: 221914
* Hook up FreeBSD AArch64 supportEd Maste2014-11-133-0/+205
| | | | | | Patch from Andrew Turner. llvm-svn: 221900
* clang-format: Format extern "C" blocks like namespace blocks.Nico Weber2014-11-132-3/+35
| | | | | | | | | | | | | | | | | | | | | namespace blocks act as if KeepEmptyLinesAtTheStartOfBlocks is always true, and aren't collapsed to a single line even if they would fit. Do the same for extern "C" blocks. Before, extern "C" { void ExternCFunction(); } was collapsed into `extern "C" { void ExternCFunction(); }`. Now it stays like it was. Fixes http://crbug.com/432640 and part of PR21419. llvm-svn: 221897
* clang-format: [Java] Support Java enums.Daniel Jasper2014-11-133-18/+124
| | | | | | | In Java, enums can contain a class body and enum constants can have arguments as well as class bodies. Support most of that. llvm-svn: 221895
* Support non-owned DiagnosticConsumer in SetupSerializedDiagnosticsAlexander Kornienko2014-11-132-6/+17
| | | | | | | | | | This fixes an assertion when running clang-tidy on a file having --serialize-diagnostics in compiler options. Committing a regression test for clang-tidy separately. Patch by Aaron Wishnick! llvm-svn: 221884
* [libclang] Make sure to visit the body of a CXXForRangeStmt.Argyrios Kyrtzidis2014-11-132-3/+7
| | | | llvm-svn: 221881
* [liblang] Handle CXXForRangeStmt during AST visitation.Argyrios Kyrtzidis2014-11-132-0/+19
| | | | llvm-svn: 221874
* CMake: Set HOST_LINK_VERSION on Darwin (PR21268)Hans Wennborg2014-11-134-3/+34
| | | | | | | | | | The Autoconf build already does this, but it was never ported to CMake. The host linker version affects the flags that Clang pass to the linker, notably whether it passes -demangle or not. http://reviews.llvm.org/D6239 llvm-svn: 221844
* Fixes test.Fariborz Jahanian2014-11-131-1/+1
| | | | llvm-svn: 221843
* Another test for PR19372, showing why we need to keep checking arguments ↵Richard Smith2014-11-121-1/+2
| | | | | | after a pack expansion. llvm-svn: 221838
* Add another testcase.Richard Smith2014-11-121-0/+9
| | | | llvm-svn: 221833
* PR19372: Keep checking template arguments after we see an argument packRichard Smith2014-11-122-28/+25
| | | | | | | | expansion into a parameter pack; we know that we're still filling in that parameter's arguments. Previously, if we hit this case for an alias template, we'd try to substitute using non-canonical template arguments. llvm-svn: 221832
* Temporary revert r221818 until all the problemsAnton Korobeynikov2014-11-125-25/+8
| | | | | | with objc stuff will be resolved. llvm-svn: 221829
* Now really fix the typo in the testAnton Korobeynikov2014-11-121-2/+2
| | | | llvm-svn: 221825
* Update the tests to handle proper result type of (?:)Anton Korobeynikov2014-11-122-3/+3
| | | | llvm-svn: 221824
* [Objective-C++ IRGen] do not generate .cxx_construct Fariborz Jahanian2014-11-122-1/+28
| | | | | | | for class that contains trivially-constructible struct ivar. rdar://18950072 llvm-svn: 221823
* Fix fallout from r219557Anton Korobeynikov2014-11-123-5/+22
| | | | | | | | | | | | | | | | | Summary: Consider the following nifty 1 liner: (0 ? csqrtl(2.0f) : sqrtl(2.0f)). One can easily obtain such code from e.g. tgmath. Right now it produces an assertion because we fail to do the promotion real => _Complex real. The case was properly handled previously (old handleOtherComplexFloatConversion routine), but was forgotten in the current version. This seems to be about fallout from r219557 Reviewers: chandlerc, rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6217 llvm-svn: 221821
* Fix brace init of unions with unnamed struct membersReid Kleckner2014-11-122-2/+14
| | | | | | | | The check for unnamed members was intended to skip unnamed bitfields, but it ended up skipping unnamed structs. This lead to an assertion in IRGen. llvm-svn: 221818
* Update Clang's SD-6 support to match N4200 (except for __has_cpp_attribute,Richard Smith2014-11-124-3/+80
| | | | | | which we don't yet implement). llvm-svn: 221816
* Pass the filter function_ref by value now that r221753 fixes the bugKaelyn Takata2014-11-121-3/+3
| | | | | | that was preventing pass-by-value from working correctly. llvm-svn: 221803
* Check for IRGen output when varag is usedFariborz Jahanian2014-11-121-0/+2
| | | | | | in -funknown-anytype mode (in lldb use). llvm-svn: 221796
* Update for llvm api change.Rafael Espindola2014-11-121-1/+1
| | | | llvm-svn: 221786
* Simplify code a bit by passing StreamFile to the BitstreamCursor constructor.Rafael Espindola2014-11-123-8/+4
| | | | llvm-svn: 221784
* Mark TypeDecls used in explicit destructor calls as referenced.Nico Weber2014-11-122-0/+14
| | | | | | Fixes PR21221. Patch by Axel Naumann, test by me. llvm-svn: 221771
* [PowerPC] Add vec_vsx_ld and vec_vsx_st intrinsicsBill Schmidt2014-11-124-6/+165
| | | | | | | | | | | | | | | | | | This patch enables the vec_vsx_ld and vec_vsx_st intrinsics for PowerPC, which provide programmer access to the lxvd2x, lxvw4x, stxvd2x, and stxvw4x instructions. New code in altivec.h defines these in terms of new builtins, which are themselves defined in BuiltinsPPC.def. The builtins are converted to LLVM intrinsics in CGBuiltin.cpp. Additional code is added to builtins-ppc-vsx.c to verify the correct generation of the intrinsics. Note that I moved the other VSX builtins so all VSX builtins will be alphabetical in their own section in BuiltinsPPC.def. There is a companion patch for LLVM. llvm-svn: 221768
* Mark TypeDecls used in member initializers as referenced.Nico Weber2014-11-122-0/+13
| | | | | | | | | | | | | | | | | | Without this, -Wunused-local-typedef would incorrectly warn on the two typedefs in this program: void foo() { struct A {}; struct B : public A { typedef A INHERITED; B() : INHERITED() {} typedef B SELF; B(int) : SELF() {} }; } llvm-svn: 221765
* clang-format a few lines, fixes one 80col violation. nfc.Nico Weber2014-11-121-6/+5
| | | | llvm-svn: 221764
* Try a different workaround for GCC 4.7.2 lambda capture bug. The previousRichard Smith2014-11-121-7/+8
| | | | | | workaround took us from wrong-code to ICE. llvm-svn: 221754
* Instantiate exception specifications when instantiating function types (otherRichard Smith2014-11-1215-241/+423
| | | | | | | | | | | | | | | | | | | | | | | | | | | than the type of a function declaration). We previously didn't instantiate these at all! This also covers the pathological case where the only mention of a parameter pack is within the exception specification; this gives us a second way (other than alias templates) to reach the horrible state where a type contains an unexpanded pack, but its canonical type does not. This is a re-commit of r219977: r219977 was reverted in r220038 because it hit a wrong-code bug in GCC 4.7.2. (That's gcc.gnu.org/PR56135, and affects any implicit lambda-capture of 'this' within a template.) r219977 was a re-commit of r217995, r218011, and r218053: r217995 was reverted in r218058 because it hit a rejects-valid bug in MSVC. (Incorrect overload resolution in the presence of using-declarations.) It was re-committed in r219977 with a workaround for the MSVC rejects-valid. r218011 was a workaround for an MSVC parser bug. (Incorrect desugaring of unbraced range-based for loop). llvm-svn: 221750
* PR21536: Fix a corner case where we'd get confused by a pack expanding into theRichard Smith2014-11-122-2/+18
| | | | | | | penultimate parameter of a template parameter list, where the last parameter is itself a pack, and build a bogus empty final pack argument. llvm-svn: 221748
* Fix this code to follow the coding style regarding anonymous namespaces andRichard Smith2014-11-122-108/+58
| | | | | | | static functions. Make a bunch of file-local functions static. Remove one unused static function revealed by this. llvm-svn: 221745
* Make Sema::CollectMultipleMethodsInGlobalPool() public.Douglas Gregor2014-11-121-2/+4
| | | | | | | It's useful for out-of-tree clients to be able to query the global Objective-C method pool, and only Sema can do that right now. llvm-svn: 221744
* clang/test/CodeGenCXX/debug-info-cxx1y.cpp: Add %itanium_abi_triple for ↵NAKAMURA Takumi2014-11-111-1/+1
| | | | | | incompatible MS targets. llvm-svn: 221741
* [clang/asan] Do not emit memcpy for trivial operator= when ↵Kostya Serebryany2014-11-112-1/+18
| | | | | | | | | | | | | | | | | | -fsanitize-address-field-padding >= 1 Summary: If we've added poisoned paddings to a type do not emit memcpy for operator=. Test Plan: regression tests. Reviewers: majnemer, rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6160 llvm-svn: 221739
* Have LookupMemberExprInRecord only call CorrectTypoDelayed, dropping theKaelyn Takata2014-11-112-68/+45
| | | | | | | | | code for calling CorrectTypo. Includes a needed fix for non-C++ code to not choke on TypoExprs (which also resolves a TODO from r220698). llvm-svn: 221736
* Create two helpers for running the typo-correction tree transform.Kaelyn Takata2014-11-112-16/+40
| | | | | | | | | | | | | One takes an Expr* and the other is a simple wrapper that takes an ExprResult instead, and handles checking whether the ExprResult is invalid. Additionally, allow an optional callback that is run on the full result of the tree transform, for filtering potential corrections based on the characteristics of the resulting expression once all of the typos have been replaced. llvm-svn: 221735
* Replace MemberTypoDiags and MemberExprTypoRecovery with lambdas.Kaelyn Takata2014-11-111-83/+39
| | | | llvm-svn: 221734
* Remove unnecessary semicolon.Kaelyn Takata2014-11-111-1/+1
| | | | llvm-svn: 221732
* clang-format: Improve handling of comments in binary expressions.Daniel Jasper2014-11-112-2/+4
| | | | | | | | | | | | | | | | | Before: b = a && // Comment b.c && d; After: b = a && // Comment b.c && d; This fixes llvm.org/PR21535. llvm-svn: 221727
* Make LookupResult be copyable to avoid decomposing an existing one andKaelyn Takata2014-11-113-16/+16
| | | | | | initializing a new one every time a copy is needed. llvm-svn: 221724
* Explicitly exclude keywords from the member validator.Kaelyn Takata2014-11-111-10/+9
| | | | | | Also simply and remove dead code from MemberExprTypoRecovery. llvm-svn: 221723
* Fix some formatting prior to refactoring the code.Kaelyn Takata2014-11-111-21/+23
| | | | llvm-svn: 221722
* Introduce -fsanitize-coverage=N flagKostya Serebryany2014-11-117-0/+47
| | | | | | | | | | | | | | | | | | | Summary: This change makes the asan-coverge (formerly -mllvm -asan-coverge) accessible via a clang flag. Companion patch to LLVM is http://reviews.llvm.org/D6152 Test Plan: regression tests, chromium Reviewers: samsonov Reviewed By: samsonov Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6153 llvm-svn: 221719
* Bundle conditions checked by UBSan with sanitizer kinds they implement.Alexey Samsonov2014-11-118-81/+87
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This change makes CodeGenFunction::EmitCheck() take several conditions that needs to be checked (all of them need to be true), together with sanitizer kinds these checks are for. This would allow to split one call into UBSan runtime into several calls in case different sanitizer kinds would have different recoverability settings. Tests should be fixed accordingly, I'm working on it. Test Plan: regression test suite. Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6219 llvm-svn: 221716
* Remove this test too.Fariborz Jahanian2014-11-111-0/+0
| | | | llvm-svn: 221715
OpenPOWER on IntegriCloud