summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [CodeGen] Add thumb-mode to target-features for arm/thumb triples.Florian Hahn2017-06-075-22/+60
| | | | | | | | | | | | | | | | | | | | | Summary: The thumb-mode target feature is used to force Thumb or ARM code generation on a per-function basis. Explicitly adding +thumb-mode to functions for thumbxx triples enables mixed ARM/Thumb code generation in places where compilation units with thumbxx and armxx triples are merged together (e.g. the IR linker or LTO). For armxx triples, -thumb-mode is added in a similar fashion. Reviewers: echristo, t.p.northover, kristof.beyls, rengolin Reviewed By: echristo Subscribers: rinon, aemerson, mehdi_amini, javed.absar, cfe-commits Differential Revision: https://reviews.llvm.org/D33448 llvm-svn: 304897
* [Sema] Silence unused variable warning.Benjamin Kramer2017-06-071-1/+1
| | | | llvm-svn: 304892
* [ARM] Fix Neon vector type alignment to 64-bitJaved Absar2017-06-072-0/+21
| | | | | | | | | | This is restricted version of patch - https://reviews.llvm.org/D33205 that I reverted as it was leading to ABI breaks on darwin etc. This patch restricts the fix to AAPCS (Android remains 128-bit). Reviewed by: Renato Golin, Stephen Hines Differential Revision: https://reviews.llvm.org/D33786 llvm-svn: 304889
* [Driver] Add test to cover case when LSan is not supportedMaxim Ostapenko2017-06-071-0/+6
| | | | | | | | This commit adds a testcase for uncovered code paths in LSan options parsing logic in driver. Differential Revision: https://reviews.llvm.org/D33941 llvm-svn: 304880
* Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.Galina Kistanova2017-06-071-0/+1
| | | | llvm-svn: 304872
* Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.Galina Kistanova2017-06-071-0/+3
| | | | llvm-svn: 304870
* Update libdeps to add BinaryFormat, introduced in r304864.NAKAMURA Takumi2017-06-072-0/+2
| | | | llvm-svn: 304869
* Reorder and reformat.NAKAMURA Takumi2017-06-071-1/+3
| | | | llvm-svn: 304868
* Fixed warning: 'virtual void ↵Galina Kistanova2017-06-071-0/+2
| | | | | | clang::ExternalASTSource::CompleteType(clang::ObjCInterfaceDecl*)' was hidden. llvm-svn: 304863
* Fix a couple of class template argument deduction crashes with libc++'s tuple.Richard Smith2017-06-076-5/+78
| | | | | | | | | | | | | | | | RecursiveASTVisitor was not properly recursing through a SubstTemplateTypeParmTypes, resulting in crashes in pack expansion where we couldn't always find an unexpanded pack within a pack expansion. We also have an issue where substitution of deduced template arguments for an implicit deduction guide creates the "impossible" case of naming a non-dependent member of the current instantiation, but within a specialization that is actually instantiated from a different (partial/explicit) specialization of the template. We resolve this by declaring that constructors that do so can only be used to deduce specializations of the primary template. I'm running this past CWG to see if people agree this is the right thing to do. llvm-svn: 304862
* [WebAssembly] Set MaxAtomicInlineWidth to 64.Dan Gohman2017-06-072-3/+3
| | | | | | | | The WebAssembly threads proposal has changed such that C++ implementations can now declare that atomics up to 64 bits are "lock free" in C++'s terms. llvm-svn: 304859
* Improve error recovery for missing 'template' keyword in contexts where theRichard Smith2017-06-072-0/+48
| | | | | | | | | | | | | | template is valid with or without it (with different meanings). If we see "dependent.x<...", and what follows the '<' is a valid expression, we must parse the '<' as a comparison rather than a template angle bracket. When we later come to instantiate, if we find that the LHS of the '<' actually names an overload set containing function templates, produce a diagnostic suggesting that the 'template' keyword was missed rather than producing a mysterious diagnostic saying that the function must be called (and pointing at what looks to already be a function call!). llvm-svn: 304852
* [DOXYGEN] Corrected several typos and incorrect parameters description that ↵Ekaterina Romanova2017-06-064-9/+35
| | | | | | | | | Sony's techinical writer found during review. I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream. llvm-svn: 304840
* Print registered targets in clang's version informationDimitry Andric2017-06-063-4/+7
| | | | | | | | | | | | | | | | | | | | | Summary: Other llvm tools display their registered targets when showing version information, but for some reason clang has never done this. To support this, D33899 adds the llvm parts, which make it possible to print version information to arbitrary raw_ostreams. This change adds a call to printRegisteredTargetsForVersion in clang's PrintVersion, and adds a raw_ostream parameter to two other PrintVersion functions. Reviewers: beanz, chandlerc, dberris, mehdi_amini, zturner Reviewed By: mehdi_amini Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33900 llvm-svn: 304836
* [clang] Remove double semicolons. NFC.Mandeep Singh Grang2017-06-062-2/+2
| | | | | | | | | | | | | | Reviewers: rsmith, craig.topper, efriedma Reviewed By: efriedma Subscribers: efriedma, cfe-commits Tags: #clang-c Differential Revision: https://reviews.llvm.org/D33926 llvm-svn: 304823
* clang-format: [JS] Correctly Indent Nested JavaScript Literals.Martin Probst2017-06-062-2/+41
| | | | | | | | | | | | | | | | | Nested literals are sometimes only indented by 2 spaces, instead of respecting the IndentWidth option. There are existing unit tests (FormatTestJS.ArrayLiterals) that only pass because the style used to test them uses an IndentWidth of 2. This change removes the magic 2 and always uses the IndentWidth. I've added 6 tests. The first 4 of these tests fail before this change, while the last 2 already pass, but were added just to make sure it the change works with all types of braces. Patch originally by Jared Neil, thanks! Differential Revision: https://reviews.llvm.org/D33857 llvm-svn: 304791
* [ARM] Add support for target("arm") and target("thumb").Florian Hahn2017-06-062-1/+30
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds support for the target("arm") and target("thumb") attributes, which can be used to force the compiler to generated ARM or Thumb code for a function. In LLVM, ARM or Thumb code generation can be controlled by the thumb-mode target feature. But GCC already uses target("arm") and target("thumb"), so we have to substitute "arm" with -thumb-mode and "thumb" with +thumb-mode. Reviewers: echristo, pcc, kristof.beyls Reviewed By: echristo Subscribers: ahatanak, aemerson, javed.absar, kristof.beyls, cfe-commits Differential Revision: https://reviews.llvm.org/D33721 llvm-svn: 304781
* Fix a mistake in the clang format documentation (BreakBeforeTernaryOperators)Sylvestre Ledru2017-06-061-1/+1
| | | | | | Patch sent through github by Jason Hsu llvm-svn: 304776
* [Driver] Don't force .exe suffix for lldShoaib Meenai2017-06-062-4/+2
| | | | | | | | | | | When cross-compiling to Windows using lld, we want the driver to invoke it as lld-link rather than lld-link.exe. On Windows, the LLVM fs functions take care of adding the .exe suffix where necessary, so we can just drop the addition in the toolchain entirely. Differential Revision: https://reviews.llvm.org/D33923 llvm-svn: 304761
* PR33318: Add missing full-expression checking to static_assert expression.Richard Smith2017-06-065-5/+20
| | | | | | | This fixes missing lambda-captures for variables referenced only inside a static_assert (!), among other things. llvm-svn: 304760
* Retain header search and preprocessing options from AST file when emittingRichard Smith2017-06-066-10/+55
| | | | | | preprocessed text for an AST file. llvm-svn: 304756
* Fix crash when an 'import a module' TypoCorrection has its CorrectionDeclsRichard Smith2017-06-054-7/+20
| | | | | | | | | | | | replaced by visible decls. Make sure that all paths through checkCorrectionVisibility set the RequiresImport flag appropriately, so we don't end up using a stale value. Patch by Jorge Gorbe! Differential Revision: https://reviews.llvm.org/D30963 llvm-svn: 304745
* Fix memory leak exposed by r304726.Richard Smith2017-06-051-5/+7
| | | | | | | | When giving a ContentCache a null buffer, ignore the DoNotFree flag rather than inheriting it onto whatever buffer we end up using for the file. Also ensure that the main buffer is properly destroyed. llvm-svn: 304740
* Factor out and unify emission of "module is unavailable" diagnostics.Richard Smith2017-06-0510-70/+64
| | | | | | Inspired by post-commit review of r304190. llvm-svn: 304728
* Attempt to fix Windows buildbot failure due to mismatching directory ↵Richard Smith2017-06-051-2/+11
| | | | | | separators in preprocessed output. llvm-svn: 304727
* Rather than rejecting attempts to run preprocessor-only actions on AST files,Richard Smith2017-06-059-26/+147
| | | | | | | | | | replay the steps taken to create the AST file with the preprocessor-only action installed to produce preprocessed output. This can be used to produce the preprocessed text for an existing .pch or .pcm file. llvm-svn: 304726
* [test] Fix baremetal test to allow any -resource-dirMichal Gorny2017-06-051-2/+2
| | | | | | | | | | | | | | | The baremetal test (r303873) has been added with expectance of very specific -resource-dir. However, the test itself nor the BareMetal driver does not enforce any specific -resource-dir, making this constraint invalid. It already has been altered twice -- in r303910 for Windows compatibility, and in r304085 for systems using lib64. To account for even more systems, just use [[RESOURCE_DIR]] like a number of other tests do. This is needed for Gentoo where RESOURCE_DIR starts with ../ (uses relative path to a parent directory). Differential Revision: https://reviews.llvm.org/D33877 llvm-svn: 304715
* [analyzer] Don't add arrow to the inlined function's decl when it has no body.Artem Dergachev2017-06-052-4/+196
| | | | | | | | | | | | | In plist output mode with alternate path diagnostics, when entering a function, we draw an arrow from the caller to the beginning of the callee's declaration. Upon exiting, however, we draw the arrow from the last statement in the callee function. The former makes little sense when the declaration is not a definition, i.e. has no body, which may happen in case the body is coming from a body farm, eg. Objective-C autosynthesized property accessor. Differential Revision: https://reviews.llvm.org/D33671 llvm-svn: 304713
* [analyzer] Nullability: fix notes around synthesized ObjC property accessors.Artem Dergachev2017-06-054-8/+74
| | | | | | | | | | | | | Nullable-to-nonnull checks used to crash when the custom bug visitor was trying to add its notes to autosynthesized accessors of Objective-C properties. Now we avoid this, mostly automatically outside of checker control, by moving the diagnostic to the parent stack frame where the accessor has been called. Differential revision: https://reviews.llvm.org/D32437 llvm-svn: 304710
* [OpenCL] Fix pipe size in TypeInfo.Anastasia Stulova2017-06-052-3/+18
| | | | | | | | | | | Pipes are now the size of pointers rather than the size of the type that they contain. Patch by Simon Perretta! Differential Revision: https://reviews.llvm.org/D33597 llvm-svn: 304708
* Add support for #pragma clang sectionJaved Absar2017-06-0513-1/+409
| | | | | | | | | | | | | | | This patch provides a means to specify section-names for global variables, functions and static variables, using #pragma directives. This feature is only defined to work sensibly for ELF targets. One can specify section names as: #pragma clang section bss="myBSS" data="myData" rodata="myRodata" text="myText" One can "unspecify" a section name with empty string e.g. #pragma clang section bss="" data="" text="" rodata="" Reviewers: Roger Ferrer, Jonathan Roelofs, Reid Kleckner Differential Revision: https://reviews.llvm.org/D33412 llvm-svn: 304705
* Revert "[sanitizer-coverage] one more flavor of coverage: ↵Renato Golin2017-06-056-17/+3
| | | | | | | | -fsanitize-coverage=inline-8bit-counters. Experimental so far, not documenting yet. (clang part)" This reverts commit r304631, as it broke ARM/AArch64 bots for 2 days. llvm-svn: 304697
* [clang-format] Don't align too long broken trailing commentsKrasimir Georgiev2017-06-042-2/+13
| | | | | | | | | | | | | | | | | | Summary: This patch fixes a bug where clang-format will align newly broken trailing comments even if this will make them exceed the line limit. The bug was caused by a combination of unsigned arithmetic overflow and an imprecise computation of the length of broken comment lines. Reviewers: djasper, alexfh Reviewed By: alexfh Subscribers: klimek Differential Revision: https://reviews.llvm.org/D33830 llvm-svn: 304687
* Implement isDefined by call to isThisDeclarationADefinition.Serge Pavlov2017-06-043-13/+13
| | | | | | | | | | Modifies FunctionDecl::isThisDeclarationADefinition so that it covers all the cases checked by FunctionDecl::isDefined. Implements the latter method by call to isThisDeclarationADefinition. This change is a part of the patch D30170. llvm-svn: 304684
* Fixed warning: enum constant in boolean context.Galina Kistanova2017-06-031-2/+3
| | | | llvm-svn: 304663
* tests: silence -Wobjc-root-class warningsSaleem Abdulrasool2017-06-033-7/+7
| | | | | | | Silence warnings about no ObjC class root for the types defined for the tests. llvm-svn: 304662
* CodeGen: fix section names for different file formatsSaleem Abdulrasool2017-06-037-32/+137
| | | | | | | | | This changes the codegen to match the section names according to the ObjC rewriter as well as the runtime. The changes to the test are simply whitespace changes to the section attributes and names and are functionally equivalent (the whitespace is ignored by the linker). llvm-svn: 304661
* Added missing break.Galina Kistanova2017-06-031-0/+1
| | | | llvm-svn: 304653
* Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.Galina Kistanova2017-06-031-0/+2
| | | | llvm-svn: 304652
* Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.Galina Kistanova2017-06-039-0/+12
| | | | llvm-svn: 304651
* Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.Galina Kistanova2017-06-037-0/+11
| | | | llvm-svn: 304650
* Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.Galina Kistanova2017-06-035-0/+7
| | | | llvm-svn: 304649
* Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.Galina Kistanova2017-06-031-0/+4
| | | | llvm-svn: 304648
* Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.Galina Kistanova2017-06-031-0/+1
| | | | llvm-svn: 304647
* Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.Galina Kistanova2017-06-031-0/+2
| | | | llvm-svn: 304646
* Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.Galina Kistanova2017-06-033-0/+4
| | | | llvm-svn: 304645
* Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.Galina Kistanova2017-06-034-0/+4
| | | | llvm-svn: 304644
* Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.Galina Kistanova2017-06-031-0/+2
| | | | llvm-svn: 304643
* Added LLVM_FALLTHROUGH to address warning: this statement may fall through + ↵Galina Kistanova2017-06-031-4/+11
| | | | | | formatted. NFC. llvm-svn: 304642
* Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.Galina Kistanova2017-06-033-0/+4
| | | | llvm-svn: 304641
OpenPOWER on IntegriCloud