| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
temporaries/casts/....
Summary:
Handles expressions such as:
- `std::is_const<T>()`
- `std::is_const<T>()()`;
- `std::is_same(decltype(U()), V>::value`;
Reviewers: aaron.ballman, Quuxplusone
Subscribers: cfe-commits, llvm-commits
Differential Revision: https://reviews.llvm.org/D55552
llvm-svn: 349729
|
|
|
|
|
|
| |
Fix a dangling reference to temporary, never return nullptr.
llvm-svn: 348834
|
|
|
|
|
|
| |
Submitted the wrong change.
llvm-svn: 348831
|
|
|
|
| |
llvm-svn: 348830
|
|
|
|
|
|
| |
Seems to break build bots.
llvm-svn: 348742
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
We're now handling cases like `static_assert(!expr)` and
static_assert(!(expr))`.
Reviewers: aaron.ballman, Quuxplusone
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D55270
llvm-svn: 348741
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
In our codebase, `static_assert(std::some_type_trait<Ts...>::value, "msg")`
(where `some_type_trait` is an std type_trait and `Ts...` is the
appropriate template parameters) account for 11.2% of the `static_assert`s.
In these cases, the `Ts` are typically not spelled out explicitly, e.g.
`static_assert(std::is_same<SomeT::TypeT, typename SomeDependentT::value_type>::value, "message");`
The diagnostic when the assert fails is typically not very useful, e.g.
`static_assert failed due to requirement 'std::is_same<SomeT::TypeT, typename SomeDependentT::value_type>::value' "message"`
This change makes the diagnostic spell out the types explicitly , e.g.
`static_assert failed due to requirement 'std::is_same<int, float>::value' "message"`
See tests for more examples.
After this is submitted, I intend to handle
`static_assert(!std::some_type_trait<Ts...>::value, "msg")`,
which is another 6.6% of static_asserts.
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D54903
llvm-svn: 348239
|
|
|
|
|
|
|
|
| |
When a static_assert fails, dig out a specific condition to diagnose,
using the same logic that we use to find the enable_if condition to
diagnose.
llvm-svn: 313315
|
|
|
|
| |
llvm-svn: 310804
|
|
|
|
|
|
|
|
| |
It's better not to rely on the diagnostics engine to pretty print the
argument to decltype. Instead, exercise the functionality in
DeclPrinterTest.
llvm-svn: 239197
|
|
|
|
|
|
|
|
|
|
| |
We would crash in the DeclPrinter trying to pretty-print the
static_assert message. C++1z-style assertions don't have a message so
we would crash.
This fixes PR23756.
llvm-svn: 239170
|
|
|
|
| |
llvm-svn: 211395
|
|
|
|
| |
llvm-svn: 211394
|
|
|
|
|
|
|
| |
static_assert fails when parsing the template, don't diagnose it again on every
instantiation.
llvm-svn: 160088
|
|
|
|
|
|
| |
where wchar_t is only 16 bits wide.
llvm-svn: 154072
|
|
|
|
|
|
|
|
|
|
| |
String literals (including unicode ones) can contain non-Unicode codepoints
if they were written using \x or similar. Write those out using \x, but be
careful that the following character can't be misinterpreted as part of the
\x escape sequence. Convert UTF-16 surrogate pairs back to codepoints before
rendering them.
llvm-svn: 154069
|
|
|
|
| |
llvm-svn: 146607
|
|
|
|
|
|
| |
-std=c++0x. Patch by Ahmed Charles!
llvm-svn: 141900
|
|
|
|
|
|
|
|
|
|
| |
therefore not creating ElaboratedTypes, which are still pretty-printed
with the written tag).
Most of these testcase changes were done by script, so don't feel too
sorry for my fingers.
llvm-svn: 98149
|
|
|
|
|
|
|
|
|
| |
- This is designed to make it obvious that %clang_cc1 is a "test variable"
which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
can be useful to redefine what gets run as 'clang -cc1' (for example, to set
a default target).
llvm-svn: 91446
|
|
|
|
|
|
| |
Tests and drivers updated, still need to shuffle dirs.
llvm-svn: 67602
|
|
|
|
| |
llvm-svn: 67031
|
|
|
|
| |
llvm-svn: 66997
|
|
error if it's false. Create the declaration and add it to the current context.
llvm-svn: 66995
|