- Dec 08, 2016
-
-
Richard Smith authored
We continue to support dynamic exception specifications in C++1z as an extension, but produce an error-by-default warning when we encounter one. This allows users to opt back into the feature with a warning flag, and implicitly opts system headers back into the feature should they happen to use it. There is one semantic change implied by P0003R5 but not implemented here: violating a throw() exception specification should now call std::terminate directly instead of calling std::unexpected(), but since P0003R5 also removes std::unexpected() and std::set_unexpected, and the default unexpected handler calls std::terminate(), a conforming C++1z program cannot tell that we are still calling it. The upside of this strategy is perfect backwards compatibility; the downside is that we don't get the more efficient 'noexcept' codegen for 'throw()'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289019 91177308-0d34-0410-b5e6-96231b3b80d8
-
Bruno Cardoso Lopes authored
Allows darwin targets to provide additional definitions and implementation specifc values for float.h rdar://problem/21961491 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289018 91177308-0d34-0410-b5e6-96231b3b80d8
-
David L. Jones authored
Summary: On actual Windows hosts :-) , this could report something other than the fallback, with a non-zero minor/build number. Reviewers: rnk, llvm-commits Differential Revision: https://reviews.llvm.org/D27554 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289011 91177308-0d34-0410-b5e6-96231b3b80d8
-
Bruno Cardoso Lopes authored
Currently -fstack-protector is on by default when using -ffreestanding. Change the default behavior to have it off when using -ffreestanding. rdar://problem/14089363 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289005 91177308-0d34-0410-b5e6-96231b3b80d8
-
David L. Jones authored
Summary: The MSVC toolchain and Clang driver combination currently uses a fairly complex sequence of steps to determine the MS compatibility version to pass to cc1. There is some oddness in this sequence currently, with some code which inspects flags in the toolchain, and some code which inspects the triple and local environment in the driver code. This change is an attempt to consolidate most of this logic so that Win32-specific code lives in MSVCToolChain.cpp. I'm not 100% happy with the split, so any suggestions are welcome. There are a few things you might want to watch for for specifically: - On all platforms, if MSVC compatibility flags are provided (and valid), use those. - The fallback sequence should be the same as before, but is now consolidated into MSVCToolChain::getMSVCVersion: - Otherwise, try to use the Triple. - Otherwise, on Windows, check the executable. - Otherwise, on Windows or with --fms-extensions, default to 18. - Otherwise, we can't determine the version. - MSVCToolChain::ComputeEffectiveTriple no longer calls the base ToolChain::ComputeEffectiveClangTriple. The only thing it would change for Windows the architecture, which we don't care about for the compatibility version. - I'm not sure whether this is philosophically correct (but it should be easy to add back to MSVCToolChain::getMSVCVersionFromTriple if not). - Previously, Tools.cpp just called getTriple() anyhow, so it doesn't look like the effective triple was always being used previously anyhow. Reviewers: hans, compnerd, llvm-commits, rnk Subscribers: amccarth Differential Revision: https://reviews.llvm.org/D27477 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288998 91177308-0d34-0410-b5e6-96231b3b80d8
-
David L. Jones authored
Summary: This change adds more test cases for the default MSVC compatibility version: 1. When -fms-extensions is supplied, but -fmsc-version and -fms-compatibility-version are not. 2. With the target triple specifies an MSVC environment, but no other -fms* flags. Reviewers: rnk, llvm-commits Subscribers: hans, compnerd, amccarth Differential Revision: https://reviews.llvm.org/D27498 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288997 91177308-0d34-0410-b5e6-96231b3b80d8
-
Bruno Cardoso Lopes authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288994 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 07, 2016
-
-
Malcolm Parsons authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288976 91177308-0d34-0410-b5e6-96231b3b80d8
-
Artem Belevich authored
* __host__ __device__ functions are no longer considered to be redeclarations of __host__ or __device__ functions. This prevents unintentional merging of target attributes across them. * Function target attributes are not considered (and must match) during explicit instantiation and specialization of function templates. Differential Revision: https://reviews.llvm.org/D25809 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288962 91177308-0d34-0410-b5e6-96231b3b80d8
-
Malcolm Parsons authored
Reviewers: aaron.ballman, klimek, doug.gregor, teemperor, rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26742 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288923 91177308-0d34-0410-b5e6-96231b3b80d8
-
Devin Coughlin authored
'infered' --> 'inferred' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288922 91177308-0d34-0410-b5e6-96231b3b80d8
-
Artem Dergachev authored
No functional change intended. Differential Revision: https://reviews.llvm.org/D27408 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288917 91177308-0d34-0410-b5e6-96231b3b80d8
-
Artem Dergachev authored
Avoids a crash and a related false positive. Investigation by Daniel Krupp! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288914 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alex Lorenz authored
This commit fixes PR20796. It implements the C only -Wstrict-prototypes warning. Clang now emits a warning for function declarations which have no parameters specified and for K&R function definitions with more than 0 parameters that are not preceded by a previous prototype declaration. The patch was originally submitted by Paul Titei! rdar://15060615 Differential Revision: https://reviews.llvm.org/D16533 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288896 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alex Lorenz authored
an Objective-C declaration This commit ensures that Sema won't enter a C++ declarator scope when the current context is an Objective-C declaration. This prevents an assertion failure in EnterDeclaratorContext that's used to ensure that current context will be restored correctly after exiting the declarator context. rdar://20560175 Differential Revision: https://reviews.llvm.org/D26922 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288893 91177308-0d34-0410-b5e6-96231b3b80d8
-
Sam McCall authored
Summary: Write output from compilation database test to %T rather than the working dir. Sometimes CWD isn't writable! Also specify no-canonical-prefixes so that clang has 'clang' in the name. Reviewers: bkramer Subscribers: joerg, cfe-commits Differential Revision: https://reviews.llvm.org/D27504 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288892 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bader authored
[OpenCL] Added a LIT test for ensuring address space mangling is done the same both in OpenCL1.2 and OpenCL2.0. Patch by Egor Churaev (echuraev). Reviewers: Anastasia Subscribers: yaxunl, cfe-commits, bader Differential Revision: https://reviews.llvm.org/D27403 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288891 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bader authored
Patch by Egor Churaev (echuraev). Reviewers: Anastasia Subscribers: bader, yaxunl, cfe-commits Differential Revision: https://reviews.llvm.org/D27300 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288890 91177308-0d34-0410-b5e6-96231b3b80d8
-
Duncan P. N. Exon Smith authored
As a first step toward removing Objective-C garbage collection from Clang, remove support from the driver. I'm hoping this will flush out any expected bots/configurations/whatever that might rely on it. I've left the options behind temporarily in -cc1 to keep tests passing. I'll kill them off entirely in a follow up when I've had a chance to update/delete the rest of Clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288872 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288870 91177308-0d34-0410-b5e6-96231b3b80d8
-
Erich Keane authored
[MS-ABI]V-base dtor called more than needed when throw happens in v-base ctor in window. Need add "complete object flag" check in eh cleanup code. The problem only happen on window ( A MS-ABI issuer ) The nature of the problem is virtual base dtor called more than it is needed after exception throw in inheriting base class(with virtual bases) ctor. The root problem is when throw happen, not all virtual base classes have been contructed, so not all virtual base dtors are need to call for ehcleanup. clang has code to handle vbase initialization: basically add check for "complete object flag" before call to v-base ctor. But that part is missing for cleanup code. To fix this add similar code as v-base init to cleanup code, same algorithm. 1> Add new routine: EmitDtorCompleteObjectHandler With corresponding to EmitCtorCompleteObjectHandler 2> In the EmitDestructorCal Call EmitDtorCompleteObjectHandler when generate ehcleanup inside ctor. Just add check for "complete object flag" before call to v-base dtor. Without my change: ehcleanup: ; preds = %ctor.skip_vbases %13 = cleanuppad within none [], !dbg !66 %14 = bitcast %struct.class_0* %this1 to i8*, !dbg !66 %15 = getelementptr inbounds i8, i8* %14, i64 8, !dbg !66 %16 = bitcast i8* %15 to %struct.class_2*, !dbg !66 call void @"\01??1class_2@@UEAA@XZ"(%struct.class_2* %16) #6 [ "funclet"(token %13) ], !dbg !66 cleanupret from %13 unwind to caller, !dbg !66 with my change: ehcleanup: ; preds = %ctor.skip_vbases %13 = cleanuppad within none [], !dbg !66 %14 = bitcast %struct.class_0* %this1 to i8*, !dbg !66 %15 = getelementptr inbounds i8, i8* %14, i64 8, !dbg !66 %16 = bitcast i8* %15 to %struct.class_2*, !dbg !66 %is_complete_object4 = icmp ne i32 %is_most_derived2, 0, !dbg !66 br i1 %is_complete_object4, label %Dtor.dtor_vbase, label %Dtor.skip_vbase, !d bg !66 Dtor.dtor_vbase: ; preds = %ehcleanup call void @"\01??1class_2@@UEAA@XZ"(%struct.class_2* %16) #6 [ "funclet"(token %13) ], !dbg !66 br label %Dtor.skip_vbase, !dbg !66 Dtor.skip_vbase: ; preds = %Dtor.dtor_vbase, %ehcleanup cleanupret from %13 unwind to caller, !dbg !66 Please let me know you need more info. Patch by Jennifer Yu. Differential Revision: https://reviews.llvm.org/D27358 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288869 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288868 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
When an object of class type is initialized from a prvalue of the same type (ignoring cv qualifications), use the prvalue to initialize the object directly instead of inserting a redundant elidable call to a copy constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288866 91177308-0d34-0410-b5e6-96231b3b80d8
-
Kelvin Li authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288862 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 06, 2016
-
-
Reid Kleckner authored
Our -Wweak-vtables diagnostic is powered by our key function calculation, which checks if key functions are enabled. We won't find any key functions in C++ ABIs that lack key functions, so -Wweak-vtables was warning on every dynamic class before this change. So, turn off this warning in ABIs without key functions. Addresses PR31220 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288850 91177308-0d34-0410-b5e6-96231b3b80d8
-
Kelvin Li authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288838 91177308-0d34-0410-b5e6-96231b3b80d8
-
Joerg Sonnenberger authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288828 91177308-0d34-0410-b5e6-96231b3b80d8
-
Joerg Sonnenberger authored
"-mlinker-version=264.3.102" automatically. Wiring down a target on the other hand is problematic as this actually needs to run codegen and doesn't work with -###. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288827 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
We didn't implement handle corner cases like: - lambdas used to initialize a field - lambdas in default argument initializers This fixes PR31197. Differential Revision: https://reviews.llvm.org/D27226 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288826 91177308-0d34-0410-b5e6-96231b3b80d8
-
Joerg Sonnenberger authored
Otherwise it would change when DEFAULT_SYSROOT is provided. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288823 91177308-0d34-0410-b5e6-96231b3b80d8
-
Joerg Sonnenberger authored
is seen, record one with the implicit default. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288822 91177308-0d34-0410-b5e6-96231b3b80d8
-
Joerg Sonnenberger authored
When integrating compilation database output into existing build systems, two approaches dominate so far. Ad-hoc implementation of the JSON output rules or using compiler wrappers. This patch adds a new option "-MJ foo.json" which gives a slightly cleaned up compilation record. The output is a fragment, i.e. you still need to add the array markers, but it allows multiple files to be easy merged. This way the only change in a build system is adding the option with potentially a per-target output file and merging the files with something like (echo '['; cat *.o.json; echo ']' > compilation_database.json or some additional filtering to remove the trailing comma for strict JSON compliance. Differential Revision: https://reviews.llvm.org/D27140 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288821 91177308-0d34-0410-b5e6-96231b3b80d8
-
Jonathan Roelofs authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288818 91177308-0d34-0410-b5e6-96231b3b80d8
-
Malcolm Parsons authored
Patch by Michael Sharpe. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288813 91177308-0d34-0410-b5e6-96231b3b80d8
-
Benjamin Kramer authored
It should already be handled but a typo in the LANGSTANDARD() definition was introduced in r147220. Patch by Alexander Richardson, test case by me. Differential Revision:https://reviews.llvm.org/D27427 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288793 91177308-0d34-0410-b5e6-96231b3b80d8
-
Mandeep Singh Grang authored
Summary: Related llvm patch: https://reviews.llvm.org/D27359 Reviewers: echristo, t.p.northover, rengolin, grosbach, compnerd Subscribers: mehdi_amini, cfe-commits, llvm-commits Tags: #clang-c Differential Revision: https://reviews.llvm.org/D27360 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288762 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Trieu authored
- Rename CheckMinZero to CheckMaxUnsignedZero to reflect its actual purpose. - Remove unused parameters from CheckAbsoluteValueFunction and CheckMaxUnsignedZero functions. - Refactor the function name check so both functions can use the same one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288756 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
Recover better from an incompatible .pcm file being provided by -fmodule-file=. We try to include the headers of the module textually in this case, still enforcing the modules semantic rules. In order to make that work, we need to still track that we're entering and leaving the module. Also, if the module was also marked as unavailable (perhaps because it was missing a file), we shouldn't mark the module unavailable -- we don't need the module to be complete if we're going to enter it textually. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288741 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Trieu authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288740 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288738 91177308-0d34-0410-b5e6-96231b3b80d8
-