This exposes the Clang API bindings clang_getChildDiagnostics (which returns a
CXDiagnosticSet) and clang_getNumDiagnosticsInSet / clang_getDiagnosticInSet (to
traverse the CXDiagnosticSet), and adds a helper children property in the Python
Diagnostic wrapper.
Also, this adds the missing OVERLOAD_CANDIDATE (700) cursor type.
Patch by Hanson Wang!
llvm-svn: 268167
Summary:
Host and device types must match, otherwise when we pass values back and
forth between the host and device, we will get the wrong result.
This patch makes NVPTXTargetInfo inherit most of its type information
from the host's target info.
Reviewers: rsmith
Subscribers: cfe-commits, jhen, tra
Differential Revision: http://reviews.llvm.org/D19346
llvm-svn: 268131
In r268085 "[MS] Make #pragma pack use PragmaStack<> class." there was an
uninitialized variable 'Alignment', which caused the following failure:
http://lab.llvm.org:8011/builders/sanitizer-ppc64be-linux/builds/1758
Zero-initialize the variable to fix this failure.
llvm-svn: 268129
Summary:
This patch adds a new driver warning -Wincompatible-sdk which notifies the user when they are mismatching the version min options and the sysroot.
The patch works by checking the sysroot (if present) for an SDK name, then matching that against the target platform. In the case of a mismatch it logs a warning.
Reviewers: bob.wilson, rsmith
Subscribers: rsmith, edward-san, cfe-commits
Differential Revision: http://reviews.llvm.org/D18088
llvm-svn: 268127
a selector, the entry should be complete, containing everything introduced by
that module and all modules it imports.
Before writing out the method pool of a module, we sync up the out of date
selectors by pulling in methods for the selectors, from all modules it imports.
In ReadMethodPool, after pulling in the method pool entry for module A, this
lets us skip the modules that module A imports.
rdar://problem/25900131
llvm-svn: 268091
Make implementation of #pragma pack consistent with other "stack" pragmas.
Use PragmaStack<> class instead of old representation of internal stack.
Don't change compiler's behavior.
TODO:
1. Introduce diagnostics on popping named slots from pragma stacks.
Reviewer: rnk
Differential revision: http://reviews.llvm.org/D19727
llvm-svn: 268085
Fix crash in BuildCXXDefaultInitExpr when member of template class has
same name as the class itself.
Based on patch by Raphael "Teemperor" Isemann!
Differential Revision: http://reviews.llvm.org/D19721
llvm-svn: 268082
Summary: The Darwin armv7k ABI uses Dwarf EH, so we need to set the OS define correctly. Without this the gcc_personality fails to build.
Reviewers: t.p.northover
Subscribers: aemerson, cfe-commits, rengolin
Differential Revision: http://reviews.llvm.org/D19693
llvm-svn: 268078
This patch adds coverage for additional cases where implicit conversion can
occur (assignment and return). It also adds tests for some cases where a
warning should occur but none is produced. These are marked as FIXME.
Differential Revision: http://reviews.llvm.org/D16298
llvm-svn: 268075
The 'nodebug' attribute had hand-coded constraints; replace those with
a Subjects line in Attr.td.
Also add a missing test to verify the attribute is okay on an
Objective-C method.
Differential Revision: http://reviews.llvm.org/D19689
llvm-svn: 268065
Summary:
Conversions between float and half are only available when the
taraget has the half-precision extension. Guard these intrinsics
so that they don't cause crashes in the backend.
Fixes PR27550.
Reviewers: rengolin, t.p.northover
Subscribers: cfe-commits, aemerson, t.p.northover, rengolin
Differential Revision: http://reviews.llvm.org/D19665
llvm-svn: 268047
Slightly updated version, double-checked build and tests.
Improve implementation of MS pragmas that use stack + compatibility fixes.
This patch:
1. Changes implementation of #pragma vtordisp to use PragmaStack class
that other stack pragmas use;
2. Fixes "#pragma vtordisp()" behavior - it shouldn't affect the stack;
3. Supports "save-restore" of pragma stacks on enter / exit a C++ method
body, as MSVC does.
TODO:
1. Change implementation of #pragma pack to use the same approach;
2. Introduce diagnostics on popping named stack slots, as MSVC does.
Reviewers:
rnk, thakis
Differential revision: http://reviews.llvm.org/D19361
llvm-svn: 268029
if we are parsing a template specialization.
This commit makes changes to clear the TemplateParamScope bit and set
the TemplateParamParent field of the current scope to null if a template
specialization is being parsed.
Before this commit, Sema::ActOnStartOfLambdaDefinition would check
whether the parent template scope had any decls to determine whether
or not a template specialization was being parsed. This wasn't correct
since it couldn't distinguish between a real template specialization and
a template defintion with an unnamed template parameter (only template
parameters with names are added to the scope's decl list). To fix the
bug, this commit changes the code to check the pointer to the parent
template scope rather than the decl list.
rdar://problem/23440346
Differential Revision: http://reviews.llvm.org/D19175
llvm-svn: 267975
http://reviews.llvm.org/D18474
This patch fixes a bug in code generation of the correct OpenMP runtime library call in presence of target and teams, when target is separated by teams with multiple curly brackets. The current implementation will not be able to see the teams directive inside target and issue a call to tgt_target instead of the correct one tgt_target_teams.
llvm-svn: 267972
mangled name if it happened to be declared in an 'extern "C++"' context. This
also causes us to use the '_ZL' mangling rather than the '_Z' mangling for
internal-linkage entities that are wrapped in a language linkage construct.
llvm-svn: 267969
Usually these parameters are used solely to initialize the field in the
initializer list, and there is no real shadowing confusion.
There is a new warning under -Wshadow called
-Wshadow-field-in-constructor-modified. It attempts to find
modifications of such constructor parameters that probably intended to
modify the field.
It has some false negatives, though, so there is another warning group,
-Wshadow-field-in-constructor, which always warns on this special case.
For users who just want the old behavior and don't care about these fine
grained groups, we have a new warning group called -Wshadow-all that
activates everything.
Fixes PR16088.
Reviewers: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D18271
llvm-svn: 267957
with a generic lambda.
This patch fixes Sema::InstantiateVariableInitializer to switch to the
context of the variable before instantiating its initializer, which is
necessary to set the correct type for VarTemplateSpecializationDecl.
This is the first part of the patch that was reviewed here:
http://reviews.llvm.org/D19175
rdar://problem/23440346
llvm-svn: 267956
When comparing unqualified types, canonical types should be used, otherwise equivalent types may be treated as different type.
Differential Revision: http://reviews.llvm.org/D19662
llvm-svn: 267906
It's a little debateable because we're not truly AAPCS, so I'm
certainly not going to define __ARM_PCS, but __ARM_PCS_VFP seems to be
really an "hard-float" define, which is a useful thing to have.
llvm-svn: 267880
Summary:
Port rL265324 to SystemZ to allow using the 'swiftcall' attribute on that architecture.
Depends on D19414.
Reviewers: kbarton, rjmccall, uweigand
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D19432
llvm-svn: 267879
OpenMP 4.5 defines 'taskloop simd' directive, which is combined
directive for 'taskloop' and 'simd' directives. Patch adds initial
codegen support for this directive and its 2 basic clauses 'safelen' and
'simdlen'.
llvm-svn: 267872
It makes compiler-rt tests fail if the gold plugin is enabled.
Revert "Rework interface for bitset-using features to use a notion of LTO visibility."
Revert "Driver: only produce CFI -fvisibility= error when compiling."
Revert "clang/test/CodeGenCXX/cfi-blacklist.cpp: Exclude ms targets. They would be non-cfi."
llvm-svn: 267871
Summary:
According to the ACLE spec, "__ARM_FEATURE_FMA is defined to 1 if
the hardware floating-point architecture supports fused floating-point
multiply-accumulate".
This changes clang's behaviour from emitting this macro for v7-A and v7-R
cores to only emitting it when the target has VFPv4 (and therefore support
for the floating point multiply-accumulate instruction).
Fixes PR27216
Reviewers: t.p.northover, rengolin
Subscribers: aemerson, rengolin, cfe-commits
Differential Revision: http://reviews.llvm.org/D18963
llvm-svn: 267869