summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Don't reduce the stack protector level given -fstack-protector.Rafael Espindola2014-05-221-3/+4
| | | | | | | | | Before -fstack-protector would always force a level of 1, even if the default was 2. Patch by Brad Smith. llvm-svn: 209479
* Use error_code::success() instead of make_error_code(llvm::errc::success).Alexander Kornienko2014-05-221-1/+1
| | | | llvm-svn: 209477
* Unify the name of compiler-rt builtins library on Linux.Alexey Samsonov2014-05-221-3/+4
| | | | | | | | | | Call it "libclang_rt.builtins-<arch>.a" to be consistent with sanitizers/profile libraries naming. Modify Makefile and CMake build systems and Clang driver accordingly. Fixes PR19822. llvm-svn: 209474
* If a class template specialization from one module has its definitionRichard Smith2014-05-222-0/+23
| | | | | | | | | instantiated in another module, and the instantiation uses a partial specialization, include the partial specialization and its template arguments in the update record. We'll need them if someone imports the second module and tries to instantiate a member of the template. llvm-svn: 209472
* Don't warn about undefined inline functions if they're dllexport/importHans Wennborg2014-05-221-0/+7
| | | | llvm-svn: 209471
* Remove limits on the number of fix-it hints and ranges in the DiagnosticsEngine.Alexander Kornienko2014-05-225-31/+14
| | | | | | | | | | | | | | | | | | | Summary: The limits on the number of fix-it hints and ranges attached to a diagnostic are arbitrary and don't apply universally to all users of the DiagnosticsEngine. The way the limits are enforced may lead to diagnostics generating invalid sets of fixes. I suggest removing the limits, which will also simplify the implementation. Reviewers: rsmith Reviewed By: rsmith Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D3879 llvm-svn: 209468
* Improved location for non-constant initializers diagnostics.Abramo Bagnara2014-05-222-26/+45
| | | | llvm-svn: 209466
* Update R600 datalayoutMatt Arsenault2014-05-221-1/+1
| | | | llvm-svn: 209464
* An inline function redeclaration does not drop the dllimport attributeHans Wennborg2014-05-221-2/+4
| | | | llvm-svn: 209449
* clang-format: Introduce DisableFormat that prevents formatting.Daniel Jasper2014-05-221-0/+16
| | | | | | | | | | | | | | | | | And "none" pseudo-style indicating that formatting should be not applied. (1) Using .clang-format with "DisableFormat: true" effectively prevents formatting for all files within the folder containing such .clang-format file. (2) Using -fallback-style=none together with -style=file prevents formatting when .clang-format is not found, which can be used in on-save callback. Patch by Adam Strzelecki. Thank you! llvm-svn: 209446
* clang-format: Don't use Allman brace breaking for ObjC blocks.Daniel Jasper2014-05-221-1/+2
| | | | | | It just seems wrong. This fixes llvm.org/PR19736. llvm-svn: 209440
* clang-format: Fix corner case in AllowShortBlocksOnASingleLine.Daniel Jasper2014-05-221-2/+1
| | | | | | | | | | | | | | | | Before: template <int> struct A4 { A4() { } }; After: template <int i> struct A4 { A4() {} }; This fixes llvm.org/PR19813 (at least the part that isn't working as intended). llvm-svn: 209438
* MachO: look for nearby tools on all MachO platforms.Tim Northover2014-05-221-8/+8
| | | | | | | | | | | | | This brings "-arch armv7m" (etc) behaviour more in line with what's expected for developers on OS X, and allows Clang to find an "ld" (for example) in the same directory instead of using the default /usr/bin/ld. Unfortunately no test because it relies on the specific place Clang is running from. rdar://problem/16427320 llvm-svn: 209437
* Revert "TMP"Tim Northover2014-05-221-8/+8
| | | | | | This reverts r209433. Sorry about that, it needs a test & better message. llvm-svn: 209435
* MachO: perform ARM ABI detection even for non-Darwin triples.Tim Northover2014-05-221-1/+1
| | | | | | | | When "-arch armv7m" is specified, we want "aapcs", for example. rdar://problem/16581138 llvm-svn: 209434
* TMPTim Northover2014-05-221-8/+8
| | | | llvm-svn: 209433
* Use stack protector strong by default on OpenBSD.Rafael Espindola2014-05-221-1/+1
| | | | | | | | | Use stack protector strong by default to match the base OS and ports/packages compiler policy. Patch by Brad Smith. llvm-svn: 209432
* clang-format: Fix braced list detection.Daniel Jasper2014-05-221-2/+6
| | | | | | | | | | | | | Before: static_assert(std::is_integral<int> {} + 0, ""); int a = std::is_integral<int> {} + 0; After: static_assert(std::is_integral<int>{} + 0, ""); int a = std::is_integral<int>{} + 0; llvm-svn: 209431
* clang-format: Fix incorrect braced init identification.Daniel Jasper2014-05-221-1/+2
| | | | | | | | | | | | | | | | | | | | Before: int foo(int i) { return fo1 {} (i); } int foo(int i) { return fo1 {} (i); } After: int foo(int i) { return fo1{}(i); } int foo(int i) { return fo1{}(i); } This fixes llvm.org/PR19812. llvm-svn: 209428
* clang-format: Store pointers to seen formatting states.Daniel Jasper2014-05-221-2/+8
| | | | | | | | | | | As the memory ownership is handled by the SpecificBumpPtrAllocator anyway, there is no need to duplicate states when inserting them into the Seen-set. This leads to an improvement of ~10% on the benchmark formatting file. No functional changes intended. llvm-svn: 209422
* clang-format: [JS] Understand line breaks in concatenated strings.Daniel Jasper2014-05-221-0/+7
| | | | | | | | | | | | | | Before: var literal = 'hello ' + 'world'; After: var literal = 'hello ' + 'world'; There is no reason to concatenated two string literals with a '+' unless the line break is intended. llvm-svn: 209413
* clang-format: Correctly identify multiplications in braces init lists.Daniel Jasper2014-05-222-1/+3
| | | | | | | | | | | | | Before: int i{a *b}; After: int i{a * b}; Also fix unrelated issue where braced init lists were counted as blocks and prevented single-line functions. llvm-svn: 209412
* This patch adds a helper class (CGLoopInfo) for marking memory instructions ↵Alexander Musman2014-05-228-4/+363
| | | | | | | | | | with llvm.mem.parallel_loop_access metadata. It also adds a simple initial version of codegen for pragma omp simd (it will change in the future to support all the clauses). Differential revision: http://reviews.llvm.org/D3644 llvm-svn: 209411
* clang-format: Correctly calculate line lenghts for nest blocks.Daniel Jasper2014-05-222-9/+17
| | | | | | | | | | | | | | | If simple (one-statement) blocks can be inlined, the length needs to be calculated correctly. Before (in JavaScript but this also affects lambdas, etc.): var x = { valueOf: function() { return 1; } }; After: var x = {valueOf: function() { return 1; }}; llvm-svn: 209410
* Frontend: Propagate ASTReaderListener API in ChainedASTReaderListenerJustin Bogner2014-05-221-2/+8
| | | | | | | | | | | | | | | | | ASTReaderListener's documentation states that visitInputFile will be called based on the return values of needsInputFileVisitation and needsSystemInputFileVisitation, but ChainedASTReaderListener may call these methods on a child listener based on the values returned by the other child. Even worse, the calls to visitInputFile may be short-circuited due to the use of the boolean or, so the calls to visit may not occur at all for the second listener. This updates ChainedASTReaderListener::visitInputFile to propagate the ASTReaderListener behaviour to both children. llvm-svn: 209394
* [C++11] Use 'nullptr'. Serialization edition.Craig Topper2014-05-2212-173/+179
| | | | llvm-svn: 209392
* [C++11] Use 'nullptr'. Frontend edition.Craig Topper2014-05-2219-160/+165
| | | | llvm-svn: 209389
* Add hasSameType overload to ASTContext for Type pointers. Switch a typeRichard Trieu2014-05-221-2/+1
| | | | | | comparison check to use this instead of calling Type::getCanonicalTypeInternal llvm-svn: 209378
* VirtualFileSystem: Fix a few directory traversal bugs in VFSWriterJustin Bogner2014-05-211-81/+92
| | | | | | | | | | | There are a couple of issues with writing VFS maps that are awkward to fix within the current mutually recursive approach. Instead, replace the algorithm with an iterative version that uses an explicit stack of directories. Includes tests for cases the old approach was tripping on. llvm-svn: 209332
* Provide an aka for the C++ operator name macro diagnosticAlp Toker2014-05-211-1/+1
| | | | llvm-svn: 209322
* Sema: Implement DR244David Majnemer2014-05-211-16/+9
| | | | | | | | | | | | | | | | Summary: Naming the destructor using a typedef-name for the class-name is well-formed. This fixes PR19620. Reviewers: rsmith, doug.gregor Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3583 llvm-svn: 209319
* Improved recovery of switch statementSerge Pavlov2014-05-212-29/+38
| | | | | | | | | Make better diagnostic produced by erroneous switch statement. It fixes PR19022. Differential Revision: http://reviews.llvm.org/D3137 llvm-svn: 209302
* Move virtual methods out of line.Rafael Espindola2014-05-211-0/+26
| | | | | | | This is generally a good thing and in this case should also fix the BUILD_SHARED_LIBS=ON build (see pr19774). llvm-svn: 209300
* Make the parent-map use significantly less memory.Manuel Klimek2014-05-211-3/+37
| | | | | | | | | | | On test files I ran this on, memory consumption overall went down from 2.5G to 2G, without performance regressions. I also investigated making DynTypedNode by itself smaller (by pulling out pointers for everything that doesn't fit in 8 bytes). This led to another 200-300MB saved, but also introduced a significant regression in performance due to the memory management overhead. llvm-svn: 209297
* clang-format: Fix corner case working around one-per-line dict literals.Daniel Jasper2014-05-211-2/+4
| | | | | | | | | | | | | | | Before: var object_literal_with_long_name = { a: 'aaaaaaaaaaaaaaaaaa', b: 'bbbbbbbbbbbbbbbbbb' }; After: var object_literal_with_long_name = { a: 'aaaaaaaaaaaaaaaaaa', b: 'bbbbbbbbbbbbbbbbbb' }; llvm-svn: 209296
* clang-format: Fix incorrect macro call detection.Daniel Jasper2014-05-211-1/+3
| | | | | | | | | | | | | In: struct A { A() noexcept(....) {} }; 'A()' is not a macro call. This fixes llvm.org/PR19814. llvm-svn: 209294
* clang-format: [JS] Support different function literal style.Daniel Jasper2014-05-213-5/+48
| | | | | | | | | | | | | | | | | Before: goog.array.forEach(array, function() { doSomething(); doSomething(); }, this); After: goog.array.forEach(array, function() { doSomething(); doSomething(); }, this); llvm-svn: 209291
* Make global named registers internal variablesRenato Golin2014-05-211-0/+3
| | | | llvm-svn: 209289
* DeclVisitor is not used here.Yaron Keren2014-05-211-1/+0
| | | | llvm-svn: 209285
* Preprocessor: support defined() with operator names for MS compatibilityAlp Toker2014-05-212-45/+51
| | | | | | | | | Also flesh out missing tests, improve diagnostic QOI and fix a couple of corner cases found in the process. Fixes PR10606. llvm-svn: 209276
* [C++11] Use 'nullptr'. Parser edition.Craig Topper2014-05-2113-314/+329
| | | | llvm-svn: 209275
* [C++11] Use 'nullptr'. CodeGen edition.Craig Topper2014-05-2146-854/+895
| | | | llvm-svn: 209272
* SourceManager: Use setMainFileID() consistentlyAlp Toker2014-05-211-3/+5
| | | | | | | | | | | Eliminate createMainFileID() / createMainFileIDForMemBuffer() utility functions. These didn't add much convenience and conflated two distinct operations. This change makes things easier to follow by providing a consistent interface and getting rid of a bunch of cast-to-voids. llvm-svn: 209266
* [objcmt] Make sure we don't edit the return type to add 'instancetype' if ↵Argyrios Kyrtzidis2014-05-211-4/+8
| | | | | | | | the return type is already that. rdar://16961577 llvm-svn: 209264
* Update for paired llvm commit with AsmVerbose.Eric Christopher2014-05-211-6/+1
| | | | llvm-svn: 209261
* VirtualFileSystem: Fix false positives in YAMLVFSWriter::containedInJustin Bogner2014-05-201-1/+10
| | | | | | | | Checking if a path starts with another path isn't sufficient for determining if one is contained within the heirarchy of the other. We need to ensure that the substring ends at a directory boundary. llvm-svn: 209250
* Reduce string duplicationAlp Toker2014-05-201-7/+2
| | | | | | | If we're so keen on saving a dynamic allocation to add the trailing space, we might as well do it in style. llvm-svn: 209247
* VirtualFileSystem: Add YAMLVFSWriter to generate VFS mapping filesJustin Bogner2014-05-201-0/+116
| | | | | | | | | This moves the logic to write a JSON VFS mapping from the C api into VirtualFileSystem, so that we can use it internally. No functional change. llvm-svn: 209241
* Update for llvm change to avoid having global flag setting in TargetMachine.Eric Christopher2014-05-201-3/+2
| | | | llvm-svn: 209239
* Fixed spelling.Yaron Keren2014-05-201-1/+1
| | | | llvm-svn: 209224
OpenPOWER on IntegriCloud