summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* clang-cl: Add more tests for the interaction of /FI and /Yc /Yu.Nico Weber2016-03-234-2/+33
| | | | | | | | | | | | Most things even work; see the included FIXMEs for things that need polishing. Also don't warn about unused flags for the `/Yuh2.h /FIh1.h /FIh2.h`. The common case is that the pch was built with `/Ych2.h /FIh1.h /FIh2.h`, so h1.h is in the PCH, and we shouldn't warn about /FIh1.h not having an effect. (If we wanted to get fancy, we could store the list of -include flags in the pch and then check that it matches later on.) llvm-svn: 264178
* clang-cl: Include /FI headers in /showIncludes output.Nico Weber2016-03-235-29/+37
| | | | | | | | | | | | | | | | | -H in gcc mode doesn't print -include headers, but they are included in depfiles written by MMD and friends. Since /showIncludes is what's used instead of depfiles, printing /FI there seems important (and matches cl.exe). Instead of giving HeaderIncludeGen more options, just switch on ShowAllHeaders in clang-cl mode and let clang::InitializePreprocessor() not put -include flags in the <command line> block. This changes the behavior of -E slightly, and it removes the <command line> flag from the output triggered by setting the obscure CC_PRINT_HEADERS=1 env var to true while running clang. Both of these seem ok to change. http://reviews.llvm.org/D18401 llvm-svn: 264174
* [NFC] Delete an unused function parameter from a static function Faisal Vali2016-03-231-3/+2
| | | | llvm-svn: 264170
* Visualize fields of records as they were declared in Visual Studio debuggerMike Spertus2016-03-231-1/+1
| | | | llvm-svn: 264169
* ObjC: Handle boolean fixed type for enum.Manman Ren2016-03-232-1/+9
| | | | | | | | | | | | | Before this commit, we assert failure in ImplicitCastExpr "unheralded conversion to bool". This commit fixes the assertion by using the correct cast type when the fixed type is boolean. This commit also fixes the behavior for Microsoft mode as well, since Obj-C and Microsoft mode share the same code path. rdar://24999533 llvm-svn: 264167
* [analyzer] Fix typo s/initalize/initialize/Chih-Hung Hsieh2016-03-231-1/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D18363 llvm-svn: 264164
* clang-cl: Don't warn about /Oy- being unused in 64-bit builds.Nico Weber2016-03-232-3/+9
| | | | | | http://reviews.llvm.org/D18392 llvm-svn: 264163
* Use an enum instead of hardcoded indices. NFC.Alexander Kornienko2016-03-231-7/+11
| | | | llvm-svn: 264158
* Combine identical check-prefixes in Clang ↵Artyom Skrobov2016-03-231-149/+75
| | | | | | | | | | | | test/Preprocessor/arm-target-features.c Reviewers: rengolin, t.p.northover Subscribers: aemerson, cfe-commits, rengolin Differential Revision: http://reviews.llvm.org/D18391 llvm-svn: 264155
* [X86] Add "x87" in x86 target feature map.Andrey Turetskiy2016-03-234-7/+26
| | | | | | Differential Revision: http://reviews.llvm.org/D13980 llvm-svn: 264149
* [Sema] Allow implicit conversions of &overloaded_fn in C.George Burgess IV2016-03-235-14/+99
| | | | | | | | | | | | | | | | | | | | | | | Also includes a minor ``enable_if`` docs update. Currently, our address-of overload machinery will only allow implicit conversions of overloaded functions to void* in C. For example: ``` void f(int) __attribute__((overloadable)); void f(double) __attribute__((overloadable, enable_if(0, ""))); void *fp = f; // OK. This is C and the target is void*. void (*fp2)(void) = f; // Error. This is C, but the target isn't void*. ``` This patch makes the assignment of `fp2` select the `f(int)` overload, rather than emitting an error (N.B. you'll still get a warning about the `fp2` assignment if you use -Wincompatible-pointer-types). Differential Revision: http://reviews.llvm.org/D13704 llvm-svn: 264132
* [Apple Clang] Expose llvm-config from stage2 builds in stage1Chris Bieneman2016-03-231-0/+1
| | | | | | This exposes the stage2-llvm-config target though the stage1 build configuration. llvm-svn: 264125
* [CUDA] Don't allow templated variadic functions.Justin Lebar2016-03-222-22/+28
| | | | | | | | | | Reviewers: tra Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18373 llvm-svn: 264106
* Update cxx-features test to C++1zJF Bastien2016-03-221-34/+38
| | | | | | | Forked from the following patch: http://reviews.llvm.org/D17950 llvm-svn: 264098
* D18325: Added mm_malloc module export.John Thompson2016-03-222-0/+5
| | | | llvm-svn: 264092
* StaticAnalyzer: Avoid an unintentional copyJustin Bogner2016-03-221-1/+1
| | | | | | | | | | The range here isn't over references, so using `auto &` here incites a copy. Switching to `auto *` would do, but we might as well list an explicit type for clarity. Found by -Wrange-loop-analysis. llvm-svn: 264071
* Make build bots happyDavid Majnemer2016-03-221-1/+0
| | | | | | | BasicBlock's lose their names for some builders, don't mention such names. llvm-svn: 264066
* [MS ABI] Assign an inheritance model for the dest of a member pointer upcastDavid Majnemer2016-03-222-1/+20
| | | | | | | | | While we correctly assigned an inheritance model for the source of a member pointer upcast, we did not do so for the destination. This fixes PR27030. llvm-svn: 264065
* [Perf-training] Using os.devnull instead of a temp fileChris Bieneman2016-03-221-4/+1
| | | | | | | | This is based on post-commit feedback from Vedant. Totally didn't know that existed and worked on Windows. Thanks Vedant! llvm-svn: 264064
* [Perf-training] Cleanup based on feedback from Sean SilvasChris Bieneman2016-03-221-11/+6
| | | | | | Sean provided feedback based on r257934 on cfe-commits. This change addresses that feedback. llvm-svn: 264063
* clang-format: [JS] do not wrap ES6 imports/exports.Daniel Jasper2016-03-223-22/+38
| | | | | | | | | "import ... from '...';" and "export ... from '...';" should be treated the same as goog.require/provide/module/forwardDeclare calls. Patch by Martin Probst. llvm-svn: 264055
* [ASTMatchers] New matcher hasReturnValue addedAlexander Kornienko2016-03-224-0/+35
| | | | | | | | | | | | | | Summary: A checker (will be uploaded after this patch) needs to check implicit casts. Existing generic matcher "has" ignores implicit casts and parenthesized expressions and no specific matcher for matching return value expression preexisted. The patch adds such a matcher (hasReturnValue). Reviewers: klimek, sbenza Subscribers: xazax.hun, klimek, cfe-commits Patch by Ádám Balogh! Differential Revision: http://reviews.llvm.org/D17986 llvm-svn: 264037
* Fix warning about extra semicolon. NFC.Vasileios Kalintiris2016-03-221-1/+1
| | | | llvm-svn: 264035
* [Objective-c] Do not set IsExact to true when the receiver is a class.Akira Hatanaka2016-03-223-3/+13
| | | | | | | | | | | | IsExact shouldn't be set to true in WeakObjectProfileTy::getBaseInfo when the receiver is a class because having a class as the receiver doesn't guarantee that the Base is exact. This is a follow-up to r263818. rdar://problem/25208167 llvm-svn: 264025
* [Perf-training] Fixing an issue with multi-threading PGO generationChris Bieneman2016-03-221-2/+5
| | | | | | When LIT parallelizes the profraw file generation we need to generate unique temp filenames then clean them up after the driver executes. llvm-svn: 264021
* Visual Studio Native Visualizations for constructors and methodsMike Spertus2016-03-221-23/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this change, the class struct A { A(int _i); ~A(); int foo(double d); double bar(A *a) { return 1.3; } }; appears in the VS2015 Locals Window as D 0x02dbb378 struct A |- DeclKind CXXRecord |- Members |- [0] implicit struct A |- [1] Constructor {A(int _i)} |- [2] Destructor {~A()} |- [3] Method {int foo(double d)} |- [4] Method {double bar(struct A *)} |- [Raw View] /* Other stuff */ Note that these changes only benefit VS2015 as VS2013 does not have views and only displays the struct name "A", but the change does no apparent harm in VS2013, so is still a win. llvm-svn: 264020
* [OpenMP] Base support for target directive codegen on NVPTX device.Arpith Chacko Jacob2016-03-225-6/+1052
| | | | | | | | | | | | | | Summary: This patch adds base support for codegen of the target directive on the NVPTX device. Reviewers: ABataev Differential Revision: http://reviews.llvm.org/D17877 Reworked test case after buildbot failure on windows. Updated patch to integrate r263837 and test case nvptx_target_firstprivate_codegen.cpp. llvm-svn: 264018
* [CUDA] Implement atomicInc and atomicDec builtinsJustin Lebar2016-03-222-1/+23
| | | | | | | | | | | | | | | These functions cannot be implemented as atomicrmw or cmpxchg instructions, so they are implemented as a call to the NVVM intrinsics @llvm.nvvm.atomic.load.inc.32.p0i32 and @llvm.nvvm.atomic.load.dec.32.p0i32. Patch by Jason Henline. Reviewers: jlebar Differential Revision: http://reviews.llvm.org/D18322 llvm-svn: 264009
* [sema] [CUDA] Use std algorithms in EraseUnwantedCUDAMatchesImpl.Justin Lebar2016-03-221-17/+14
| | | | | | | | | | | | Summary: NFC Reviewers: tra Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18327 llvm-svn: 264008
* Revert r263974, "clang-cl: With -fmsc-version=1900, use MSVS2015 diag ↵NAKAMURA Takumi2016-03-213-23/+9
| | | | | | | | formatting." It seems the test wouldn't expect if default target is *-win32. llvm-svn: 264007
* [Perf-training] Adding support for tests to skip the clang driverChris Bieneman2016-03-215-2/+69
| | | | | | | | | | This patch adds a new set of substitutions to the lit run lines for order files and PGO generation which run the clang driver to get the cc1 command, then execute the cc1 command directly. This allows the scripts to bypass profiling the clang driver over and over again. The approach in this patch was discussed via IRC with Sean Silvas. Special thanks to Daniel Dunbar whose out-of-tree code I liberally plagiarized. llvm-svn: 263997
* [modules] Store mangling numbers in a deterministic order so they don't ↵Richard Smith2016-03-212-6/+5
| | | | | | cause the resulting .pcm files to be nondeterministic. llvm-svn: 263996
* [modules] Renumber DECL_UPDATES from 30 to 50, so it no longer collides withRichard Smith2016-03-211-6/+10
| | | | | | | | TYPE_TEMPLATE_SPECIALIZATION. This was fine in practice because both record kinds are only ever found by offset, but made the llvm-bcanalyzer -dump output very confusing. llvm-svn: 263989
* Revert "Convert some ObjC msgSends to runtime calls."Pete Cooper2016-03-2110-336/+18
| | | | | | | | | | | | | | This reverts commit r263607. This change caused more objc_retain/objc_release calls in the IR but those are then incorrectly optimized by the ARC optimizer. Work is going to have to be done to ensure the ARC optimizer doesn't optimize user written RR, but that should land before this change. This change will also need to be updated to take account for any changes required to ensure that user written calls to RR are distinct from those inserted by ARC. llvm-svn: 263984
* clang-cl: With -fmsc-version=1900, use MSVS2015 diag formatting.Nico Weber2016-03-213-9/+23
| | | | llvm-svn: 263974
* [modules] Don't invent a module cache path unless implicit module builds are ↵Richard Smith2016-03-212-22/+24
| | | | | | enabled. llvm-svn: 263970
* clang-format: [JS] no space in union and intersection types.Daniel Jasper2016-03-213-0/+22
| | | | | | | | | The operators | and & in types, as opposed to the bitwise operators, should not have whitespace around them (e.g. `Foo<Bar|Baz>`). Patch by Martin Probst. Thank you. llvm-svn: 263961
* Add replacement = "xxx" to AvailabilityAttr.Manman Ren2016-03-2111-20/+66
| | | | | | | | | | | | This commit adds a named argument to AvailabilityAttr, while r263652 adds an optional string argument to __attribute__((deprecated)). This was commited in r263687 and reverted in 263752 due to misaligned access. rdar://20588929 llvm-svn: 263958
* [ARM] Clang tests for ARM Cortex-A32 supportRenato Golin2016-03-213-10/+21
| | | | | | Patch by Sam Parker. llvm-svn: 263957
* NFC: wrap Availability-related data in its own struct in AttributeList.Manman Ren2016-03-211-31/+32
| | | | | | This makes it easy to add more data into Availability. llvm-svn: 263955
* clang-cl: Move /FC from "Unsupported" to "Ignored" list.Nico Weber2016-03-212-1/+2
| | | | | | | /FC affects if diagnostics print with full paths and if __FILE__ expands with a full path. clang-cl does both of these two by default. llvm-svn: 263953
* clang-cl: support __cdecl-on-struct anachronismReid Kleckner2016-03-212-0/+12
| | | | | | | | | | | | | | | | | | | | | | Summary: The Microsoft compiler emits warning C4229: anachronism used : modifiers on data are ignored for struct {} __cdecl s; but ICU's gendict can generate such (and does when building LibreOffice), so accepting this in clang-cl too would be useful. Reviewers: rnk Patch by Stephan Bergmann Differential Revision: http://reviews.llvm.org/D16628 llvm-svn: 263947
* clang-format: Make include sorting's main include detection configurable.Daniel Jasper2016-03-215-3/+73
| | | | | | | | | | This patch adds a regular expression to configure suffixes of an included file to check whether it is the "main" include of the current file. Previously, clang-format has allowed arbitrary suffixes on the formatted file, which is still the case when no IncludeMainRegex is specified. llvm-svn: 263943
* Remove debug output. Sorry for the noise.NAKAMURA Takumi2016-03-211-1/+1
| | | | llvm-svn: 263936
* clang/test/CodeGenCXX/cxx1z-lambda-star-this.cpp: Satisfy -Asserts.NAKAMURA Takumi2016-03-211-7/+7
| | | | llvm-svn: 263934
* clang/test/Frontend/plugin-annotate-functions.c requires the target ↵NAKAMURA Takumi2016-03-211-0/+1
| | | | | | examples/AnnotateFunctions. llvm-svn: 263931
* Reorder data members to be consistent with member initializers, to silence ↵Faisal Vali2016-03-211-6/+6
| | | | | | warnings. llvm-svn: 263922
* [Cxx1z] Implement Lambda Capture of *this by Value as [=,*this] (P0018R3)Faisal Vali2016-03-2122-88/+379
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement lambda capture of *this by copy. For e.g.: struct A { int d = 10; auto foo() { return [*this] (auto a) mutable { d+=a; return d; }; } }; auto L = A{}.foo(); // A{}'s lifetime is gone. // Below is still ok, because *this was captured by value. assert(L(10) == 20); assert(L(100) == 120); If the capture was implicit, or [this] (i.e. *this was captured by reference), this code would be otherwise undefined. Implementation Strategy: - amend the parser to accept *this in the lambda introducer - add a new king of capture LCK_StarThis - teach Sema::CheckCXXThisCapture to handle by copy captures of the enclosing object (i.e. *this) - when CheckCXXThisCapture does capture by copy, the corresponding initializer expression for the closure's data member direct-initializes it thus making a copy of '*this'. - in codegen, when assigning to CXXThisValue, if *this was captured by copy, make sure it points to the corresponding field member, and not, unlike when captured by reference, what the field member points to. - mark feature as implemented in svn Much gratitude to Richard Smith for his carefully illuminating reviews! llvm-svn: 263921
* clang-cl: Add a comment about /Oy- (see r245913).Nico Weber2016-03-211-0/+1
| | | | llvm-svn: 263920
* Visual Studio Visualizers for clang::FunctionDeclMike Spertus2016-03-201-2/+42
| | | | | | | Readably displays a FunctionDecl in the Visual Studio Locals Window something like: void g(int, double d, struct A && arr) llvm-svn: 263915
OpenPOWER on IntegriCloud