| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
we'll do spell checking. Note that spell checking will change the produced AST, so we don't automatically change this value when someone sets -ferror-limit=. With this, merge test typo-correction-pt2.cpp into typo-correction.cpp.
Remove Sema::UnqualifiedTyposCorrected, a cache of corrected typos. It would only cache typo corrections that didn't provide ValidateCandidate of which there were few left, and it had a bug when we had the same identifier spelled wrong twice. See the last two tests in typo-correction.cpp for cases this fires.
llvm-svn: 224375
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In SemaCUDA all implicit functions were considered host device, this led to
errors such as the following code snippet failing to compile:
struct Copyable {
const Copyable& operator=(const Copyable& x) { return *this; }
};
struct Simple {
Copyable b;
};
void foo() {
Simple a, b;
a = b;
}
Above the implicit copy assignment operator was inferred as host device but
there was only a host assignment copy defined which is an error in device
compilation mode.
Differential Revision: http://reviews.llvm.org/D6565
llvm-svn: 224358
|
|
|
|
|
|
|
| |
Bitfield RefersToEnclosingLocal of Stmt::DeclRefExprBitfields renamed to RefersToCapturedVariable to reflect latest changes introduced in commit 224323. Also renamed method Expr::refersToEnclosingLocal() to Expr::refersToCapturedVariable() and comments for constant arguments.
No functional changes.
llvm-svn: 224329
|
|
|
|
|
|
|
|
| |
Currently, if global variable is marked as a private OpenMP variable, the compiler crashes in debug version or generates incorrect code in release version. It happens because in the OpenMP region the original global variable is used instead of the generated private copy. It happens because currently globals variables are not captured in the OpenMP region.
This patch adds capturing of global variables iff private copy of the global variable must be used in the OpenMP region.
Differential Revision: http://reviews.llvm.org/D6259
llvm-svn: 224323
|
|
|
|
|
|
|
|
|
|
|
| |
Turning our _Atomic L-value into an R-value removes its _Atomic-ness.
However, we didn't update our 'FromType' which made
ScalarTypeToBooleanCastKind think we were trying to pass it a
non-scalar.
This fixes PR21836.
llvm-svn: 224322
|
|
|
|
|
|
| |
__attribute__((enable_if)), both in the condition expression and at the call site. Fixes PR20988!
llvm-svn: 224320
|
|
|
|
|
|
|
|
| |
Update the comments to make it more clear what's going on, and address
Richard's comments from PR21718. This doesn't fix that bug, but hopefully
makes the code easier to understand.
llvm-svn: 224303
|
|
|
|
|
|
|
|
|
|
| |
We know that const_cast<char *>((void)Something) is ill-formed, even if
'Something' is dependent because you can't cast from void to a pointer
type.
This fixes PR21845.
llvm-svn: 224299
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we would attempt to build a TypeSourceInfo for a null type,
and then we would forget to pop the function scope before returning an
error.
Reviewers: rsmith
Differential Revision: http://reviews.llvm.org/D6665
llvm-svn: 224271
|
|
|
|
|
|
| |
Patch by Anders Rönnholm
llvm-svn: 224268
|
|
|
|
|
|
| |
different declaration of the same function.
llvm-svn: 224256
|
|
|
|
|
|
|
|
|
|
|
| |
Don't send a value dependent expression into the expression evaluator,
HandleSizeof would crash. Making HandleSizeof handle dependent types
would noisily warn about the operation even if everything turns out OK
after instantiation.
This fixes PR21848.
llvm-svn: 224240
|
|
|
|
|
|
|
|
|
| |
We would exit Sema::ActOnFinishSwitchStmt early if we didn't have a
body. This would leave an extra SwitchStmt on the SwitchStack.
This fixes PR21841.
llvm-svn: 224237
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the simplest case, which is used when no chunk_size is specified in
the schedule(static) or no 'schedule' clause is specified - the
iteration space is divided by the library into chunks that are
approximately equal in size, and at most one chunk is distributed
to each thread. In this case, we do not need an outer loop in each
thread - each thread requests once which iterations range it should
handle (using __kmpc_for_static_init runtime call) and then runs the
inner loop on this range.
Differential Revision: http://reviews.llvm.org/D5865
llvm-svn: 224233
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ignore it during overload resolution when initializing
X from a value of type cv X.
Previously, our rule here only ignored specializations
of constructor templates. That's probably because the
standard says that constructors are outright ill-formed
if their first parameter is literally X and they're
callable with one argument. However, Clang only
enforces that prohibition against non-implicit
instantiations; I'm not sure why, but it seems to be
deliberate. Given that, the most sensible thing to
do is to just ignore the "illegal" constructor
regardless of where it came from.
Also, stop ignoring such constructors silently:
print a note explaining why they're being ignored.
Fixes <rdar://19199836>.
llvm-svn: 224205
|
|
|
|
|
|
|
|
|
|
| |
Sema::handleAnnotateAttr expects that some basic validation is done on
the given AttributeList. However, ProcessAccessDeclAttributeList called
it directly. Instead, pass the list to ProcessDeclAttribute.
This fixes PR21847.
llvm-svn: 224204
|
|
|
|
|
|
|
|
|
| |
We would crash trying to treat a property member as a field. These
shoudl be forbidden anyway, reject programs which contain them.
This fixes PR21840.
llvm-svn: 224193
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
clang lets programmers be pretty cavalier when it comes to void return
statements in functions which have non-void return types. However, we
cannot be so forgiving in constexpr functions: evaluation will go off
the rails very quickly.
Instead, keep the return statement in the AST but mark the function as
invalid. Doing so gives us nice diagnostics while making constexpr
evaluation halt.
This fixes PR21859.
llvm-svn: 224189
|
|
|
|
|
|
|
|
| |
expressions because the lookup finds a different name than the original, fixed by updating the LookupResult's name with the name of the found decl. Second is that we also diagnose delayed typo exprs in the index of an array subscript expression.
The testcase shows a third bug with a FIXME in it.
llvm-svn: 224183
|
|
|
|
|
|
| |
Based on suggestions from Kaelyn.
llvm-svn: 224173
|
|
|
|
|
|
|
|
| |
Transformation of a CallExpr doesn't always result in a new CallExpr.
Fixes PR21899.
llvm-svn: 224172
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The extension has the following syntax:
__builtin_call_with_static_chain(Call, Chain)
where Call must be a function call expression and Chain must be of pointer type
This extension performs a function call Call with a static chain pointer
Chain passed to the callee in a designated register. This is useful for
calling foreign language functions whose ABI uses static chain pointers
(e.g. to implement closures).
Differential Revision: http://reviews.llvm.org/D6332
llvm-svn: 224167
|
|
|
|
|
|
|
|
|
|
| |
objc_bridge(id).
This means that a pointer to the struct type to which the attribute appertains
is a CF type (and therefore an Objective-C object of some type), but not of any
specific class. rdar://19157264
llvm-svn: 224072
|
|
|
|
|
|
| |
since the attribute may reside there, instead of just on the FunctionDecl. Fixes PR21668.
llvm-svn: 224039
|
|
|
|
|
|
|
|
|
|
| |
While we would correctly handle asm("foo") and reject asm(L"bar"), we
weren't careful to handle cases where an ascii literal could be
concatenated with a wide literal.
This fixes PR21822.
llvm-svn: 223992
|
|
|
|
|
|
|
| |
Eventually we'll diagnose them on different declarations, but let's
get this part out of the way first.
llvm-svn: 223985
|
|
|
|
| |
llvm-svn: 223984
|
|
|
|
|
|
| |
Review feedback from recent changes to GetSVN.cmake.
llvm-svn: 223980
|
|
|
|
|
|
|
| |
Includes a new test case since none of the existing tests were hitting
this code path.
llvm-svn: 223705
|
|
|
|
|
|
|
|
|
|
|
| |
Placing the attribute after the kernel keyword would incorrectly
reject the attribute, so use the smae workaround that other
kernel only attributes use.
Also add a FIXME because there are two different phrasings now
for the same error, althoug amdgpu_num_[sv]gpr uses a consistent one.
llvm-svn: 223490
|
|
|
|
|
|
| |
Only one of these can really match.
llvm-svn: 223489
|
|
|
|
| |
llvm-svn: 223403
|
|
|
|
|
|
|
| |
This is a performance hint that can be applied to kernels
to attempt to limit the number of used registers.
llvm-svn: 223384
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Allow CUDA host device functions with two code paths using __CUDA_ARCH__
to differentiate between code path being compiled.
For example:
__host__ __device__ void host_device_function(void) {
#ifdef __CUDA_ARCH__
device_only_function();
#else
host_only_function();
#endif
}
Patch by Jacques Pienaar.
Reviewed By: rnk
Differential Revision: http://reviews.llvm.org/D6457
llvm-svn: 223271
|
|
|
|
|
|
| |
that contained side effects.
llvm-svn: 223184
|
|
|
|
|
|
|
| |
Also have CorrectDelayedTyposInExpr check that the Expr* isn't null
before trying to access its members. Fixes PR21679.
llvm-svn: 223162
|
|
|
|
| |
llvm-svn: 223090
|
|
|
|
|
|
| |
According to OpenMP standard, Section 2.12.6, atomic Construct, '#pragma omp atomic write' is allowed to be used only for expression statements of form 'x = expr;', where x is a lvalue expression and expr is an expression with scalar type. Patch adds checks for it.
llvm-svn: 222913
|
|
|
|
|
|
|
|
|
|
|
| |
This attribute serves as a hint to improve warnings about the ranges of
enumerators used as flag types. It currently has no working C++ implementation
due to different semantics for enums in C++. For more explanation, see the docs
and testcases.
Reviewed by Aaron Ballman.
llvm-svn: 222906
|
|
|
|
|
|
| |
other function named "move".
llvm-svn: 222863
|
|
|
|
|
|
|
|
|
|
|
|
| |
OpenCL v2.0.
OpenCL v2.0 s6.5.5 restricts conversion of pointers to different address spaces:
- the named address spaces (__global, __local, and __private) => __generic - implicitly converted;
- __generic => named - with an explicit cast;
- named <=> named - disallowed;
- __constant <=> any other - disallowed.
llvm-svn: 222834
|
|
|
|
|
|
|
|
|
|
| |
To support it in the frontend, the following has been added:
- generic address space type attribute;
- documentation for the OpenCL address space attributes;
- parsing of __generic(generic) keyword;
- test code for the parser and diagnostics.
llvm-svn: 222831
|
|
|
|
|
|
|
|
|
| |
arguments).
We don't yet support pointer-to-member template arguments that have undergone
pointer-to-member conversions, mostly because we don't have a mangling for them yet.
llvm-svn: 222807
|
|
|
|
|
|
|
|
| |
checking are handled before the custom type checking is performed.
Fixes PR21669.
llvm-svn: 222797
|
|
|
|
|
|
|
| |
Fixes PR21656, which is fallout from r222551 caused by an untested/missed
code path.
llvm-svn: 222694
|
|
|
|
| |
llvm-svn: 222666
|
|
|
|
|
|
| |
specification has not yet been parsed.
llvm-svn: 222603
|
|
|
|
|
|
| |
whose base is not an expression. rdar://19053620
llvm-svn: 222570
|
|
|
|
|
|
|
|
|
|
| |
GCC and ICC both reject this and the 'Runtime-sized arrays with
automatic storage duration' (N3639) paper forbade this as well.
Previously, we would crash on our way to mangling.
This fixes PR21632.
llvm-svn: 222569
|
|
|
|
|
|
| |
Many thanks to dblaikie for his advices and suggestions!
llvm-svn: 222568
|