summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/Inputs
Commit message (Collapse)AuthorAgeFilesLines
* [c++20] P1959R0: Remove support for std::*_equality.Richard Smith2019-12-161-131/+1
|
* Implement __builtin_LINE() et. al. to support source location capture.Eric Fiselier2019-05-161-0/+44
| | | | | | | | | | | | | | | | | Summary: This patch implements the source location builtins `__builtin_LINE(), `__builtin_FUNCTION()`, `__builtin_FILE()` and `__builtin_COLUMN()`. These builtins are needed to implement [`std::experimental::source_location`](https://rawgit.com/cplusplus/fundamentals-ts/v2/main.html#reflection.src_loc.creation). With the exception of `__builtin_COLUMN`, GCC also implements these builtins, and Clangs behavior is intended to match as closely as possible. Reviewers: rsmith, joerg, aaron.ballman, bogner, majnemer, shafik, martong Reviewed By: rsmith Subscribers: rnkovacs, loskutov, riccibruno, mgorny, kunitoki, alexr, majnemer, hfinkel, cfe-commits Differential Revision: https://reviews.llvm.org/D37035 llvm-svn: 360937
* [C++2a] Implement operator<=> CodeGen and ExprConstantEric Fiselier2018-05-071-0/+437
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch tackles long hanging fruit for the builtin operator<=> expressions. It is currently needs some cleanup before landing, but I want to get some initial feedback. The main changes are: * Lookup, build, and store the required standard library types and expressions in `ASTContext`. By storing them in ASTContext we don't need to store (and duplicate) the required expressions in the BinaryOperator AST nodes. * Implement [expr.spaceship] checking, including diagnosing narrowing conversions. * Implement `ExprConstant` for builtin spaceship operators. * Implement builitin operator<=> support in `CodeGenAgg`. Initially I emitted the required comparisons using `ScalarExprEmitter::VisitBinaryOperator`, but this caused the operand expressions to be emitted once for every required cmp. * Implement [builtin.over] with modifications to support the intent of P0946R0. See the note on `BuiltinOperatorOverloadBuilder::addThreeWayArithmeticOverloads` for more information about the workaround. Reviewers: rsmith, aaron.ballman, majnemer, rnk, compnerd, rjmccall Reviewed By: rjmccall Subscribers: rjmccall, rsmith, aaron.ballman, junbuml, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D45476 llvm-svn: 331677
* [Sema] -Wzero-as-null-pointer-constant: don't warn for system macros other ↵Roman Lebedev2017-10-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | than NULL. Summary: The warning was initially introduced in D32914 by @thakis, and the concerns were raised there, and later in rL302247 and PR33771. I do believe that it makes sense to relax the diagnostic e.g. in this case, when the expression originates from the system header, which can not be modified. This prevents adoption for the diagnostic for codebases which use pthreads (`PTHREAD_MUTEX_INITIALIZER`), gtest, etc. As @malcolm.parsons suggests, it *may* make sense to also not warn for the template types, but it is not obvious to me how to do that in here. Though, it still makes sense to complain about `NULL` macro. While there, add more tests. Reviewers: dblaikie, thakis, rsmith, rjmccall, aaron.ballman Reviewed By: thakis Subscribers: Rakete1111, hans, cfe-commits, thakis, malcolm.parsons Tags: #clang Differential Revision: https://reviews.llvm.org/D38954 llvm-svn: 316662
* Do not issue -Wnullability-completeness for dependent types that are not ↵Richard Smith2017-05-191-0/+4
| | | | | | written as pointer types. llvm-svn: 303451
* [coroutines] Implement unhandled_exception changes.Eric Fiselier2017-03-231-0/+37
| | | | | | | | | | | | | | | | | | Summary: This patch adopts the recent changes that renamed `set_exception(exception_pointer)` to `unhandled_exception()`. Additionally `unhandled_exception()` is now required, and so an error is emitted when exceptions are enabled but the promise type does not provide the member. When exceptions are disabled a warning is emitted instead of an error, The warning notes that the `unhandled_exception()` function is required when exceptions are enabled. Reviewers: rsmith, GorNishanov, aaron.ballman, majnemer Reviewed By: GorNishanov Subscribers: mehdi_amini, cfe-commits Differential Revision: https://reviews.llvm.org/D30859 llvm-svn: 298565
* Further restrict issuance of 'override' warning if methodFariborz Jahanian2014-11-031-0/+3
| | | | | | is argument to a macro which is defined in system header. llvm-svn: 221172
* C++-11 [qoi]. Do not warn on missing 'verride' on use ofFariborz Jahanian2014-10-311-0/+3
| | | | | | | macros in user code when macros themselves are defined in a system header. rdar://18295240 llvm-svn: 220992
* [TEST] Improve tests for #pragma clang optimize off/onDario Domizioli2014-07-281-0/+5
| | | | | | | | Added coverage for: * More than one "off region" in the same file * An "off region" falling off the end of an included file llvm-svn: 214086
* Ignore test Inputs globally and remove redundant lit.local.cfg filesAlp Toker2013-11-151-1/+0
| | | | | | | | | | By adding a default config.excludes pattern we can avoid individual suppressions in subdirectories. This matches LLVM's lit.cfg which also excludes a few other common non-test filenames for consistency. llvm-svn: 194814
* Make -Wunused warning rules more consistent.Eli Friedman2013-09-101-0/+2
| | | | | | | | | | | | | | | This patch does a few different things. This patch improves unused var diags for const vars: we no longer unconditionally suppress diagnostics for const vars, instead only suppressing the diagnostic when the declaration appears to be useful. This patch also makes us more consistently use whether a variable/function is declared in the main file to suppress diagnostics where appropriate. Fixes <rdar://problem/14907887>. llvm-svn: 190382
* Suppress the c++11 -Wdeprecated warning for 'register' if it is expanded from aRichard Smith2013-06-141-0/+5
| | | | | | macro defined in a system header. glibc uses it in macros, apparently. llvm-svn: 184005
* Suppress -Wunused-variable for variables declared in headers, which may inMatt Beaumont-Gay2013-04-101-0/+11
| | | | | | | | | | | fact be defined and used in another TU. Reshuffle some test cases because we suppress -Wunused-variable after we've emitted an error. This fixes PR15558. llvm-svn: 179138
* Don't warn on use of default allocator with an over-aligned type when theNick Lewycky2012-02-041-0/+7
| | | | | | allocator is given the pointer to allocate into. llvm-svn: 149760
* Add a new warning, -Wover-aligned, which detects attempts to use the defaultNick Lewycky2012-01-241-0/+12
| | | | | | | allocator to construct an object which declares more alignment than the default allocator actually provides. Fixes PR9527! llvm-svn: 148857
* Suppress -Warray-bounds in certain cases involving macros from system headers.Matt Beaumont-Gay2011-12-121-0/+11
| | | | | | The motivation here is a "clever" implementation of strncmp(), which peels the first few comparisons via chained conditional expressions which ensure that the input arrays are known at compile time to be sufficiently large. llvm-svn: 146430
* Work around an annoying, non-standard optimization in the glibcDouglas Gregor2010-02-122-0/+4
headers, where malloc (and many other libc functions) are declared with empty throw specifications, e.g., extern void *malloc (__SIZE_TYPE__ __size) throw () __attribute__ ((__malloc__)) ; The C++ standard doesn't seem to allow this, and redeclaring malloc as the standard permits (as follows) resulted in Clang (rightfully!) complaining about mis-matched exception specifications. void *malloc(size_t size); We work around this by silently propagating an empty throw specification "throw()" from a function with C linkage declared in a system header to a redeclaration that has no throw specifier. Ick. llvm-svn: 95969
OpenPOWER on IntegriCloud