- Oct 23, 2017
-
-
Richard Smith authored
of a static constexpr data member if it's defined 'constexpr' out of line, not only if it's defined 'constexpr' in the class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316310 91177308-0d34-0410-b5e6-96231b3b80d8
-
Faisal Vali authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316304 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 22, 2017
-
-
Benjamin Kramer authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316301 91177308-0d34-0410-b5e6-96231b3b80d8
-
Faisal Vali authored
[C++17] Fix PR34970 - tweak overload resolution for class template deduction-guides in line with WG21's p0620r0. In order to identify the copy deduction candidate, I considered two approaches: - attempt to determine whether an implicit guide is a copy deduction candidate by checking certain properties of its subsituted parameter during overload-resolution. - using one of the many bits (WillHaveBody) from FunctionDecl (that CXXDeductionGuideDecl inherits from) that are otherwise irrelevant for deduction guides After some brittle gymnastics w the first strategy, I settled on the second, although to avoid confusion and to give that bit a better name, i turned it into a member of an anonymous union. Given this identification 'bit', the tweak to overload resolution was a simple reordering of the deduction guide checks (in SemaOverload.cpp::isBetterOverloadCandidate), in-line with Jason Merrill's p0620r0 drafting which made it into the working paper. Concordant with that, I made sure the copy deduction candidate is always added. References: See https://bugs.llvm.org/show_bug.cgi?id=34970 See http://wg21.link/p0620r0 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316292 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 21, 2017
-
-
Aaron Ballman authored
http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/11896 http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/12380 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316279 91177308-0d34-0410-b5e6-96231b3b80d8
-
Masud Rahman authored
o) Add a 'Location' class that represents the four properties of a physical location o) Enhance 'SourceLocation' to provide 'expansion' and 'spelling' locations, maintaining backwards compatibility with existing code by forwarding the four properties to 'expansion'. o) Update the implementation to use 'clang_getExpansionLocation' instead of the deprecated 'clang_getInstantiationLocation', which has been present since 2011. o) Update the implementation of 'clang_getSpellingLocation' to actually obtain spelling location instead of file location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316278 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
Fix a typo with -fno-double-square-bracket-attributes and add a test to demonstrate that it works as expected in C++11 mode. Additionally corrected the handling of -fdouble-square-bracket-attributes to be properly passed down to the cc1 option. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316275 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
Add release notes for the recent -fdouble-square-bracket-attributes and -fno-double-square-bracket-attributes compiler flags. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316269 91177308-0d34-0410-b5e6-96231b3b80d8
-
Roman Lebedev authored
Summary: As Mattias Eriksson has reported in PR35009, in C, for enums, the underlying type should be used when checking for the tautological comparison, unlike C++, where the enumerator values define the value range. So if not in CPlusPlus mode, use the enum underlying type. Also, i have discovered a problem (a crash) when evaluating tautological-ness of the following comparison: ``` enum A { A_a = 0 }; if (a < 0) // expected-warning {{comparison of unsigned enum expression < 0 is always false}} return 0; ``` This affects both the C and C++, but after the first fix, only C++ code was affected. That was also fixed, while preserving (i think?) the proper diagnostic output. And while there, attempt to enhance the test coverage. Yes, some tests got moved around, sorry about that :) Fixes PR35009 Reviewers: aaron.ballman, rsmith, rjmccall Reviewed By: aaron.ballman Subscribers: Rakete1111, efriedma, materi, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D39122 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316268 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
Fixing broken attribute documentation for __attribute__((noescape)); a code block was missing and the existing code block was missing a mandatory newline. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316267 91177308-0d34-0410-b5e6-96231b3b80d8
-
Masud Rahman authored
Some API calls accept 'NULL' instead of a char array (e.g. the second argument to 'clang_ParseTranslationUnit'). For Python 3 compatibility, all strings are passed through 'c_interop_string' which expects to receive only 'bytes' or 'str' objects. This change extends this behavior to additionally allow 'None' to be supplied. A test case was added which breaks in Python 3, and is fixed by this change. All the test cases pass in both, Python 2 and Python 3. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316264 91177308-0d34-0410-b5e6-96231b3b80d8
-
Masud Rahman authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316263 91177308-0d34-0410-b5e6-96231b3b80d8
-
Sanjay Patel authored
I don't know if this is correct, but this is what we currently do. More discussion in PR27108 and PR27435 and D27618. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316250 91177308-0d34-0410-b5e6-96231b3b80d8
-
George Karpenkov authored
Explicitly not supporting functor objects. Differential Revision: https://reviews.llvm.org/D39031 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316249 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
constant expressions. We permit array-to-pointer decay on such arrays, but disallow pointer arithmetic (since we do not know whether it will have defined behavior). This is based on r311970 and r301822 (the former by me and the latter by Robert Haberlach). Between then and now, two things have changed: we have committee feedback indicating that this is indeed the right direction, and the code broken by this change has been fixed. This is necessary in C++17 to continue accepting certain forms of non-type template argument involving arrays of unknown bound. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316245 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 20, 2017
-
-
Jonas Hahnfeld authored
This breaks at least two buildbots: http://lab.llvm.org:8011/builders/clang-cmake-x86_64-avx2-linux/builds/1175 http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/10478 This reverts commit r316229 during local investigation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316235 91177308-0d34-0410-b5e6-96231b3b80d8
-
Jonas Hahnfeld authored
In some cases the compiler can deduce the length of an array section as constants. With this information, VLAs can be avoided in place of a constant sized array or even a scalar value if the length is 1. Example: int a[4], b[2]; pragma omp parallel reduction(+: a[1:2], b[1:1]) { } For chained array sections, this optimization is restricted to cases where all array sections except the last have a constant length 1. This trivially guarantees that there are no holes in the memory region that needs to be privatized. Example: int c[3][4]; pragma omp parallel reduction(+: c[1:1][1:2]) { } Differential Revision: https://reviews.llvm.org/D39136 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316229 91177308-0d34-0410-b5e6-96231b3b80d8
-
Erich Keane authored
r213589 was checked in as a solution to https://bugs.llvm.org/show_bug.cgi?id=20336. However, it is possible to use /EP with /P to suppress #line directives AND output to a file. There is no reason in that case to suppress /showIncludes. This was reported here: https://bugs.llvm.org/show_bug.cgi?id=34997 Differential Revision: https://reviews.llvm.org/D39104 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316225 91177308-0d34-0410-b5e6-96231b3b80d8
-
Haojian Wu authored
Summary: Change clang-refactor default behavior to print the new code after refactoring (instead of editing the source files), which would make it easier to use and debug the refactoring action. Reviewers: arphaman, ioeric Reviewed By: arphaman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D39092 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316212 91177308-0d34-0410-b5e6-96231b3b80d8
-
Ivan A. Kosarev authored
Resolves: Fatal error: Offset not zero at the point of scalar access. http://llvm.org/PR34992 Differential Revision: https://reviews.llvm.org/D39083 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316211 91177308-0d34-0410-b5e6-96231b3b80d8
-
Saleem Abdulrasool authored
NetBSD uses `long int` for `intptr_t` on ARM. This was changed in SVN r316046, referenced against other compilers. However, NetBSD's reference was incorrect as the current clang behaviour is more up-to-date. Restore the original behaviour for that target. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316204 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
This patch breaks users using -fno-canonical-prefixes, for whom resolving symlinks is not acceptable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316195 91177308-0d34-0410-b5e6-96231b3b80d8
-
Peter Wu authored
GCC tries to shorten system headers in depfiles using its real path (resolving components like ".." and following symlinks). Mimic this feature to ensure that the Ninja build tool detects the correct dependencies when a symlink changes directory levels, see https://github.com/ninja-build/ninja/issues/1330 An option to disable this feature is added in case "these changed header paths may conflict with some compilation environments", see https://gcc.gnu.org/ml/gcc-patches/2012-09/msg00287.html Note that the original feature request for GCC (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52974) also included paths preprocessed output (-E) and diagnostics. That is not implemented now since I am not sure if it breaks something else. Differential Revision: https://reviews.llvm.org/D37954 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316193 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 19, 2017
-
-
Aaron Ballman authored
These attributes are not supported by GCC and should not be in the gnu namespace. Switching from the GCC spelling to the GNU spelling so that they are only supported with __attribute__(()). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316186 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
These attributes are supported by GCC with the gnu vendor namespace for C++11-style attributes. Enabling the gnu namespace by switching to the GCC spelling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316184 91177308-0d34-0410-b5e6-96231b3b80d8
-
Jan Vesely authored
Improve amdgcn macro test Differential Revision: https://reviews.llvm.org/D38667 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316181 91177308-0d34-0410-b5e6-96231b3b80d8
-
Guozhi Wei authored
In function GetIntrinsic, not all types are covered. Types double and long long are missed, type long is wrongly treated same as int, it should be same as long long. These problems cause compiler crashes when compiling code in PR31161. This patch fixed the problem. Differential Revision: https://reviews.llvm.org/D38820 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316179 91177308-0d34-0410-b5e6-96231b3b80d8
-
Benjamin Kramer authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316177 91177308-0d34-0410-b5e6-96231b3b80d8
-
Erich Keane authored
As reported here https://bugs.llvm.org/show_bug.cgi?id=34988 [[nodiscard]] warnings were not being suppressed for volatile-ref return values. Differential Revision: https://reviews.llvm.org/D39075 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316166 91177308-0d34-0410-b5e6-96231b3b80d8
-
Yaxun Liu authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316165 91177308-0d34-0410-b5e6-96231b3b80d8
-
Gabor Horvath authored
Patch by: Adam Balogh! Differential Revision: https://reviews.llvm.org/D39048 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316157 91177308-0d34-0410-b5e6-96231b3b80d8
-
Haojian Wu authored
* Add missing override keyword. * avoid unnecessary copy of std::string. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316152 91177308-0d34-0410-b5e6-96231b3b80d8
-
Martin Storsjo authored
These typos appeared in SVN r309226 and r309327. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316149 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
instantiation declarations if they are usable from constant expressions. We are permitted to instantiate in these cases, and required to do so in order to have an initializer available for use within constant evaluation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316136 91177308-0d34-0410-b5e6-96231b3b80d8
-
Erich Keane authored
The .cpp file has this properly capitalized, but the header does not. Simply fixed it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316132 91177308-0d34-0410-b5e6-96231b3b80d8
-
Krasimir Georgiev authored
Summary: This patch enables sorting the full block of using declarations when some line is affected. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D39024 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316130 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 18, 2017
-
-
Benjamin Kramer authored
No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316127 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alex Lorenz authored
unittest. As suggested by Haojian Wu! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316105 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alex Lorenz authored
consecutive statements This commit adds a CodeRangeASTSelection value to the refactoring library. This value represents a set of selected statements in one body of code. Differential Revision: https://reviews.llvm.org/D38835 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316104 91177308-0d34-0410-b5e6-96231b3b80d8
-
Matt Morehouse authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316103 91177308-0d34-0410-b5e6-96231b3b80d8
-