summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Sema: __assume with side effects shouldn't result in invalid AST nodesDavid Majnemer2015-02-261-1/+1
| | | | | | | | We'd diagnose an __assume expression which contained a function call. This would result in us wrongly returning ExprError, causing mysterious failures later on. llvm-svn: 230597
* Silence unused variable warning in NDEBUG buildReid Kleckner2015-02-261-2/+2
| | | | llvm-svn: 230590
* Fix a [-Werror,-Wreorder] initialization ordering error.Eric Christopher2015-02-261-2/+2
| | | | llvm-svn: 230589
* Add -fuse-line-directive flag to control usage of #line with -EReid Kleckner2015-02-264-23/+25
| | | | | | | | | | | | | | | | | | Currently -fms-extensions controls this behavior, which doesn't make much sense. It means we can't identify what is and isn't a system header when compiling our own preprocessed output, because #line doesn't represent this information. If someone is feeding Clang's preprocessed output to another compiler, they can use this flag. Fixes PR20553. Reviewers: rsmith Differential Revision: http://reviews.llvm.org/D5217 llvm-svn: 230587
* Remove some unused includes of llvm/IR headers from parts of Clang that reallyRichard Smith2015-02-262-2/+0
| | | | | | shouldn't depend on LLVM IR. llvm-svn: 230586
* Improvement on sized deallocation from r230160:Larisse Voufo2015-02-252-14/+92
| | | | | | Do not declare sized deallocation functions dependently on whether it is found in global scope. Instead, enforce the branching in emitted code by (1) declaring the functions extern_weak and (2) emitting sized delete expressions as a branching between both forms delete. llvm-svn: 230580
* UBSan: Use the correct function prologue for x32.Peter Collingbourne2015-02-251-4/+15
| | | | llvm-svn: 230571
* MS ABI: Turn throw into std::terminate for now, make try/catch "work"David Majnemer2015-02-251-7/+19
| | | | | | | This lets us compile programs which make use of exceptional constructs statically without executing any of them dynamically. llvm-svn: 230568
* [modules] Even if we already have a definition of a class, loading in anotherRichard Smith2015-02-252-6/+12
| | | | | | | | one can give us more lookup results (due to implicit special members). Be sure to complete the redecl chain for every kind of DeclContext before performing a lookup into it, rather than only doing so for NamespaceDecls. llvm-svn: 230558
* Allow (Object *)kMyGlobalCFObj casts without bridgingBen Langmuir2015-02-251-6/+9
| | | | | | | | | | | | | | | | Previously we allowed these casts only for constants declared in system headers, which we assume are retain/release-neutral. Now also allow them for constants in user headers, treating them as +0. Practically, this means that we will now allow: id x = (id)kMyGlobalConst; But unlike with system headers we cannot mix them with +1 values: id y = (id)(b ? kMyGlobalConst : [Obj newValAtPlusOne]); // error id z = (id)(b ? kSystemGlobalConst: [Obj newValAtPlusOne]); // OK Thanks to John for suggesting this improvement. llvm-svn: 230534
* Reland (2x) r230314, "Fix codegen for virtual methods that are (re-) ↵Reid Kleckner2015-02-251-0/+4
| | | | | | | | exported from multiple modules." This reverts commits r230477 and r230478. llvm-svn: 230526
* Reland r230446, "MS ABI: Try to respect external AST source record layouts"Reid Kleckner2015-02-251-59/+129
| | | | | | | | | It broke test/PCH/headersearch.cpp because it was using -Wpadding, which only works for Itanium layout. Before this commit, we would use Itanium record layout when using PCH, which is crazy. Now that the test uses an explicit Itanium triple, we can reland. llvm-svn: 230525
* Sema: Parenthesized bound destructor member expressions can be calledDavid Majnemer2015-02-2519-102/+73
| | | | | | | | | We would wrongfully reject (a.~A)() in both the destructor and pseudo-destructor cases. This fixes PR22668. llvm-svn: 230512
* Reland r230460 with a test fix for -Asserts builds.Nico Weber2015-02-251-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | Original CL description: Produce less broken basic block sequences for __finally blocks. The way cleanups (such as PerformSEHFinally) get emitted is that codegen generates some initialization code, then calls the cleanup's Emit() with the insertion point set to a good place, then the cleanup is supposed to emit its stuff, and then codegen might tack in a jump or similar to where the insertion point is after the cleanup. The PerformSEHFinally cleanup tries to just stash away the block it's supposed to codegen into, and then does codegen later, into that stashed block. However, after codegen'ing the __finally block, it used to set the insertion point to the finally's continuation block (where the __finally cleanup goes when its body is completed after regular, non-exceptional control flow). That's not correct, as that block can (and generally does) already ends in a jump. Instead, remember the insertion point that was current before the __finally got emitted, and restore that. Fixes two of the crashes in PR22553. llvm-svn: 230503
* Add support for inserting ArrayRef<FixItHint> into DiagnosticBuilder.Alexander Kornienko2015-02-251-8/+2
| | | | | | This is going to be needed in clang-tidy as more checks add complex fixits. llvm-svn: 230495
* Fix UTF8 chars to ASCII.NAKAMURA Takumi2015-02-252-4/+4
| | | | llvm-svn: 230479
* Whitespace.NAKAMURA Takumi2015-02-251-1/+1
| | | | llvm-svn: 230478
* Revert r230448, "Reland r230314 "Fix codegen for virtual methods that are ↵NAKAMURA Takumi2015-02-251-5/+1
| | | | | | (re-) exported from multiple modules."", since I have reverted r230446. llvm-svn: 230477
* Whitespace.NAKAMURA Takumi2015-02-251-8/+8
| | | | llvm-svn: 230475
* Revert r230446, "MS ABI: Try to respect external AST source record layouts"NAKAMURA Takumi2015-02-251-130/+60
| | | | | | It fails on Clang::PCH/headersearch.cpp for targeting msvc. llvm-svn: 230474
* clang-format: Fix spacing for function with ref-qualification ..Daniel Jasper2015-02-251-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .. when using SpacesInCStyleCastParentheses != SpacesInParentheses. Before: FormatStyle Spaces = getLLVMStyle(); Deleted &operator=(const Deleted &)& = default; Spaces.SpacesInParentheses = true; Deleted(const Deleted &)& = default; Spaces.SpacesInCStyleCastParentheses = true; Spaces.SpacesInParentheses= false; Deleted( const Deleted & )& = default; After: FormatStyle Spaces = getLLVMStyle(); Deleted &operator=(const Deleted &)& = default;; Spaces.SpacesInParentheses= true; Deleted( const Deleted & )& = default; Spaces.SpacesInCStyleCastParentheses = true; Spaces.SpacesInParentheses= false; Deleted(const Deleted &)& = default; Patch by Jean-Philippe Dufraigne. Thank you! llvm-svn: 230473
* Revert "Produce less broken basic block sequences for __finally blocks."Daniel Jasper2015-02-251-4/+3
| | | | | | | | | The test is broken on buildbots: http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_check/2279/ This reverts commit adda738b6dc533c42db5f5f5b31344098a3aba7d. llvm-svn: 230472
* [OPENMP] Rename methods of OpenMPRuntime class. NFC. Alexey Bataev2015-02-257-218/+199
| | | | llvm-svn: 230470
* [Mips] Support mips-r6 path suffix for Adnroid MIPS toolchainSimon Atanasyan2015-02-251-0/+2
| | | | | | | This path suffix is used if user provides the -mips32r6 command line options. llvm-svn: 230469
* Restores r228382, which was reverted in r228406.Sameer Sahasrabuddhe2015-02-251-1/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The original commit failed to handle "shift assign" (<<=), which broke the test mentioned in r228406. This is now fixed and the test added to the lit tests under SemaOpenCL. *** Original commit message from r228382 *** OpenCL: handle shift operator with vector operands Introduce a number of checks: 1. If LHS is a scalar, then RHS cannot be a vector. 2. Operands must be of integer type. 3. If both are vectors, then the number of elements must match. Relax the requirement for "usual arithmetic conversions": When LHS is a vector, a scalar RHS can simply be expanded into a vector; OpenCL does not require that its rank be lower than the LHS. For example, the following code is not an error even if the implicit type of the constant literal is "int". char2 foo(char2 v) { return v << 1; } Consolidate existing tests under CodeGenOpenCL, and add more tests under SemaOpenCL. llvm-svn: 230464
* Produce less broken basic block sequences for __finally blocks.Nico Weber2015-02-251-3/+4
| | | | | | | | | | | | | | | | | | | | | The way cleanups (such as PerformSEHFinally) get emitted is that codegen generates some initialization code, then calls the cleanup's Emit() with the insertion point set to a good place, then the cleanup is supposed to emit its stuff, and then codegen might tack in a jump or similar to where the insertion point is after the cleanup. The PerformSEHFinally cleanup tries to just stash away the block it's supposed to codegen into, and then does codegen later, into that stashed block. However, after codegen'ing the __finally block, it used to set the insertion point to the finally's continuation block (where the __finally cleanup goes when its body is completed after regular, non-exceptional control flow). That's not correct, as that block can (and generally does) already ends in a jump. Instead, remember the insertion point that was current before the __finally got emitted, and restore that. Fixes two of the crashes in PR22553. llvm-svn: 230460
* Add comments for two CleanupKinds.Nico Weber2015-02-251-0/+6
| | | | llvm-svn: 230459
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-2512-285/+36
| | | | llvm-svn: 230454
* Don't crash on missing '{' after __except or __finally, PR22687.Nico Weber2015-02-251-2/+8
| | | | | | Also add some general test/Parser coverage for SEH blocks. llvm-svn: 230449
* Reland r230314 "Fix codegen for virtual methods that are (re-) exported from ↵Reid Kleckner2015-02-251-1/+5
| | | | | | | | | | multiple modules." This reverts the revert from commit r230406. The changes in r230445 and r230446 make the test pass on Windows now. llvm-svn: 230448
* MS ABI: Try to respect external AST source record layoutsReid Kleckner2015-02-251-60/+130
| | | | | | | | Covered by existing tests in test/CodeGen/override-layout.c and test/CodeGenCXX/override-layout.cpp. Seriously, they found real bugs in my code. :) llvm-svn: 230446
* Add missing MD canonicalization to MS vtable builderReid Kleckner2015-02-251-0/+1
| | | | llvm-svn: 230445
* Remove slow and apparently pointless updating of all identifiers at the startRichard Smith2015-02-251-17/+0
| | | | | | of writing out an AST file. llvm-svn: 230428
* Fold ParseSEHTryBlockCommon() into its only caller. No behavior change.Nico Weber2015-02-251-7/+4
| | | | | | | ParseCXXTryBlockCommon() makes sense because it has two callers due to function try blocks. There are no SEH function try blocks. llvm-svn: 230426
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-2512-36/+285
| | | | | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. This reapplies r230044 with a fixed configure+make build and updated dependencies and testcase requirements. Over the last iteration this version adds - missing target requirements for testcases that specify an x86 triple, - a missing clangCodeGen.a dependency to libClang.a in the make build. rdar://problem/19104245 llvm-svn: 230423
* Make RedeclarableResult's ownership-transferring constructor be a moveRichard Smith2015-02-251-4/+4
| | | | | | constructor. llvm-svn: 230417
* [modules] Fix a bug that would result in a build with P paths through a moduleRichard Smith2015-02-251-0/+3
| | | | | | | graph with M modules to take O(P) time, not just O(M) time, when using explicit module builds. llvm-svn: 230412
* Revert r230314, "Fix codegen for virtual methods that are (re-) exported ↵NAKAMURA Takumi2015-02-251-5/+1
| | | | | | | | | | from multiple modules." It crashes for targeting (i686|x86_64)-win32. clang: clang/lib/AST/VTableBuilder.cpp:142: {anonymous}::FinalOverriders::OverriderInfo {anonymous}::FinalOverriders::getOverrider(const clang::CXXMethodDecl*, clang::CharUnits) const: Assertion `OverridersMap.count(std::make_pair(MD, BaseOffset)) && "Did not find overrider!"' failed. llvm-svn: 230406
* clang-format: Change location of stashed tokenJacques Pienaar2015-02-241-2/+4
| | | | | | Commit of patch in http://reviews.llvm.org/D7871 llvm-svn: 230395
* CUDA: Add option to allow host device functions to call host functionsJacques Pienaar2015-02-242-3/+18
| | | | | | Commiting code from review http://reviews.llvm.org/D7841 llvm-svn: 230385
* PR22673 again: diagnose use of the used decl, not the found decl. This is alsoRichard Smith2015-02-241-2/+2
| | | | | | | wrong (DiagnoseUseOfDecl should take both), but it's more consistent with what we do in other places. llvm-svn: 230384
* PR22673: Don't forget to check a constructor for deletedness when we use it toRichard Smith2015-02-241-3/+7
| | | | | | implicitly construct a temporary in a reference binding. llvm-svn: 230381
* MS extensions: Properly diagnose address of MS property declReid Kleckner2015-02-242-3/+6
| | | | | | | | | | | | Summary: Fixes PR22671. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7863 llvm-svn: 230362
* ARM: Simplify PCS handling.Tim Northover2015-02-241-179/+9
| | | | | | | | The backend should now be able to handle all AAPCS rules based on argument type, which means Clang no longer has to duplicate the register-counting logic and the CodeGen can be significantly simplified. llvm-svn: 230349
* Commit patch for PR19649. Set the correct sign of wide character for ↵Michael Wong2015-02-241-1/+3
| | | | | | | | | | literals based on underlying type of wchar_t. Reviewed: http://reviews.llvm.org/D7559 Patch by Rachel Craig; Test cases by Hubert Tong. llvm-svn: 230333
* [OPENMP] Update codegen for 'omp flush' directive.Alexey Bataev2015-02-242-9/+5
| | | | | | | __kmpc_omp_flush() runtime library now has only one argument and is not a vararg anymore. This update makes the codegen compatible with these changes. llvm-svn: 230331
* [WinX86_64 ABI] Treat C99 _Complex as a structMichael Kuperstein2015-02-241-1/+1
| | | | | | | | | MSVC does not support C99 _Complex. ICC, however, does support it on windows x86_64, and treats it, for purposes of parameter passing, as equivalent to a struct containing two fields (for the real and imaginary part). Differential Revision: http://reviews.llvm.org/D7825 llvm-svn: 230315
* Fix codegen for virtual methods that are (re-) exported from multiple modules.Manuel Klimek2015-02-241-1/+5
| | | | | | | Fixes multiple crashes where a non-canonical decl would be used as key in a lookup. llvm-svn: 230314
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-2412-285/+36
| | | | | | | This reverts commit r230305. Off to fix another round of missing dependencies on various platforms. llvm-svn: 230309
* Don't load Framework module.map files when searching subdirectoriesBen Langmuir2015-02-241-2/+4
| | | | | | | | | | | This would cause frameworks to have spurious "redefinition" errors if they had both a (legacy) "module.map" and a (new) "module.modulemap" file and we happened to do a sub-directory search in that directory using a non-framework include path (e.g. -Ifoo/ -Ffoo/). For migration purposes it's very handy that the compiler will prefer the new spelling of the filename and not look at the old one if it doesn't need to. llvm-svn: 230308
OpenPOWER on IntegriCloud