summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* CodeGen: use some range-based for loopsSaleem Abdulrasool2016-09-121-14/+10
| | | | | | | Use range-based for loops to simplify the logic. Add an explicit check for MachO as the inline asm uses MachO specific directives. llvm-svn: 281261
* Add a couple of test files missed in r281258.Richard Smith2016-09-122-0/+10
| | | | llvm-svn: 281259
* [modules] When we merge two definitions of a function, mark the retainedRichard Smith2016-09-126-24/+62
| | | | | | | definition as visible in the discarded definition's module, as we do for other kinds of definition. llvm-svn: 281258
* Diagnostics reference: "error:" should be red, not orange.Richard Smith2016-09-122-2/+2
| | | | llvm-svn: 281241
* Trivial documentation fix regarding Obj-C ARC ↵Jonathan Roelofs2016-09-121-2/+2
| | | | | | | | | | | | | objc_arc_weak_reference_unavailable Fixed incorrect docs that referred to: objc_arc_weak_unavailable when it should be: objc_arc_weak_reference_unavailable Patch by: Sean McBride! llvm-svn: 281227
* clang-format: Make emacs integration work with narrowed buffers.Daniel Jasper2016-09-121-1/+1
| | | | | | | | | Use (call-process region nil ...) instead of (point-min) so that the call works in narrowed buffers. Patch by Philipp Stephani, thank you! llvm-svn: 281203
* [CFG] Add iterator_ranges to CFG and CFGBlock.Martin Bohme2016-09-121-0/+25
| | | | | | | | | | | | Summary: (Needed for D23353.) Reviewers: alexfh Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D23842 llvm-svn: 281200
* Add virtual destructor (necessary due to the switch to shared_ptr).Richard Smith2016-09-121-0/+1
| | | | llvm-svn: 281198
* Attempt #3 to placate MSVC.Richard Smith2016-09-121-4/+6
| | | | llvm-svn: 281197
* Attempt #2 to placate MSVCRichard Smith2016-09-121-0/+2
| | | | llvm-svn: 281195
* Attempt to placate MSVC.Richard Smith2016-09-121-1/+3
| | | | llvm-svn: 281194
* Add a mode to clang-tblgen to generate reference documentation for warning andRichard Smith2016-09-1210-4/+11061
| | | | | | | | remark flags. For now I'm checking in a copy of the built documentation, but we can replace this with a placeholder (as we do for the attributes reference documentation) once we enable building this server-side. llvm-svn: 281192
* [MS ABI] Add /include directives for dynamic TLSDavid Majnemer2016-09-122-0/+13
| | | | | | | | | MSVC emits /include directives in the .drective section for the __dyn_tls_init function (decorated as ___dyn_tls_init@12 for 32-bit). This fixes PR30347. llvm-svn: 281189
* CodeGen: remove unnecessary else caseSaleem Abdulrasool2016-09-111-6/+3
| | | | | | | Refactor the assignment so that its much more clear that the if-clause contains the lookup, and once cached is directly used. NFC. llvm-svn: 281150
* Add missing test coverage for an inheritance model attrib merge diag.Nico Weber2016-09-101-0/+8
| | | | | | | Without this, no tests fail if I remove the Diag() in the first if in Sema::mergeMSInheritanceAttr(). llvm-svn: 281136
* [tablegen] Check that an optional IdentifierArgument of an attribute isAkira Hatanaka2016-09-102-1/+13
| | | | | | | | | | | | provided before trying to print it. This fixes a segfault that occurs when function printPretty generated by tablegen tries to print an optional argument of attribute objc_bridge_related. rdar://problem/28155469 llvm-svn: 281132
* Modules: for ObjectiveC try to keep the definition invariant.Manman Ren2016-09-0922-36/+157
| | | | | | | | | | | | When deserializing ObjCInterfaceDecl with definition data, if we already have a definition, try to keep the definition invariant; also pull in the categories even if it is not what getDefinition returns (this effectively combines categories). rdar://27926200 rdar://26708823 llvm-svn: 281119
* Debug info: Bump the default DWARF version on Darwin to 4.Adrian Prantl2016-09-094-8/+15
| | | | | | | This is a spiritual re-commit of r201375 with only a brief delay for upgrading the green dragon builders. llvm-svn: 281094
* [CUDA] Make __GCC_ATOMIC_XXX_LOCK_FREE macros the same on host/device.Justin Lebar2016-09-092-15/+30
| | | | | | | | | | | | | | | | | | | | | Summary: This fixes a bug where we were unable to compile the following CUDA file with libstdc++ (didn't try libc++): #include <future> void foo() { std::shared_future<int> x; } The problem is that <future> only defines std::shared_future if __GCC_ATOMIC_INT_LOCK_FREE > 1. When we compiled this file for device, the macro was set to 1, and then the class didn't exist at all. Reviewers: tra Subscribers: cfe-commits, jhen Differential Revision: https://reviews.llvm.org/D24407 llvm-svn: 281089
* Modules: revert r280728.Manman Ren2016-09-096-28/+4
| | | | | | | In post-commit review, Richard suggested a better way to fix this. rdar://27926200 llvm-svn: 281078
* Myriad: nominally "support" ASAN.Douglas Katzman2016-09-094-4/+25
| | | | | | Doesn't work, but needs to be enabled in order to get there. llvm-svn: 281071
* Also cleanup comments around redundant colons/commas in format::cleanup.Eric Liu2016-09-092-13/+10
| | | | | | | | | | Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D24400 llvm-svn: 281064
* [DebugInfo] Ensure complete type is emitted with -fstandalone-debugReid Kleckner2016-09-092-6/+31
| | | | | | | | | | | The logic for upgrading a class from a forward decl to a complete type was not checking the debug info emission level before applying the vtable optimization. This meant we ended up without debug info for a class which was required to be complete. I noticed it because it triggered an assertion during CodeView emission, but that's a separate issue. llvm-svn: 281057
* Make -fstandalone-debug and -flimit-debug-info available in clang-clReid Kleckner2016-09-092-4/+6
| | | | | | | | | | Our limited debug info optimizations are breaking down at DLL boundaries, so we're going to evaluate the size impact of these settings, and possibly change the default. Users should be able to override our settings, though. llvm-svn: 281056
* [codeview] Extend the heuristic for detecting classes imported from DLLsReid Kleckner2016-09-092-3/+36
| | | | | | | | | | | | | | If a dynamic class contains a dllimport method, then assume the class may not be constructed in this DLL, and therefore the vtable will live in a different PDB. This heuristic is still incomplete, and will miss things like abstract base classes that are only constructed on one side of the DLL interface. That said, this heuristic does detect some cases that are currently problematic, and may be useful to other projects that don't use many DLLs. llvm-svn: 281053
* Update clang for D21514. NFCAmaury Sechet2016-09-091-4/+5
| | | | | | | | | | | | Summary: As per title. Reviewers: ahatanak, bkramer, whitequark, mehdi_amini, void Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21515 llvm-svn: 281018
* [Docs] Fix typos, remove trailing whitespace.George Burgess IV2016-09-091-10/+10
| | | | | | | | Avoided wrapping NullabilityDocs at 80cols, since that would've made this diff much bigger, and never-ending lines seems to be the style for many of the null-related docs. llvm-svn: 281017
* C++ Modules TS: Add parsing and some semantic analysis support forRichard Smith2016-09-0826-44/+328
| | | | | | | export-declarations. These don't yet have an effect on name visibility; we still export everything by default. llvm-svn: 280999
* [Driver] Report invalid -mtune/-mcpu parameters when -arch=arm64Vedant Kumar2016-09-082-9/+14
| | | | | | Differential Revision: https://reviews.llvm.org/D23643 llvm-svn: 280998
* Implement MS _rot intrinsicsAlbert Gutowski2016-09-084-55/+243
| | | | | | | | | | Reviewers: thakis, Prazek, compnerd, rnk Subscribers: majnemer, cfe-commits Differential Revision: https://reviews.llvm.org/D24311 llvm-svn: 280997
* [modules] Apply ODR merging for function scoped tags only in C++ mode.Vassil Vassilev2016-09-086-1/+26
| | | | | | | | | | | In C mode, if we have a visible declaration but not a visible definition, a tag defined in the declaration should be have a visible definition. In C++ we rely on the ODR merging, whereas in C we cannot because each declaration of a function gets its own set of declarations in its prototype scope. Patch developed in collaboration with Richard Smith! llvm-svn: 280984
* Revert "[XRay] ARM 32-bit no-Thumb support in Clang"Renato Golin2016-09-081-13/+0
| | | | | | | This reverts commit r280889, as the original LLVM commits broke the thumb buildbots. llvm-svn: 280968
* Moved unreachable to appease msvc, gcc and clangSimon Pilgrim2016-09-081-3/+2
| | | | llvm-svn: 280921
* Fixed a 'not all control paths return a value' warning on MSVC buildsSimon Pilgrim2016-09-081-19/+22
| | | | llvm-svn: 280917
* Add explicit casts to size_t to try to appease MSVC.Peter Collingbourne2016-09-081-2/+2
| | | | llvm-svn: 280899
* CodeGen: Clean up implementation of vtable initializer builder. NFC.Peter Collingbourne2016-09-086-168/+125
| | | | | | | | | | | | | - Simplify signature of CreateVTableInitializer function. - Move vtable component builder to a separate function. - Remove unnecessary accessors from VTableLayout class. This is in preparation for a future change that will alter the type of the vtable initializer. Differential Revision: https://reviews.llvm.org/D22642 llvm-svn: 280897
* [XRay] ARM 32-bit no-Thumb support in ClangDean Michael Berris2016-09-081-0/+13
| | | | | | | | | | | | | Just a test for now, adapted from x86_64 tests of XRay. This is one of 3 commits to different repositories of XRay ARM port. The other 2 are: 1. https://reviews.llvm.org/D23931 (LLVM) 2. https://reviews.llvm.org/D23933 (compiler-rt) Differential Review: https://reviews.llvm.org/D23932 llvm-svn: 280889
* clang-format: [JavaScript] Change default AllowShortFunctionsOnASingleLineDaniel Jasper2016-09-072-23/+60
| | | | | | for Google style to "empty". llvm-svn: 280878
* clang-format: [JavaScript] Do requoting in a separate passDaniel Jasper2016-09-072-44/+72
| | | | | | | | | | | | | | | | | | The attempt to fix requoting behavior in r280487 after changes to tooling::Replacements are incomplete. We essentially need to add to replacements at the same position, one to insert a line break and one to change the quoting and that's incompatible with the new tooling::Replacement API, which does not allow for order-dependent Replacements. To make the order clear, Replacements::merge() has to be used, but that requires the merged Replacement to actually refer to the changed text, which is hard to reproduce for the requoting. This change fixes the behavior by moving the requoting to a completely separate pass. The added benefit is that no weird ColumnWidth calculations are necessary anymore and this should just work even if we implement string literal splitting in the future. llvm-svn: 280874
* Fix some Clang-tidy modernize-use-using and Include What You Use warnings; ↵Eugene Zelenko2016-09-079-100/+377
| | | | | | | | other minor fixes. Differential revision: https://reviews.llvm.org/D24115 llvm-svn: 280870
* Move CHECK right before the function it describes.George Burgess IV2016-09-071-1/+1
| | | | llvm-svn: 280852
* [Sema] Compare bad conversions in overload resolution.George Burgess IV2016-09-074-7/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r280553 introduced an issue where we'd emit ambiguity errors for code like: ``` void foo(int *, int); void foo(unsigned int *, unsigned int); void callFoo() { unsigned int i; foo(&i, 0); // ambiguous: int->unsigned int is worse than int->int, // but unsigned int*->unsigned int* is better than // int*->int*. } ``` This patch fixes this issue by changing how we handle ill-formed (but valid) implicit conversions. Candidates with said conversions now always rank worse than candidates without them, and two candidates are considered to be equally bad if they both have these conversions for the same argument. Additionally, this fixes a case in C++11 where we'd complain about an ambiguity in a case like: ``` void f(char *, int); void f(const char *, unsigned); void g() { f("abc", 0); } ``` ...Since conversion to char* from a string literal is considered ill-formed in C++11 (and deprecated in C++03), but we accept it as an extension. llvm-svn: 280847
* Add a few more test for []-style uuid attributes.Nico Weber2016-09-071-0/+27
| | | | | | | | - Should diag on a function (clang-cl warns; it's an error in cl) - Test the attribute on nested classes (clang-cl is more permissive and more self-consistent than cl here) llvm-svn: 280845
* Do not validate pch when -fno-validate-pch is setYaxun Liu2016-09-073-5/+79
| | | | | | | | | | | | | | | | There is a bug causing pch to be validated even though -fno-validate-pch is set. This patch fixes it. ASTReader relies on ASTReaderListener to initialize SuggestedPredefines, which is required for compilations using PCH. Before this change, PCHValidator is the default ASTReaderListener. After this change, when -fno-validate-pch is set, PCHValidator is disabled, but we need a replacement ASTReaderListener to initialize SuggestedPredefines. Class SimpleASTReaderListener is implemented for this purpose. This change only affects -fno-validate-pch. There is no functional change if -fno-validate-pch is not set. If -fno-validate-pch is not set, conflicts in predefined macros between pch and current compiler instance causes error. If -fno-validate-pch is set, predefine macros in current compiler override those in pch so that compilation can continue. Differential Revision: https://reviews.llvm.org/D24054 llvm-svn: 280842
* Try contextually converting condition of constexpr if to Boolean valueIsmail Pazarbasi2016-09-073-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: C++1z 6.4.1/p2: If the if statement is of the form if constexpr, the value of the condition shall be a contextually converted constant expression of type bool [...] C++1z 5.20/p4: [...] A contextually converted constant expression of type bool is an expression, contextually converted to bool (Clause4), where the converted expression is a constant expression and the conversion sequence contains only the conversions above. [...] Contextually converting result of an expression `e` to a Boolean value requires `bool t(e)` to be well-formed. An explicit conversion function is only considered as a user-defined conversion for direct-initialization, which is essentially what //contextually converted to bool// requires. Also, fixes PR28470. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24158 llvm-svn: 280838
* [MS] Fix prologue this adjustment when 'this' is passed indirectlyReid Kleckner2016-09-076-10/+45
| | | | | | | | | | | | Move the logic for doing this from the ABI argument lowering into EmitParmDecl, which runs for all parameters. Our codegen is slightly suboptimal in this case, as we may leave behind a dead store after optimization, but it's 32-bit inalloca, and this fixes the bug in a robust way. Fixes PR30293 llvm-svn: 280836
* [clang-offload-bundler] Fix some Clang-tidy modernize-use-override and ↵Eugene Zelenko2016-09-071-80/+120
| | | | | | | | Include What You Use warnings; other minor fixes. Differential revision: https://reviews.llvm.org/D24165 llvm-svn: 280828
* Add missing include. White space.Vassil Vassilev2016-09-071-1/+2
| | | | llvm-svn: 280827
* Add MS __nop intrinsic to intrin.hReid Kleckner2016-09-072-0/+6
| | | | | | | | | | | | | | | Summary: There was no definition for __nop function - added inline assembly. Patch by Albert Gutowski! Reviewers: rnk, thakis Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24286 llvm-svn: 280826
* Parsing MS pragma intrinsicReid Kleckner2016-09-075-2/+82
| | | | | | | | | | | | | | | Parse pragma intrinsic, display warning if the function isn't a builtin function in clang and suggest including intrin.h. Patch by Albert Gutowski! Reviewers: aaron.ballman, rnk Subscribers: aaron.ballman, cfe-commits Differential Revision: https://reviews.llvm.org/D23944 llvm-svn: 280825
OpenPOWER on IntegriCloud