summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Simplifying attribute generation with range-based for loops. No functional ↵Aaron Ballman2014-03-021-277/+187
| | | | | | changes intended. llvm-svn: 202654
* [C++11] ASTMatchers: Use standard static_assert and type traits.Benjamin Kramer2014-03-022-76/+74
| | | | llvm-svn: 202653
* [C++11] Use std::atomic instead of LLVM's.Benjamin Kramer2014-03-024-26/+20
| | | | | | No intended functionality change. llvm-svn: 202652
* [C++11] Work around an incompatibility between llvm::tie and std::tie.Benjamin Kramer2014-03-022-4/+6
| | | | llvm-svn: 202643
* [C++11] Switch from LLVM_STATIC_ASSERT to static_assert now that weChandler Carruth2014-03-023-11/+11
| | | | | | require host toolchains which support this. llvm-svn: 202640
* [C++11] Replace llvm::tie with std::tie.Benjamin Kramer2014-03-0263-134/+131
| | | | llvm-svn: 202639
* [C++11] Switch the clang-format LLVM style to use C++11 style bracedChandler Carruth2014-03-022-295/+283
| | | | | | | | | init list formatting. This suggestion has now gone into the LLVM coding standards, and is particularly relevant now that we're using C++11. Updated a really ridiculous number of tests to reflect this change. llvm-svn: 202637
* [C++11] Replace llvm::next and llvm::prior with std::next and std::prev.Benjamin Kramer2014-03-025-11/+11
| | | | llvm-svn: 202635
* [C++11] Remove an LLVM_OVERRIDE use that I missed in my previous commit.Craig Topper2014-03-021-1/+1
| | | | llvm-svn: 202630
* Switch all uses of LLVM_OVERRIDE to just use 'override' directly.Craig Topper2014-03-0222-56/+55
| | | | llvm-svn: 202625
* Add [extern_c] attribute for modules, allowing a C module to be imported ↵Richard Smith2014-03-0215-22/+201
| | | | | | within an extern "C" block in C++ code. llvm-svn: 202615
* [C++11] Switch from the llvm_move macro to directly calling std::move.Chandler Carruth2014-03-024-7/+7
| | | | llvm-svn: 202611
* [C++11] Expand and eliminate the LLVM_ENUM_INT_TYPE() macroAlp Toker2014-03-024-4/+4
| | | | llvm-svn: 202606
* [C++11] Drop legacy conditionals for TokenKind's underlying typeAlp Toker2014-03-022-6/+1
| | | | | | This relies on forward declaration of enums. llvm-svn: 202605
* Move private classes into anonymous namespaces.Benjamin Kramer2014-03-012-1/+5
| | | | llvm-svn: 202595
* [C++11] Replace verbose functors with succinct lambdasBenjamin Kramer2014-03-0112-227/+85
| | | | | | No functionality change. llvm-svn: 202590
* ASTReader.h: Prune \param ImportLoc according to r202560. [-Wdocumentation]NAKAMURA Takumi2014-03-011-1/+0
| | | | | FIXME: Give appropriate \param to llvm::ArrayRef<SubmoduleID> Overrides. llvm-svn: 202589
* [C++11] Remove use of LLVM_HAS_RVALUE_REFERENCES from Clang. This macroChandler Carruth2014-03-011-4/+0
| | | | | | is now always 1, as we're requiring C++11 now! llvm-svn: 202584
* Fixed an assertion failure related to bitfield lowering.Warren Hunt2014-03-012-2/+18
| | | | | | | | | When lowering a bitfield, CGRecordLowering would assign the wrong storage type to a bitfield in some cases and trigger an assertion. In these cases the layout was still correct, just the bitfield info was wrong. llvm-svn: 202562
* If a module A exports a macro M, and a module B imports that macro and #undef'sRichard Smith2014-03-0117-172/+594
| | | | | | | | | | | | | | it, importers of B should not see the macro. This is complicated by the fact that A's macro could also be visible through a different path. The rules (as hashed out on cfe-commits) are included as a documentation update in this change. With this, the number of regressions in libc++'s testsuite when modules are enabled drops from 47 to 7. Those remaining 7 are also macro-related, and are due to remaining bugs in this change (in particular, the handling of submodules is imperfect). llvm-svn: 202560
* Add Clang docs about MSVC compatibilityReid Kleckner2014-02-282-0/+122
| | | | | | | | | This documents some of the status of supported functionality in MSVC quirks mode. Some of this should be in http://clang.llvm.org/compatibility.html instead when things have stabilized. llvm-svn: 202559
* Fix leak in MicrosoftVTableContextReid Kleckner2014-02-281-0/+1
| | | | llvm-svn: 202558
* [analyzer] Fix for PR18394.Anton Yartsev2014-02-282-2/+23
| | | | | | Additional conditions that prevent useful nodes before call from being reclaimed. llvm-svn: 202553
* Reapply fixed "Honour 'use-external-names' in FileManager"Ben Langmuir2014-02-2813-19/+97
| | | | | | | | | | | | | | | | Was r202442 There were two issues with the original patch that have now been fixed. 1. We were memset'ing over a FileEntry in a test case. After adding a std::string to FileEntry, this still happened to not break for me. 2. I didn't pass the FileManager into the new compiler instance in compileModule. This was hidden in some cases by the fact I didn't clear the module cache in the test. Also, I changed the copy constructor for FileEntry, which was memcpy'ing in a (now) unsafe way. llvm-svn: 202539
* Tests for lexing of digit separators versus UCNs.Richard Smith2014-02-281-0/+20
| | | | llvm-svn: 202534
* Fix a minor bug in lexing pp-numbers with digit separators: if a pp-number ↵Richard Smith2014-02-282-0/+3
| | | | | | contains "'e+", the pp-number ends between the 'e' and the '+'. llvm-svn: 202533
* When completing Objective-C instance method invocations, perform a ↵Anders Carlsson2014-02-282-1/+54
| | | | | | contextual conversion to an Objective-C pointer type of the target expression if needed. This fixes code completion of method invocations where the target is a smart pointer that has an explicit conversion operator to an Objective-C type. llvm-svn: 202529
* Don't suggest non-static methods as corrections when they obviouslyKaelyn Uhrain2014-02-284-7/+41
| | | | | | | won't work (i.e. when not doing a member lookup and not in a method from the same class or a descendant class). llvm-svn: 202520
* Removing some unused functionality.Aaron Ballman2014-02-281-34/+0
| | | | llvm-svn: 202519
* Adding a test case to ensure that type attributes applied to the ↵Aaron Ballman2014-02-281-1/+5
| | | | | | decl-specifier are applied across all declarations in a group. llvm-svn: 202501
* Now that llvm's build system sets -install_name, we don't need to.Rafael Espindola2014-02-282-10/+0
| | | | llvm-svn: 202500
* CFG: Also apply the filter to the first block in a FilteredCFGBlockIterator.Benjamin Kramer2014-02-282-4/+14
| | | | | | PR18999. llvm-svn: 202491
* Add 'remark' diagnostic type in 'clang'Tobias Grosser2014-02-2818-21/+94
| | | | | | | | | | | | | | | | | | | | | | | A 'remark' is information that is not an error or a warning, but rather some additional information provided to the user. In contrast to a 'note' a 'remark' is an independent diagnostic, whereas a 'note' always depends on another diagnostic. A typical use case for remark nodes is information provided to the user, e.g. information provided by the vectorizer about loops that have been vectorized. This patch provides the initial implementation of 'remarks'. It includes the actual definiton of the remark nodes, their printing as well as basic parameter handling. We are reusing the existing diagnostic parameters which means a remark can be enabled with normal '-Wdiagnostic-name' flags and can be upgraded to an error using '-Werror=diagnostic-name'. '-Werror' alone does not upgrade remarks. This patch is by intention minimal in terms of parameter handling. More experience and more discussions will most likely lead to further enhancements in the parameter handling. llvm-svn: 202475
* [ASTUnit] Don't let the preamble diagnostics out-live the CompilerInstance ↵Argyrios Kyrtzidis2014-02-282-54/+114
| | | | | | | | | | that created them, this is inherently unsafe. Instead get the diagnostic info into a SourceManager-independent form. llvm-svn: 202471
* Add a testcase for r202437.Bob Wilson2014-02-282-0/+20
| | | | llvm-svn: 202468
* Fix crash with enable_if on constructors.Nick Lewycky2014-02-282-1/+9
| | | | llvm-svn: 202467
* Add support for OpenBSD SPARC assembler.Rafael Espindola2014-02-282-7/+38
| | | | | | Patch by Brad Smith. llvm-svn: 202462
* Add a -Wclass-varargs to warn on objects of any class type being passed ↵Richard Smith2014-02-286-10/+88
| | | | | | | | | | | | through an ellipsis. Since C++11 relaxed the rules on this, we allow a lot more bad code through silently, such as: const char *format = "%s"; std::experimental::string_view view = "foo"; printf(format, view); In this case, not only warn about a class type being used here, but also suggest that calling c_str() might be a good idea. llvm-svn: 202461
* Attempt to fix non-MSVC buildReid Kleckner2014-02-281-7/+10
| | | | llvm-svn: 202458
* -fdump-record-layouts: Sort nvbases by offset before printing themReid Kleckner2014-02-284-23/+38
| | | | | | It makes our -fdump-record-layouts a little more sane. llvm-svn: 202457
* Add -mcrbits/-mno-crbits to control the PowerPC CR-bit-tracking featureHal Finkel2014-02-282-0/+8
| | | | | | | The backend currently enables CR-bit tracking by default at -O2 and higher. These flags allow the user to override that default. llvm-svn: 202453
* "&&&" != "&&"Richard Trieu2014-02-271-1/+1
| | | | llvm-svn: 202444
* Revert "Honour 'use-external-names' in FileManager"Ben Langmuir2014-02-2711-86/+13
| | | | | | Revert r202442, which broke the buildbots. llvm-svn: 202443
* Honour 'use-external-names' in FileManagerBen Langmuir2014-02-2711-13/+86
| | | | | | | | Pass through the externally-visible names that we got from the VFS down to FileManager, and test that this is the name showing up in __FILE__, diagnostics, and debug information. llvm-svn: 202442
* MS ABI: Attempt to fix DenseMap entry reference invalidationReid Kleckner2014-02-272-5/+6
| | | | llvm-svn: 202441
* Reapply r202420 hopefully fixed for other STLsBen Langmuir2014-02-272-64/+20
| | | | | | | Keep the copy constructor around, and add a FIXME that we should really remove it as soon as we have C++11 std::map's emplace function. llvm-svn: 202439
* Remove an assertion that no longer holds. <rdar://problem/16135814>Bob Wilson2014-02-271-1/+0
| | | | | | | | In r201528, I changed the PGO instrumentation counter for a "do" loop to not include the fall-through count. That fall-through count is included later, b it means that this assertion may fail for "do" loops. llvm-svn: 202437
* [-Wunreachable-code] always treat 'case:' and 'default:' cases as reachable.Ted Kremenek2014-02-272-8/+30
| | | | | | | | | | | This is a heuristic. Many switch statements, although they look covered over an enum, may actually handle at runtime more values than in the enum. This is overly conservative, as there are some cases that clearly can be ruled as being clearly unreachable, e.g. 'switch (42) { case 1: ... }'. We can refine this later. llvm-svn: 202436
* [CFG] record the original (now unreachable) block of 'case:' and 'default:' ↵Ted Kremenek2014-02-272-13/+25
| | | | | | cases. llvm-svn: 202435
* [analyzer] check for now possibly null predecessor edge.Ted Kremenek2014-02-271-0/+5
| | | | llvm-svn: 202434
OpenPOWER on IntegriCloud