Revision tags: llvmorg-21-init |
|
#
0a9c08c5 |
| 22-Jan-2025 |
Shafik Yaghmour <shafik.yaghmour@intel.com> |
[Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (#95474)
P2280R4 allows the use of references in pointers of unknown origins in a constant expression context
[Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (#95474)
P2280R4 allows the use of references in pointers of unknown origins in a constant expression context but only in specific cases that could be constant expressions.
We track whether a variable is a constexpr unknown in a constant expression by setting a flag in either APValue or LValue and using this flag to prevent using unknown values in places where it is not allowed.
Fixes: https://github.com/llvm/llvm-project/issues/63139 https://github.com/llvm/llvm-project/issues/63117
show more ...
|
Revision tags: llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5 |
|
#
2a5e3a67 |
| 25-Nov-2024 |
Kazu Hirata <kazu@google.com> |
[AST] Fix a warning
This patch fixes:
clang/lib/AST/APValue.cpp:1091:1: error: unused function 'setLValueUninit' [-Werror,-Wunused-function]
|
#
cbdd14ee |
| 24-Nov-2024 |
Congcong Cai <congcongcai0907@163.com> |
[clang][NFC]add static for internal linkage function (#117482)
Detected by misc-use-internal-linkage
|
Revision tags: llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0 |
|
#
223e2efa |
| 14-Sep-2024 |
JOE1994 <joseph942010@gmail.com> |
[clang] Nits on uses of raw_string_ostream (NFC)
* Don't call raw_string_ostream::flush(), which is essentially a no-op. * Strip unneeded calls to raw_string_ostream::str(), to avoid extra indirecti
[clang] Nits on uses of raw_string_ostream (NFC)
* Don't call raw_string_ostream::flush(), which is essentially a no-op. * Strip unneeded calls to raw_string_ostream::str(), to avoid extra indirection.
show more ...
|
Revision tags: llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7 |
|
#
273777ea |
| 28-May-2024 |
Aaron Ballman <aaron@aaronballman.com> |
clang:: to llvm::; NFC
These interfaces are LLVM interfaces, not Clang ones; but this worked because of LLVM.h adding the interfaces to the clang namespace.
|
Revision tags: llvmorg-18.1.6, llvmorg-18.1.5 |
|
#
3d56ea05 |
| 18-Apr-2024 |
Timm Baeder <tbaeder@redhat.com> |
[clang][NFC] Fix FieldDecl::isUnnamedBitfield() capitalization (#89048)
We always capitalize bitfield as "BitField".
|
Revision tags: llvmorg-18.1.4, llvmorg-18.1.3 |
|
#
6a6f9bf3 |
| 26-Mar-2024 |
Timm Baeder <tbaeder@redhat.com> |
[clang] Fix assertion failure when printing atomic apvalues (#85259)
When printing an `_Atomic(some struct type)`, we would later run into an
assertion because we do a `Ty->castAs<RecordType>()`, w
[clang] Fix assertion failure when printing atomic apvalues (#85259)
When printing an `_Atomic(some struct type)`, we would later run into an
assertion because we do a `Ty->castAs<RecordType>()`, which doesn't work
with an `AtomicType`.
show more ...
|
Revision tags: llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5 |
|
#
87759476 |
| 02-Nov-2023 |
Vlad Serebrennikov <serebrennikov.vladislav@gmail.com> |
[clang][NFC] Refactor `clang::Linkage` (#71049)
This patch introduces a new enumerator `Invalid = 0`, shifting other enumerators by +1. Contrary to how it might sound, this actually affirms status q
[clang][NFC] Refactor `clang::Linkage` (#71049)
This patch introduces a new enumerator `Invalid = 0`, shifting other enumerators by +1. Contrary to how it might sound, this actually affirms status quo of how this enum is stored in `clang::Decl`:
```
/// If 0, we have not computed the linkage of this declaration.
/// Otherwise, it is the linkage + 1.
mutable unsigned CacheValidAndLinkage : 3;
```
This patch makes debuggers to not be mistaken about enumerator stored in this bit-field. It also converts `clang::Linkage` to a scoped enum.
show more ...
|
Revision tags: llvmorg-17.0.4 |
|
#
48508c13 |
| 23-Oct-2023 |
Yingwei Zheng <dtcxzyw2333@gmail.com> |
[Clang] Handle real and imaginary parts of complex lvalue in `APValue::printPretty` (#69252)
This patch handles formatting of real and imaginary parts of complex lvalue.
Fixes #69218.
|
Revision tags: llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init |
|
#
4ad89131 |
| 20-Jul-2023 |
Sindhu Chittireddy <sindhu.chittireddy@intel.com> |
[NFC] Add checks for self-assignment.
Differential Revision: https://reviews.llvm.org/D155776
|
#
fa39c0a5 |
| 24-Jul-2023 |
Michael Platings <michael.platings@arm.com> |
Revert "[NFC] Add checks for self-assignment."
This reverts commit 8ac137acefc01caf636db5f95eb0977c97def1ba.
The code does not compile.
|
#
8ac137ac |
| 20-Jul-2023 |
Sindhu Chittireddy <sindhu.chittireddy@intel.com> |
[NFC] Add checks for self-assignment.
Differential Revision: https://reviews.llvm.org/D155776
|
Revision tags: llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7 |
|
#
a3c248db |
| 06-Jan-2023 |
serge-sans-paille <sguelton@mozilla.com> |
Move from llvm::makeArrayRef to ArrayRef deduction guides - clang/ part
This is a follow-up to https://reviews.llvm.org/D140896, split into several parts as it touches a lot of files.
Differential
Move from llvm::makeArrayRef to ArrayRef deduction guides - clang/ part
This is a follow-up to https://reviews.llvm.org/D140896, split into several parts as it touches a lot of files.
Differential Revision: https://reviews.llvm.org/D141139
show more ...
|
#
303f20a2 |
| 06-Dec-2022 |
Chuanqi Xu <yedeng.yd@linux.alibaba.com> |
[C++20] [Modules] [Serialization] Deserialize LValuePathSerializationHelper's type properly
Close https://github.com/llvm/llvm-project/issues/58716.
Tested with libcxx's modules build.
When we rea
[C++20] [Modules] [Serialization] Deserialize LValuePathSerializationHelper's type properly
Close https://github.com/llvm/llvm-project/issues/58716.
Tested with libcxx's modules build.
When we read the type of LValuePathSerializationHelper, we didn't read the correct type. We read the element type as its name suggests. But the problem here is that it looks like that both the usage and serialization use its type as the top level type. So here is the mismatch.
Actually, the type of LValuePathSerializationHelper is never used after Deserialization without the assertion. So it doesn't matter for the release users. And this patch shouldn't change the behavior too.
Reviewed By: erichkeane
Differential Revision: https://reviews.llvm.org/D139406
show more ...
|
Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3 |
|
#
55d3b79d |
| 09-Aug-2022 |
YingChi Long <me@inclyc.cn> |
[clang] add APValue type check in `TryPrintAsStringLiteral`
Fixes https://github.com/llvm/llvm-project/issues/57013
https://reviews.llvm.org/D115031 improved printing of non-type template parameter
[clang] add APValue type check in `TryPrintAsStringLiteral`
Fixes https://github.com/llvm/llvm-project/issues/57013
https://reviews.llvm.org/D115031 improved printing of non-type template parameter args. But checking if the end of Inits is 0 without checking if APValue is an integer, causes clang to segfault. This patch adds the code to check the type. (May not be a proper bugfix.)
Reviewed By: aaron.ballman, lichray
Differential Revision: https://reviews.llvm.org/D131466
show more ...
|
Revision tags: llvmorg-15.0.0-rc2 |
|
#
3f18f7c0 |
| 08-Aug-2022 |
Fangrui Song <i@maskray.me> |
[clang] LLVM_FALLTHROUGH => [[fallthrough]]. NFC
With C++17 there is no Clang pedantic warning or MSVC C5051.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D131346
|
Revision tags: llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6 |
|
#
06decd0b |
| 19-Jun-2022 |
Kazu Hirata <kazu@google.com> |
[clang] Use value_or instead of getValueOr (NFC)
|
Revision tags: llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3 |
|
#
44eee659 |
| 02-Mar-2022 |
Zhihao Yuan <zhihao.yuan@broadcom.com> |
[AST] Print NTTP args as string-literals when possible
C++20 non-type template parameter prints `MyType<{{116, 104, 105, 115}}>` when the code is as simple as `MyType<"this">`. This patch prints `My
[AST] Print NTTP args as string-literals when possible
C++20 non-type template parameter prints `MyType<{{116, 104, 105, 115}}>` when the code is as simple as `MyType<"this">`. This patch prints `MyType<{"this"}>`, with one layer of braces preserved for the intermediate structural type to trigger CTAD.
`StringLiteral` handles this case, but `StringLiteral` inside `APValue` code looks like a circular dependency. The proposed patch implements a cheap strategy to emit string literals in diagnostic messages only when they are readable and fall back to integer sequences.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D115031
show more ...
|
Revision tags: llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1 |
|
#
7a2b1bdb |
| 10-Nov-2021 |
Adam Czachorowski <adamcz@google.com> |
[clang] Do not crash in APValue::prettyPrint() on forward-decl structs.
The call to getTypeSizeInChars() is replaced with getTypeSizeInCharsIfKnown(), which does not crash on forward declared struct
[clang] Do not crash in APValue::prettyPrint() on forward-decl structs.
The call to getTypeSizeInChars() is replaced with getTypeSizeInCharsIfKnown(), which does not crash on forward declared structs. This only affects printing.
Differential Revision: https://reviews.llvm.org/D113570
show more ...
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1 |
|
#
37e83bc6 |
| 06-Jan-2021 |
Varun Gandhi <varun_gandhi@apple.com> |
[NFC] Move readAPValue/writeAPValue up the inheritance hierarchy
The implementation for (de)serialization of APValues can be shared between Clang and Swift, so we prefer pushing the methods up the i
[NFC] Move readAPValue/writeAPValue up the inheritance hierarchy
The implementation for (de)serialization of APValues can be shared between Clang and Swift, so we prefer pushing the methods up the inheritance hierarchy, instead of having the methods live in ASTReader/ASTWriter. Fixes rdar://72592937.
Reviewed By: rjmccall
Differential Revision: https://reviews.llvm.org/D94196
show more ...
|
Revision tags: llvmorg-11.0.1, llvmorg-11.0.1-rc2 |
|
#
c4736b91 |
| 15-Dec-2020 |
Richard Smith <richard@metafoo.co.uk> |
Don't memcpy from an empty ArrayRef; the base pointer could be null, and the C rules say memcpy can't accept a null pointer.
This should fix a test failure with the ubsan buildbots.
|
#
5b267fb7 |
| 02-Dec-2020 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
ADT: Stop peeking inside AlignedCharArrayUnion, NFC
Update all the users of `AlignedCharArrayUnion` to stop peeking inside (to look at `buffer`) so that a follow-up patch can replace it with an alia
ADT: Stop peeking inside AlignedCharArrayUnion, NFC
Update all the users of `AlignedCharArrayUnion` to stop peeking inside (to look at `buffer`) so that a follow-up patch can replace it with an alias to `std::aligned_union_t`.
This was reviewed as part of https://reviews.llvm.org/D92512, but I'm splitting this bit out to commit first to reduce churn in case the change to `AlignedCharArrayUnion` needs to be reverted for some unexpected reason.
show more ...
|
Revision tags: llvmorg-11.0.1-rc1 |
|
#
0415cf47 |
| 18-Nov-2020 |
Simon Pilgrim <llvm-dev@redking.me.uk> |
Fix unused variable warning. NFCI.
We're just performing a null pointer check, we don't need the actual variable.
|
#
c43f8c77 |
| 10-Nov-2020 |
Richard Smith <richard@metafoo.co.uk> |
Add PrintingPolicy overload to APValue::printPretty. NFC.
|
#
438a27f2 |
| 10-Nov-2020 |
Richard Smith <richard@metafoo.co.uk> |
Move code to determine the type of an LValueBase out of ExprConstant and into a member function on LValueBase. NFC.
|