summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Objective-C ARC. First patch toward generating new APIsFariborz Jahanian2014-08-068-10/+49
| | | | | | | for Objective-C's array and dictionary literals. rdar://17554063. This is wip. llvm-svn: 214983
* FormatTokenLexer: Avoid non-static member initializer.NAKAMURA Takumi2014-08-061-2/+2
| | | | llvm-svn: 214976
* Remove unnecessary semicolon.Manuel Klimek2014-08-061-1/+1
| | | | llvm-svn: 214970
* clang-format: Correct SBPO_Always-behavior after function-like keywordsDaniel Jasper2014-08-063-1/+35
| | | | | | | | | | | | | | | | | Before: auto f (int x) -> decltype(x) { return sizeof(x); } int g () noexcept(someCall ()); static_assert(sizeof(char) == 1, "Your compiler is broken"); After: auto f (int x) -> decltype (x) { return sizeof (x); } int g () noexcept (someCall ()); static_assert (sizeof (char) == 1, "Your compiler is broken"); This fixes llvm.org/PR20559. Patch by Roman Kashitsyn, thank you! llvm-svn: 214969
* Fix sphinx warning.Dan Liew2014-08-061-1/+1
| | | | llvm-svn: 214967
* clang-format: Add special comments to disable formatting.Daniel Jasper2014-08-062-0/+20
| | | | | | | | | | | | | | | | With this patch: int ThisWillBeFormatted; // clang-format off int ThisWontBeFormatted; // clang-format on int Formatted; This is for regions where a significantly nicer code layout can be found knowing the content of the code. This fixes llvm.org/PR20463. llvm-svn: 214966
* clang-format: Fix indentation in multi-line placement new.Daniel Jasper2014-08-062-0/+6
| | | | | | | | | | | | | | Before: auto aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = new (aaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaa)) typename aaaaaaaaaaaaaaaaaaaaaaaa(); After: auto aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = new (aaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaa)) typename aaaaaaaaaaaaaaaaaaaaaaaa(); llvm-svn: 214964
* Fix modelling of non-lifetime-extended temporary destructors in the analyzer.Manuel Klimek2014-08-068-425/+715
| | | | | | | | | | | | | | | | | | | 1. Changes to the CFG: When creating the CFG for temporary destructors, we create a structure that mirrors the branch structure of the conditionally executed temporary constructors in a full expression. The branches we create use a CXXBindTemporaryExpr as terminator which corresponds to the temporary constructor which must have been executed to enter the destruction branch. 2. Changes to the Analyzer: When we visit a CXXBindTemporaryExpr we mark the CXXBindTemporaryExpr as executed in the state; when we reach a branch that contains the corresponding CXXBindTemporaryExpr as terminator, we branch out depending on whether the corresponding CXXBindTemporaryExpr was marked as executed. llvm-svn: 214962
* [Driver] Add missed include header.Simon Atanasyan2014-08-061-0/+2
| | | | llvm-svn: 214950
* [Driver] Move information about toolchain specific include directoriesSimon Atanasyan2014-08-062-17/+46
| | | | | | | | | | | | from the common driver code to the corresponding `MultilibSet` declarations. Now the `MultilibSet` can hold an optional callback function which is responsible to return a set of include directories specific for the toolchain. That allows to remove MIPS toolchain specific directories from `Linux::AddClangSystemIncludeArgs` method and simplify adding new directories in the future. llvm-svn: 214949
* MS ABI: Mangle lambdas which are given the same mangling numberDavid Majnemer2014-08-062-8/+20
| | | | | | | | It is possible for lambdas to get the same mangling number because they may exist in different mangling contexts. To handle this correctly, mangle the context into the name as well. llvm-svn: 214947
* Remove trailing whitespacesRui Ueyama2014-08-051-3/+3
| | | | llvm-svn: 214935
* MS ABI: Mangle empty type parameter packs compatiblyDavid Majnemer2014-08-052-5/+30
| | | | | | | | | | | The MS mangling scheme apparently has separate manglings for type and non-type parameter packs when they are empty. Match template arguments with parameters during mangling; check the parameter to see if it was destined to hold type-ish things or nontype-ish things. Differential Revision: http://reviews.llvm.org/D4792 llvm-svn: 214932
* Fix Driver tests that I broke on Windows in r214924Reid Kleckner2014-08-055-126/+126
| | | | llvm-svn: 214931
* Expose the name mangling C API to Python bindings.Eli Bendersky2014-08-052-0/+27
| | | | llvm-svn: 214930
* Make crash diagnostics on Windows the tiniest bit more usefulReid Kleckner2014-08-052-1/+4
| | | | | | | | | | | | | | This escapes any backslashes in the executable path and fixes an issue with a trailing quote when the main file name had to be quoted during printing. It's impossible to test this without putting backslashes or quotes into the executable path, so I didn't add automated tests. The crash diagnostics are still only useful if you're using bash on Windows, though. This should probably be writing a batch file instead. llvm-svn: 214924
* Introduce f[no-]max-unknown-pointer-align=[number] optionFariborz Jahanian2014-08-0510-5/+134
| | | | | | | | | to instruct the code generator to not enforce a higher alignment than the given number (of bytes) when accessing memory via an opaque pointer or reference. Patch reviewed by John McCall (with post-commit review pending). rdar://16254558 llvm-svn: 214911
* [Analyzer] fix for PR19102Anton Yartsev2014-08-052-0/+84
| | | | | | Newly-created unconsumed instance is now assumed escaped if an invoked constructor has an argument of a pointer-to-record type. llvm-svn: 214909
* Added f and m flags to be ignored. These will not display a warning. The ↵Arthur Marble2014-08-052-0/+20
| | | | | | | | | | revision for this patch is here: http://reviews.llvm.org/D4570. This will help with the rebuild of Debian with clang. Here is a link to the errors that Debian is experiencing: http://clang.debian.net/status.php?version=3.4.2&key=UNKNOWN_ARG llvm-svn: 214907
* Added flags that should be ignored for compatibility. These flags will displayArthur Marble2014-08-052-4/+170
| | | | | | | | | a warning. Revision for this patch is here: http://reviews.llvm.org/D4565. This patch will help with the rebuild of Debian with clang and many other projects that wish to use clang. Here is a link to the errors that Debian is experiencing: http://clang.debian.net/status.php?version=3.4.2&key=UNKNOWN_ARG llvm-svn: 214906
* [PR19983] SBPO_Always not covering all the cases.Chad Rosier2014-08-052-1/+3
| | | | | | | Patch by "Roman Kashitsyn" <romankashicin@gmail.com>. Phabricator revision: http://reviews.llvm.org/D4788 llvm-svn: 214904
* [AVX512] Add intrinsic for valignd/qAdam Nemet2014-08-053-0/+29
| | | | | | | | | | Note that similar to palingr, we could further optimize these to emit shufflevector when the shift count is <=64. This however does not change the overall design that unlike palignr we would still need the LLVM intrinsic corresponding to this intruction to handle the >64 cases. (palignr uses the psrldq intrinsic in this case.) llvm-svn: 214891
* ReleaseNotes: try to fix linksHans Wennborg2014-08-051-3/+3
| | | | llvm-svn: 214883
* ReleaseNotes: mention basic debug info and ASan support in the Windows blurbHans Wennborg2014-08-051-2/+3
| | | | llvm-svn: 214882
* ASTMatchersTests/matchesConditionallyWithCuda: Add -fno-ms-extensions, and ↵NAKAMURA Takumi2014-08-051-1/+4
| | | | | | | | get rid of initializer list. I am not sure whether -xcuda might imply -fno-ms-extensions. llvm-svn: 214876
* ASTMatchers.h: Fix an annotation. [-Wdocumentation-html]NAKAMURA Takumi2014-08-051-1/+1
| | | | | | Angle brackets, aka &lt; &gt;, should be escaped. llvm-svn: 214870
* [CMake] clangCodeGen: Update libdeps to add clangLex for PPChainedCallbacks.NAKAMURA Takumi2014-08-051-0/+1
| | | | llvm-svn: 214869
* clang-format: Add option to always break after a function's return type.Daniel Jasper2014-08-055-2/+39
| | | | | | | | | | This is required for GNU coding style, among others. Also update the configuration documentation. Modified from an original patch by Jarkko Hietaniemi, thank you! llvm-svn: 214858
* clang-format: Break before 'else' in Stroustrup style.Daniel Jasper2014-08-053-1/+14
| | | | | | | | | Seems to be the desired thing to do according to: http://www.stroustrup.com/Programming/PPP-style-rev3.pdf Patch by Jarkko Hietaniemi, thank you! llvm-svn: 214857
* Updating the documentation comment to list another parameter. No functional ↵Aaron Ballman2014-08-051-2/+4
| | | | | | changes. llvm-svn: 214856
* MachO: set sizeof result type to what embedded headers expect.Tim Northover2014-08-052-2/+3
| | | | | | | | | Embedded systems seem to have inherited Darwin's choise of "unsigned long" for size_t (via a bunch of headers), so we should respect that. rdar://problem/17872787 llvm-svn: 214854
* Adds AST matchers for matching CUDA declarations.Manuel Klimek2014-08-054-35/+207
| | | | | | Patch by Jacques Pienaar. llvm-svn: 214852
* MS ABI: Make the alias template mangling more correctDavid Majnemer2014-08-052-2/+2
| | | | llvm-svn: 214847
* ReleaseNotes: add blurb about Windows supportHans Wennborg2014-08-051-0/+15
| | | | llvm-svn: 214830
* CodeGenObjCXX: Add a test for r214699David Majnemer2014-08-051-0/+22
| | | | | | I forgot to add this with the changes for r214699. llvm-svn: 214829
* MS ABI: Aligned tentative definitions don't have CommonLinkageDavid Majnemer2014-08-052-2/+25
| | | | | | | int __declspec(align(16)) foo; is a tentative definition but the storage for that variable should not have CommonLinkage. llvm-svn: 214828
* [PPC64LE] Fix wrong IR for vec_sld and vec_vsldoiBill Schmidt2014-08-042-142/+4
| | | | | | | | | | | | | | | | | | | | My original LE implementation of the vsldoi instruction, with its altivec.h interfaces vec_sld and vec_vsldoi, produces incorrect shufflevector operations in the LLVM IR. Correct code is generated because the back end handles the incorrect shufflevector in a consistent manner. This patch and a companion patch for LLVM correct this problem by removing the fixup from altivec.h and the corresponding fixup from the PowerPC back end. Several test cases are also modified to reflect the now-correct LLVM IR. The vec_sums and vec_vsumsws interfaces in altivec.h are also fixed, because they used vec_perm calls intended to be recognized as vsldoi instructions. These vec_perm calls are now replaced with code that more clearly shows the intent of the transformation. llvm-svn: 214801
* ThreadSafety.cpp: Prune bogus \param(s). [-Wdocumentation]NAKAMURA Takumi2014-08-041-3/+0
| | | | llvm-svn: 214796
* ThreadSafetyAnalysis: Fix annotations in class members. [-Wdocumentation]NAKAMURA Takumi2014-08-042-7/+7
| | | | llvm-svn: 214795
* clang/test/Sema/struct-packed-align.c: Add the case in MS mode that ↵NAKAMURA Takumi2014-08-041-4/+6
| | | | | | | | | | alignment doesn't affect packing. Also, revert a couple of suppressions. r214298, "Suppress clang/test/Sema/struct-packed-align.c for targeting LLP64." r214301, "Suppress clang/test/Sema/struct-packed-align.c also on msvc for investigating." llvm-svn: 214794
* Trailing linefeed.NAKAMURA Takumi2014-08-041-4/+0
| | | | llvm-svn: 214793
* Remove separator parameter from static local naming codeReid Kleckner2014-08-042-8/+5
| | | | | | It was always set to ".", which was duplicated in a few places. llvm-svn: 214792
* Thread Safety Analysis: add a -Wthread-safety-negative flag that warns wheneverDeLesley Hutchins2014-08-048-39/+228
| | | | | | | a mutex is acquired, but corresponding mutex is not provably not-held. This is based on the earlier negative requirements patch. llvm-svn: 214789
* Update for LLVM API change.Eric Christopher2014-08-041-2/+4
| | | | llvm-svn: 214786
* UsersManual: update clang-cl optionsHans Wennborg2014-08-041-49/+88
| | | | llvm-svn: 214777
* Don't drop dllimport from qualified friend redeclarations (PR20512)Hans Wennborg2014-08-043-4/+29
| | | | | | | | | | This matches MSVC's logic, which seems to be that when the friend declaration is qualified, it cannot be a declaration of a new symbol and so the dll linkage doesn't change. Differential Revision: http://reviews.llvm.org/D4764 llvm-svn: 214774
* Nit picky const-correctness with auto. No functional changes.Aaron Ballman2014-08-041-2/+2
| | | | llvm-svn: 214773
* A static_assert declaration cannot be a template; adding the diagnostic for ↵Aaron Ballman2014-08-044-3/+23
| | | | | | this instead of silently accepting and producing possibly-unexpected behavior. llvm-svn: 214770
* Revert r214757 (Same fix as r214758)Alex Lorenz2014-08-041-1/+0
| | | | llvm-svn: 214759
* Add CoverageMappingGen.cpp (introduced in r214752) to CMakeLists.txtDavid Blaikie2014-08-041-0/+1
| | | | llvm-svn: 214758
OpenPOWER on IntegriCloud