summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* [ProfileData] (clang) Use Error in InstrProf and Coverage, NFCVedant Kumar2016-05-133-10/+14
| | | | | | Sync up with "(llvm) Use Error in InstrProf and Coverage". llvm-svn: 269463
* Add an AST matcher for CastExpr kindEtienne Bergeron2016-05-132-0/+23
| | | | | | | | | | | | | | Summary: This AST matcher will match a given CastExpr kind. It's an narrowing matcher on CastExpr. Reviewers: klimek, alexfh, sbenza, aaron.ballman Subscribers: Prazek, jroelofs, aaron.ballman, klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D19871 llvm-svn: 269460
* Use marginally more appropriate functions to detect if we should declare anRichard Smith2016-05-132-5/+6
| | | | | | | implicit copy constructor/assignment, and other minor cleanups. No functionality change intended. llvm-svn: 269457
* Revert "[OpenCL] Add supported OpenCL extensions to target info."Yaxun Liu2016-05-134-65/+14
| | | | | | | | | Revert r269431 due to build failure caused by warning msg: llvm/tools/clang/lib/Basic/Targets.cpp:2090:9: error: 'setSupportedOpenCLOpts' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override] void setSupportedOpenCLOpts() { llvm-svn: 269435
* [OpenCL] Add supported OpenCL extensions to target info.Yaxun Liu2016-05-134-14/+65
| | | | | | | | Add supported OpenCL extensions to target info. It serves as default values to save the users of the burden setting each supported extensions and optional core features in command line. Differential Revision: http://reviews.llvm.org/D19484 llvm-svn: 269431
* Prune four superfluous ExternalSemaSource.h includes and one forward ↵Yaron Keren2016-05-134-4/+0
| | | | | | | | declaration in Sema.h where ExternalSemaSource.h was already included due to ExternalSemaSource:: member uses. llvm-svn: 269423
* [CodeGen] Clang does not choose aapcs-vfp calling convention for ARM bare ↵Oleg Ranevskyy2016-05-131-1/+2
| | | | | | | | | | | | | | | | | | | metal target with hard float (EABIHF) Summary: Clang does not detect `aapcs-vfp` for the EABIHF environment. The reason is that only GNUEABIHF is considered while choosing calling convention, EABIHF is ignored. This causes clang to use `aapcs` for EABIHF and add the `arm_aapcscc` specifier to functions in generated IR. The modified `arm-cc.c` test checks that no calling convention specifier is added to functions for EABIHF, which means the default one is used (`CallingConv::ARM_AAPCS_VFP`). Reviewers: rengolin, compnerd, t.p.northover Subscribers: aemerson, rengolin, asl, cfe-commits Differential Revision: http://reviews.llvm.org/D20219 llvm-svn: 269419
* [AST] Add missing const qualifiers to AstContext in Type.cppEtienne Bergeron2016-05-131-9/+9
| | | | | | | | | | | | | | | | Summary: Add some missing const qualifiers to AstContext. The ASTContext can't be modified with accessors. There is no behavior change. This patch is cleanup only. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20226 llvm-svn: 269418
* Simplify getLinuxDynamicLinker() by using a common variable for the triple. NFC.Vasileios Kalintiris2016-05-131-13/+12
| | | | llvm-svn: 269412
* [mips] Consult triple's vendor field before using musl's interpreter.Vasileios Kalintiris2016-05-131-1/+3
| | | | | | This should affect only the mips-mti-linux toolchain. llvm-svn: 269411
* [ms][dll] #27212: Generating of implicit special members should take into ↵Dmitry Polukhin2016-05-131-4/+6
| | | | | | | | | | | | | | account MSVC compatibility version Clang creates implicit move constructor/assign operator in all cases if there is std=c++11. But MSVC supports such generation starting from version 1900 only. As result we have some binary incompatibility. Differential Revision: http://reviews.llvm.org/D19156 Patch by Andrew V. Tischenko llvm-svn: 269400
* Add support for derived class special members hiding functions brought in fromRichard Smith2016-05-135-35/+90
| | | | | | | | | a base class via a using-declaration. If a class has a using-declaration declaring either a constructor or an assignment operator, eagerly declare its special members in case they need to displace a shadow declaration from a using-declaration. llvm-svn: 269398
* [ObjC][CodeGen] Remove an assert that is no longer correct.Akira Hatanaka2016-05-131-3/+10
| | | | | | | | | | | | | | | | | | clang asserts when compiling the following code because r231508 made changes to promote constant temporary arrays and records to globals with constant initializers: std::vector<NSString*> strs = {@"a", @"b"}; This commit changes the code to return early if the object returned by createReferenceTemporary is a global variable with an initializer. rdar://problem/25504992 rdar://problem/25955179 Differential Revision: http://reviews.llvm.org/D20045 llvm-svn: 269385
* Preserve the FoundDecl properly in constructor overload resolution. NoRichard Smith2016-05-121-9/+5
| | | | | | functionality change; this information is not yet in use. llvm-svn: 269382
* Refactor constant expression evaluation of CXXConstructExpr to reduce ↵Richard Smith2016-05-121-35/+18
| | | | | | duplication between array and class initialization. llvm-svn: 269367
* [AST] Move operations enum to a definition file.Etienne Bergeron2016-05-121-160/+6
| | | | | | | | | | | | | | | | | | | Summary: This patch moves the enum definitions to a definition (.def) file. These modifications provide way to list enumerators of a given type. As an example, this allow parsing of "kinds" in the dynamic matchers. see: http://reviews.llvm.org/D19871 The dynamic matcher "ofKind" also required this patch to be fixed. Reviewers: klimek, aaron.ballman, rsmith Subscribers: klimek, sbenza, alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D20207 llvm-svn: 269347
* [Tooling] Fix broken dependency for shared buildEtienne Bergeron2016-05-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: There virtual destructor can't be found and cause a compilation error on a shared build. To repro: [Release + Shared] ``` -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON ``` Which produce this error: ``` tools/clang/unittests/Tooling/CMakeFiles/ToolingTests.dir/ToolingTest.cpp.o: In function `clang::tooling::newFrontendActionFactory_CreatesFrontendActionFactoryFromType_Test::TestBody()': ToolingTest.cpp:(.text._ZN5clang7tooling66newFrontendActionFactory_CreatesFrontendActionFactoryFromType_Test8TestBodyEv+0x49): undefined reference to `clang::SyntaxOnlyAction::~SyntaxOnlyAction()' ``` Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20218 llvm-svn: 269334
* [VFS] Reapply #2: Reconstruct the VFS overlay tree for more accurate lookupBruno Cardoso Lopes2016-05-121-1/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reapply r269100 and r269270, reverted due to https://llvm.org/bugs/show_bug.cgi?id=27725. Isolate the testcase that corresponds to the new feature side of this commit and skip it on windows hosts until we find why it does not work on these platforms. Original commit message: The way we currently build the internal VFS overlay representation leads to inefficient path search and might yield wrong answers when asked for recursive or regular directory iteration. Currently, when reading an YAML file, each YAML root entry is placed inside a new root in the filesystem overlay. In the crash reproducer, a simple "@import Foundation" currently maps to 43 roots, and when looking up paths, we traverse a directory tree for each of these different roots, until we find a match (or don't). This has two consequences: - It's slow. - Directory iteration gives incomplete results since it only return results within one root - since contents of the same directory can be declared inside different roots, the result isn't accurate. This is in part fault of the way we currently write out the YAML file when emitting the crash reproducer - we could generate only one root and that would make it fast and correct again. However, we should not rely on how the client writes the YAML, but provide a good internal representation regardless. Build a proper virtual directory tree out of the YAML representation, allowing faster search and proper iteration. Besides the crash reproducer, this potentially benefits other VFS clients. llvm-svn: 269327
* [ubsan] Add -fsanitize-undefined-strip-path-components=NFilipe Cabecinhas2016-05-123-1/+35
| | | | | | | | | | | | | | | | | | | Summary: This option allows the user to control how much of the file name is emitted by UBSan. Tuning this option allows one to save space in the resulting binary, which is helpful for restricted execution environments. With a positive N, UBSan skips the first N path components. With a negative N, UBSan only keeps the last N path components. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19666 llvm-svn: 269309
* [OpenCL] Output OpenCL version in diagnostics.Anastasia Stulova2016-05-121-3/+8
| | | | | | | | | | | | | | Diagnostics should note version dependent issues by giving a hint about current version being compiled for. This patch changes diagnostics of static storage class specifier and generic type qualifier to specify OpenCL version as well as converts other diagnostics to match the style. Patch by Vedran Miletic! Review: http://reviews.llvm.org/D19780 llvm-svn: 269305
* clang-format: [JS] respect clang-format off when requoting strings.Martin Probst2016-05-121-1/+1
| | | | | | | | | | Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D20200 llvm-svn: 269282
* [Driver] Squash misleading indentation warning.Marcin Koscielnicki2016-05-121-6/+6
| | | | llvm-svn: 269279
* Revert "[VFS] Reapply r269100: Reconstruct the VFS overlay tree for more ↵Bruno Cardoso Lopes2016-05-121-80/+1
| | | | | | | | | | accurate lookup" Reverts r269270, buildbots still failing: http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/12119 http://bb.pgr.jp/builders/ninja-clang-i686-msc19-R/builds/2847 llvm-svn: 269276
* [MS ABI] Don't crash when zero-initializing a vbase which contains a vbaseDavid Majnemer2016-05-121-0/+3
| | | | | | | | | | | | | | | | Bases can be zero-initialized: the storage is zero-initialized before the base constructor is run. The MS ABI has a quirk where base VBPtrs are not installed by the base constructor but by the most derived class. In particular, they are installed before the base constructor is run. The derived constructor must be careful to zero-initialize only the bits of the class which haven't already been populated by virtual base pointers. While we correctly avoided this scenario, we didn't handle the case where the base class has virtual bases which have virtual bases. llvm-svn: 269271
* [VFS] Reapply r269100: Reconstruct the VFS overlay tree for more accurate lookupBruno Cardoso Lopes2016-05-121-1/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way we currently build the internal VFS overlay representation leads to inefficient path search and might yield wrong answers when asked for recursive or regular directory iteration. Currently, when reading an YAML file, each YAML root entry is placed inside a new root in the filesystem overlay. In the crash reproducer, a simple "@import Foundation" currently maps to 43 roots, and when looking up paths, we traverse a directory tree for each of these different roots, until we find a match (or don't). This has two consequences: - It's slow. - Directory iteration gives incomplete results since it only return results within one root - since contents of the same directory can be declared inside different roots, the result isn't accurate. This is in part fault of the way we currently write out the YAML file when emitting the crash reproducer - we could generate only one root and that would make it fast and correct again. However, we should not rely on how the client writes the YAML, but provide a good internal representation regardless. This patch builds a proper virtual directory tree out of the YAML representation, allowing faster search and proper iteration. Besides the crash reproducer, this potentially benefits other VFS clients. llvm-svn: 269270
* Fixed msvc warningsSimon Pilgrim2016-05-111-0/+2
| | | | llvm-svn: 269242
* Preserve the FoundDecl when performing overload resolution for constructors.Richard Smith2016-05-1111-192/+193
| | | | | | | | | This is in preparation for C++ P0136R1, which switches the model for inheriting constructors over from synthesizing a constructor to finding base class constructors (via using shadow decls) when looking for derived class constructors. llvm-svn: 269231
* [analyzer] Fix crash in ObjCGenericsCheckerDevin Coughlin2016-05-111-0/+25
| | | | | | | | | | | | | | | Fix a crash in the generics checker where DynamicTypePropagation tries to get the superclass of a root class. This is a spot-fix for a deeper issue where the checker makes assumptions that may not hold about subtyping between the symbolically-tracked type of a value and the compile-time types of a cast on that value. I've added a TODO to address the underlying issue. rdar://problem/26086914 llvm-svn: 269227
* [MSVC] Implementation of __unaligned as a proper type qualifierAndrey Bokhanko2016-05-1111-24/+82
| | | | | | | | | | | This patch implements __unaligned (MS extension) as a proper type qualifier (before that, it was implemented as an ignored attribute). It also fixes PR27367 and PR27666. Differential Revision: http://reviews.llvm.org/D20103 llvm-svn: 269220
* Relax -Wcalling-convention-cast when casting to the default convention (cdecl)Reid Kleckner2016-05-111-1/+9
| | | | llvm-svn: 269214
* Embed bitcode in object file (clang cc1 part)Steven Wu2016-05-115-9/+159
| | | | | | | | | | | | | | | | | | | Summary: Teach clang to embed bitcode inside bitcode. When -fembed-bitcode cc1 option is used, clang will embed both the input bitcode and cc1 commandline into the bitcode in special sections before compiling to the object file. Using -fembed-bitcode-marker will only introduce a marker in both sections. Depends on D17390 Reviewers: rsmith Subscribers: yaron.keren, vsk, cfe-commits Differential Revision: http://reviews.llvm.org/D17392 llvm-svn: 269202
* Update clang support on recent HaikuReid Kleckner2016-05-115-41/+108
| | | | | | | | | | | | | | | | | | [ Copied from https://llvm.org/bugs/show_bug.cgi?id=26404 ] clang support on Haiku is lagging a bit, and missing on x86_64. This patch updates support for x86 and add support for x86_64. It should apply directly to trunk and it's harmless in the sense that it only affects Haiku. Reviewers: rnk, rsmith Patch by Jérôme Duval Differential Revision: http://reviews.llvm.org/D16797 llvm-svn: 269201
* [tooling] FixItHint Tooling refactoringEtienne Bergeron2016-05-112-0/+32
| | | | | | | | | | | | | | Summary: This is the refactoring to lift some FixItHint into tooling. used by: http://reviews.llvm.org/D19807 Reviewers: klimek, alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19941 llvm-svn: 269188
* [clang][AVX512] completing missing set intrinsicsMichael Zuckerman2016-05-111-0/+42
| | | | | | Differential Revision: http://reviews.llvm.org/D20099 llvm-svn: 269172
* [clang][AVX512] completing missing intrinsics for [vpermt2d|vptestm] ↵Michael Zuckerman2016-05-111-41/+100
| | | | | | | | instruction set. Differential Revision: http://reviews.llvm.org/D20096 llvm-svn: 269170
* Hopefully bring llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast back to lifeSean Silva2016-05-111-80/+1
| | | | | | | | | Bruno made a couple valiant attempts but the bot is still red. This reverts r269100 (primary commit), r269108 (fix attempt), r269133 (fix attempt). llvm-svn: 269160
* [Sema] Fix value-dependent enable_if bug.George Burgess IV2016-05-111-13/+6
| | | | | | | | | | | | | | | This patch fixes a bug where we would assume all value-dependent enable_if conditions give successful results. Instead, we consider value-dependent enable_if conditions to always fail. While this isn't ideal, this is the best we can realistically do without changing both enable_if's semantics and large parts of Sema (specifically, all of the parts that don't expect type dependence to come out of nowhere, and that may interact with overload resolution). Differential Revision: http://reviews.llvm.org/D20130 llvm-svn: 269154
* Add -Wcast-calling-convention to warn when casting away calling conventionsReid Kleckner2016-05-101-1/+88
| | | | | | | | | | | | | | | | | | | | | | Summary: This only warns on casts of the address of a function defined in the current TU. In this case, the fix is likely to be local and the warning useful. Here are some things we could experiment with in the future: - Fire on declarations as well as definitions - Limit the warning to non-void function prototypes - Limit the warning to mismatches of caller and callee cleanup CCs This warning is currently off by default while we study its usefulness. Reviewers: thakis, rtrieu Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D17348 llvm-svn: 269116
* Update clang for LLVM API change.Peter Collingbourne2016-05-101-3/+1
| | | | llvm-svn: 269111
* [VFS] Reconstruct the VFS overlay tree for more accurate lookupBruno Cardoso Lopes2016-05-101-1/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way we currently build the internal VFS overlay representation leads to inefficient path search and might yield wrong answers when asked for recursive or regular directory iteration. Currently, when reading an YAML file, each YAML root entry is placed inside a new root in the filesystem overlay. In the crash reproducer, a simple "@import Foundation" currently maps to 43 roots, and when looking up paths, we traverse a directory tree for each of these different roots, until we find a match (or don't). This has two consequences: - It's slow. - Directory iteration gives incomplete results since it only return results within one root - since contents of the same directory can be declared inside different roots, the result isn't accurate. This is in part fault of the way we currently write out the YAML file when emitting the crash reproducer - we could generate only one root and that would make it fast and correct again. However, we should not rely on how the client writes the YAML, but provide a good internal representation regardless. This patch builds a proper virtual directory tree out of the YAML representation, allowing faster search and proper iteration. Besides the crash reproducer, this potentially benefits other VFS clients. llvm-svn: 269100
* Introduce CGCXXABI::canCallMismatchedFunctionTypeDerek Schuff2016-05-103-4/+16
| | | | llvm-svn: 269089
* more cleanupDerek Schuff2016-05-101-4/+4
| | | | llvm-svn: 269088
* Clarify condition, remove redundant checkDerek Schuff2016-05-101-5/+7
| | | | llvm-svn: 269087
* Clean up condition, add ARM to testDerek Schuff2016-05-101-8/+9
| | | | llvm-svn: 269086
* Do not register incompatible C++ destructors with __cxa_atexitDerek Schuff2016-05-101-3/+7
| | | | | | | | | | | | | | | | | | | | | | Summary: For a static object with a nontrivial destructor, clang generates an initializer function (__cxx_global_var_init) which registers that object's destructor using __cxa_atexit. However some ABIs (ARM, WebAssembly) use destructors that return 'this' instead of having void return (which does not match the signature of function pointers passed to __cxa_atexit). This results in undefined behavior when the destructors are called. All the calling conventions I know of on ARM can tolerate this, but WebAssembly requires the signatures of indirect calls to match the called function. This patch disables that direct registration of destructors for ABIs that have this-returning destructors. Subscribers: aemerson, jfb, cfe-commits, dschuff Differential Revision: http://reviews.llvm.org/D19275 llvm-svn: 269085
* [Clang][AVX512] completing missing intrinsics [load/store]Michael Zuckerman2016-05-101-16/+117
| | | | | | Differential Revision: http://reviews.llvm.org/D20063 llvm-svn: 269056
* [OPENMP 4.5] Initial codegen for 'priority' clause in task-basedAlexey Bataev2016-05-103-2/+16
| | | | | | | | | directives. OpenMP 4.5 supports clause 'priority' in task-based directives. Patch adds initial codegen support for this clause in codegen. llvm-svn: 269050
* [Clang][AVX512] completing missing intrinsics [vmin/vmax]{sd|sq|uq|ud}.Michael Zuckerman2016-05-101-1/+145
| | | | | | Differential Revision: http://reviews.llvm.org/D20064 llvm-svn: 269042
* [OPENMP 4.0] Fixed codegen for destructors in task-based directives.Alexey Bataev2016-05-102-16/+30
| | | | | | | | If private variables require destructors call at the deletion of the task, additional flag in task flags must be set. Patch fixes this problem. llvm-svn: 269039
* [Clang][AVX512] completing missing intrinsics [vextractf].Michael Zuckerman2016-05-101-6/+33
| | | | | | Differential Revision: http://reviews.llvm.org/D20061 llvm-svn: 269037
OpenPOWER on IntegriCloud