| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
same.
We were missing the lvalue-to-rvalue conversion entirely in this case,
and in fact still need the full CK_LValueToRValueBitCast conversion to
perform a load with no TBAA.
llvm-svn: 373874
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The overload resolution for enums with a fixed underlying type has changed in the C++14 standard. This patch implements the new rule.
Patch by Mark de Wever!
Reviewers: rsmith
Reviewed By: rsmith
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D65695
llvm-svn: 373866
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
used
Summary:
When using a user-defined conversion function template with a deduced return type the compiler gives a set of warnings:
```
bug.cc:252:44: error: cannot specify any part of a return type in the declaration of a conversion function; use an alias template to declare a conversion to 'auto (Ts &&...) const'
template <typename... Ts> operator auto()(Ts &&... xs) const;
^~~~~~~~~~~~~~~~~~~
bug.cc:252:29: error: conversion function cannot convert to a function type
template <typename... Ts> operator auto()(Ts &&... xs) const;
^
error: pointer to function type cannot have 'const' qualifier
```
after which it triggers an assertion failure. It seems the last error is incorrect and doesn't have any location information. This patch stops the compilation after the second warning.
Fixes bug 31422.
Patch by Mark de Wever!
Reviewers: rsmith
Reviewed By: rsmith
Subscribers: bbannier, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D64820
llvm-svn: 373862
|
|
|
|
|
|
| |
Warning message looks better; and GCC adds it too.
llvm-svn: 373828
|
|
|
|
|
|
| |
The static analyzer is warning about potential null dereferences, but we should be able to use castAs<> directly and if not assert will fire for us.
llvm-svn: 373827
|
|
|
|
|
|
| |
The static analyzer is warning about potential null dereferences, but we should be able to use castAs<> directly and if not assert will fire for us.
llvm-svn: 373826
|
|
|
|
|
|
| |
Fixes cppcheck warning.
llvm-svn: 373825
|
|
|
|
|
|
| |
The static analyzer is warning about potential null dereferences, but we should be able to use castAs<> directly and if not assert will fire for us.
llvm-svn: 373824
|
|
|
|
|
|
|
|
| |
negation of bool in languages without a bool type
Thanks for this advice, Richard Trieu!
llvm-svn: 373817
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: xbolva00
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D68482
llvm-svn: 373792
|
|
|
|
|
|
|
|
|
| |
The warnings now in -Wformat-type-confusion don't align with how we interpret
'pedantic' in clang, and don't belong in -pedantic.
Differential revision: https://reviews.llvm.org/D67775
llvm-svn: 373774
|
|
|
|
|
|
| |
The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us.
llvm-svn: 373753
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This fixes a regression that led to size() not being available in clangd
when completing 'deque().^' and using libc++.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: jkorous, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D68335
llvm-svn: 373710
|
|
|
|
|
|
|
|
|
| |
We previously failed to treat an array with an instantiation-dependent
but not value-dependent bound as being an instantiation-dependent type.
We now track the array bound expression as part of a constant array type
if it's an instantiation-dependent expression.
llvm-svn: 373685
|
|
|
|
|
|
|
|
|
|
| |
of 'typeid'.
This is a rare place where it's valid for a function type to be
substituted but not valid for a qualified function type to be
substituted, so needs a special check.
llvm-svn: 373648
|
|
|
|
|
|
|
|
| |
it's instantiation-dependent, even if it's not dependent.
There might be a SFINAE check in the parameter type.
llvm-svn: 373643
|
|
|
|
|
|
|
|
|
| |
warn with -Wbool-operation
Requested here:
http://lists.llvm.org/pipermail/cfe-dev/2019-October/063452.html
llvm-svn: 373614
|
|
|
|
|
|
| |
The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<RecordType> directly and if not assert will fire for us.
llvm-svn: 373584
|
|
|
|
|
|
|
|
| |
Context selectors may include optional score clause in format
`score(<expr>):`, where `<expr>` must be a constant integer expression.
Added parsing/sema analysis only.
llvm-svn: 373502
|
|
|
|
|
|
| |
The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<VectorType> directly and if not assert will fire for us.
llvm-svn: 373478
|
|
|
|
|
|
| |
The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us.
llvm-svn: 373475
|
|
|
|
|
|
| |
The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us.
llvm-svn: 373474
|
|
|
|
|
|
|
|
| |
our autogenerated files. NFC.
As requested by Nico Weber.
llvm-svn: 373425
|
|
|
|
|
|
|
|
| |
r368237 attempted to improve fix-its for move warnings, but introduced some
regressions to -Wpessimizing-move. Revert that change and add the missing
test cases to the pessimizing move test to prevent future regressions.
llvm-svn: 373421
|
|
|
|
|
|
|
|
|
| |
loop.
Missed check if the condition is also dependent when building final
expressions for the collapsed loop directives.
llvm-svn: 373348
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Clang uses the location identifier should be inserted for declarator
decls when a decl is unnamed. But for type template and template template
paramaters it uses the location of "typename/class" keyword, which makes it hard
for tooling to insert/change parameter names.
This change tries to unify these two cases by making template parameter
parsing and sourcerange operations similar to function params/declarator decls.
Reviewers: ilya-biryukov
Subscribers: arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D68143
llvm-svn: 373340
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
- Useful warning
- GCC compatibility (GCC warns in C++ mode)
Reviewers: rsmith, aaron.ballman
Reviewed By: aaron.ballman
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D67919
llvm-svn: 373252
|
|
|
|
|
|
|
|
|
| |
defined body.
If the function is currently defined, we should not emit a warning that
it might be emitted already because it was not really emitted.
llvm-svn: 373243
|
|
|
|
| |
llvm-svn: 373210
|
|
|
|
|
|
| |
value-dependent initializer.
llvm-svn: 373173
|
|
|
|
|
|
|
|
|
|
| |
has a constexpr destructor.
For constexpr variables, reject if the variable does not have constant
destruction. In all cases, do not emit runtime calls to the destructor
for variables with constant destruction.
llvm-svn: 373159
|
|
|
|
|
|
| |
The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us.
llvm-svn: 373150
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gnu_inline" in C++ mode
This matches how GCC handles it, see e.g. https://gcc.godbolt.org/z/HPplnl.
GCC documents the gnu_inline attribute with "In C++, this attribute does
not depend on extern in any way, but it still requires the inline keyword
to enable its special behavior."
The previous behaviour of gnu_inline in C++, without the extern
keyword, can be traced back to the original commit that added
support for gnu_inline, SVN r69045.
Differential Revision: https://reviews.llvm.org/D67414
llvm-svn: 373078
|
|
|
|
|
|
| |
constant evaluation.
llvm-svn: 373036
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patches fixes the case when a user-defined mapper is attached to
the elements of an array, and to report error when a mapper is used for
types other than struct, class, and union.
Patch by Lingda Li <lildmh@gmail.com>
Differential Revision: https://reviews.llvm.org/D67978
llvm-svn: 373023
|
|
|
|
|
|
| |
Fixes a regression introduced by r369999.
llvm-svn: 373022
|
|
|
|
|
|
|
|
|
| |
declare variant.
We can use the original function if it was used/emitted already. So,
just use warnings for these cases, not errors.
llvm-svn: 373010
|
|
|
|
|
|
|
|
|
| |
selector.
Added basic parsing/semantic support for
'implementation={vendor(<vendor>)}' context selector.
llvm-svn: 372917
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LLDB synthesizes decls using asm labels. These decls cannot have a mangle
different than the one specified in the label name. I.e., the '\01' prefix
should not be added.
Fixes an expression evaluation failure in lldb's TestVirtual.py on iOS.
rdar://45827323
Differential Revision: https://reviews.llvm.org/D67774
llvm-svn: 372903
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
- Even though only `void` is still accepted as the deduced return type,
enabling deduction/instantiation on the return type allows more
consistent coding.
Reviewers: tra, jlebar
Subscribers: cfe-commits, yaxunl
Tags: #clang
Differential Revision: https://reviews.llvm.org/D68031
llvm-svn: 372898
|
|
|
|
|
|
|
|
|
|
| |
Add the image query builtin functions from the OpenCL C specification.
Patch by Pierre Gondois and Sven van Haastregt.
Differential Revision: https://reviews.llvm.org/D67713
llvm-svn: 372833
|
|
|
|
| |
llvm-svn: 372775
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D67947
llvm-svn: 372773
|
|
|
|
| |
llvm-svn: 372749
|
|
|
|
|
|
|
|
| |
(-Wint-in-bool-context)
I was looking at old GCC's patch. Current "trunk" version avoids warning for unsigned case, GCC warns only for signed shifts.
llvm-svn: 372708
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch provides support for DW_LANG_C_plus_plus_11,
DW_LANG_C_plus_plus_14 tags in the Clang C++ frontend.
Patch by Sourabh Singh Tomar!
Differential Revision: https://reviews.llvm.org/D67613
Reapplies r372663 after adapting a failing test in the LLDB testsuite.
llvm-svn: 372681
|
|
|
|
|
|
| |
This reverts commit bf9c8ffb54943c6d77398adbedddf05ef9724007.
llvm-svn: 372672
|
|
|
|
|
|
|
|
| |
(-Wint-in-bool-context; GCC compatibility)
Extracted from D63082.
llvm-svn: 372664
|
|
|
|
|
|
|
|
|
|
| |
This patch provides support for DW_LANG_C_plus_plus_11,
DW_LANG_C_plus_plus_14 tags in the Clang C++ frontend.
Patch by Sourabh Singh Tomar!
Differential Revision: https://reviews.llvm.org/D67613
llvm-svn: 372663
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
- Rearrange the atomic expr order to the API order when rebuilding
atomic expr during template instantiation.
Reviewers: erichkeane
Subscribers: jfb, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D67924
llvm-svn: 372640
|